‎2014 Apr 01 11:20 PM
Hi All,
I am using the BAPI : BAPI_SALESORDER_CREATEFROMDAT2 for creating the sale order. It works as expected. But the condition value which I pass through the parameter: ORDER_CONDITIONS_IN gets multiplied by 10. Please note that I am not passing the currency value. I have debugged the code and I have found that if we dont pass a currency value, then SAP automatically multiplies the condition value by 10. Could you please tell me why SAP has introduced this logic? If I need to resolve this issue, do I need to pass my condition value as (condition value / 10). ?
Thanks,
Selva.
‎2014 Apr 02 5:25 AM
Hi,
Yes you should pass the value/10 in your logic.
You can observe the same in KONV table.
Divide the value and proceed.
Regards-
Makarand
‎2014 Apr 02 3:22 PM
‎2014 Apr 02 3:57 PM
The BAPI has this in its documentation for that parameter:
When you complete the COND_VALUE and CURRENCY fields, you must decide which of the following applies:
If neither the CURRENCY or the CURRENCY_ISO fields are completed, the entry is issued as a percentage value. This could lead to an incomplete entry if the condition type is not in percentages.
I think (based on the 2nd bullet) for non-percentages, you pass CURRENCY as well. (or manually do the division...but then watch out for rounding issues).
Jeremy H.
‎2014 Apr 02 4:34 PM
If you don't pass currency information, system assumes that it is not a currency but % rate . While storing '%' in DB table , SAP replaces '%' with '0' . That means 10% is stored as 100.
To get the correct value, the rate amount is divided by 10. I believe, standard SAP does not divide by 10 directly but uses some FM's like "BAPI_CURRENCY_CONV_TO_EXTERNAL" & "BAPI_CURRENCY_CONV_TO_INTERNAL" to arrive at the correct figure.
Also check the following external link on how SAP stores currency information
Handling Currencies having Zero Decimals in SAP ABAP ~ New To SAP ( external link ).
‎2014 Apr 02 4:55 PM
hiii,
Divide Value By 10 and then pass it to BAPI
This the Solution