04-16-2014 1:30 PM
Hi Guys
I need to create a BAPI to create sales orders coming in through a web service from an external system, for normal materials all works well, but for variant config materials the pricing is not happening, like the way it does when I manually create an order, I don't want to manually pass the pricing condition in BAPICOND as I want the BAPI to dynamically determine the conditions from the access sequence.
While debugging VA01 I found that the control goes to the 'PRICING' function module twice, ones for the main material , and next for all its config materials, the second time it calls the 'PRICING' fm with pricing type 'O'. Here it selects the price for all the variant materials and loads into an internal table vkomv and displays in VA01 the variant materials that we select while creating the order, but in the case of the BAPI call, the control is going only to the 'PRICING' fm call for the header.
I have passed 'V' in the application parameter and the variant material in the varcond parameter of the BAPICOND structure.
Any idea what I might be missing ??
Thanks
Sameer
05-15-2014 7:43 AM
Solved by reading the following OSS notes
562124 Configuration change via
549563 BAPI: Filling the configuration structures
567348 – Fill configuration via BAPI
10-15-2021 8:12 PM
Hi,
I am facing same issue with the updation of pricing for variant conditions. Config data is getting updated with bapi_salesorder_createfromdat2 but pricing isnt carried out . When I open the created sales order in va02 and click on item configuration I can see config details and when i go back, the pricing is getting triggered.
But the pricing should be carried out automatically through BAPI .Please guide .
Any kind of help is really appreciated. I am really struggling with this issue from last few days.
Thank you.
Archana
10-17-2021 6:53 PM
Hi ,
Resolved by using OSS note 562124 - Configuration change via BAPI.
Created Z program as per the note and passed exiting sales order. Pricing conditions are getting determined .
In the sample program below FMs have been used:
1.bapi_salesorder_createfromdat2 -for Sales order creation along with Configuration details.
2.bapisdorder_getdetailedlist -get the created sales order details.
3.bapi_salesorder_change - pass config details again in SO change BAPi and commit.
Variant conditions get updated in Sales order.:)
Thank you Sameer for the ref. OSS note.
Regards,
Archana