Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Updating the Currency and the Condition value of a Sales Order

0 Kudos

Hi All,

I have a requirement where I have to update the Currency, Condition Value(Custom condition type) of the Sales Order from my custom program. Currency and Condition value are the input parameters for my program. I am passing this information to the BAPI_SALESORDER_CHANGE in my program.

In the Pricing Routine of the Sales Order, there is a validation on this condition value(this value should be between the Gross Price and the Dealer Net value). This validation is done with the value XKOMV-KBETR. When I try to modify the Currency(eg: from USD to ARS or ARS to USD), all these values should be converted to the target currency. The issue is, in the Pricing Routine, the converted value is not coming in the variable XKOMV-KBETR due to which the validations are failing. Whereas, for the rest of the condition types(standard), the converted amount is updated in XKOMV-KBETR. In the debugging, I observed that, within the BAPI the FM PRICING_CHANGE_DOC_CURRENCY is converting the amounts to the Local currency. But, it is updated in the field XKOMV-KWERT. Can anyone help me where these converted amounts will be updated to the field XKOMV-KBETR? Is there any user exit where the XKOMV structure should be updated with the converted amounts for the custom condition types?

One more thing is, we can not use the XKOMV-KWERT in our validation logic directly as the value is not consistent in all the cases. So, we need a place where the XKOMV table shouldbe updated with the converted amount values.

Could someone please help me out with this issue? Thank you in advance.

Best Regards,


Active Contributor
0 Kudos


Compare the condition types the standard one with the custom ones may be something is different in the way the condition types are configured. This may solve the issue.