The api to use is QP_PREQ_PUB.PRICE_REQUEST. You have to populate all the table variables with the item attribute info and the qualifier info to get a table back of the modifiers that can apply. Check out:
HOW to Use QP_PREQ_PUB.PRICE_REQUEST API to Price an Item (Doc ID 759804.1)
Is there any api that will show me what are the available manual header/line modifiers that can be applied to my sales order?
Yes QP_PREQ_PUB.PRICE_REQUEST will show you all of them as long as you add all the qualifier data. They come back in x_line_detail_tbl
Thanks. I'll check it out.
I have seen a script for QP_PREQ_PUB.PRICE_REQUEST. I am trying to follow this to derive a unit selling price of an item but as I am going through all the parameters, i am quite amused on how many parameters I have to pass just to get the usp of an item and if i really have to call inside the script qp_attr_mapping_pub.build_contexts. I honestly expecting to just pass inventory_item_id and price_list_id and the api will just give me what is supposed to appear on the s.o. form.
I only need to know the current usp of an item (i am not creating an s.o. line yet at this point) and store it somewhere. If you probably have a simple script that I can follow, maybe you can share it with me...
Unfortunately with the complexity of advanced pricing, I think you do have to send in all the parameters. In my code, I only send in the parameter values that I know I use for qualifiers - so for example, we have nothing set up on volumes, so I don't bother with that qualifier.
thanks for the code. I will go through this and try to make it run using our own environment.
I was able to derive the unit selling price of an item by passing only the following parameters (we don't have anything set yet, just the default):
2. line_attr_rec - inventory_item_id (pricing_attribute1)
3. qual_rec - price_list_id (qualifier_attribute4)
These are the things I have realized so far (pls. correct me if i am wrong):
1. On a very basic setup, i only have to pass the above 3 parameters.
2. Automatic modifiers are automatically considered and applied by the pricing engine,
no need to pass it explicitly.
3. The correct unit selling price (that is supposed to appear on s.o. line's Unit Selling Price
column) is the value of x_line_tbl.adjusted_unit_price. This contains the final usp value
(after applying automatic modifiers).
4. The price list price is the x_line_tbl.unit_price. Am I correct???
Yes, you are correct.
I have noticed that at the end of the script there is a commit statement. What are the tables it is writing/updating to? I am asking this because I am just deriving the usp, most probably it is for some historical purposes...