2007 May 29 4:28 PM
Hi All,
I am in a situation where in BAPI_SALESORDER_SIMULATE are rounding off a dollar amount for ZWOT
I have 12.34567 but sap rounds it off to 12.35 for the net price before taxes
when simulate an order of 1000 peices i get 12350.00 instead of 12345.67
now when i simulate and order of 10000 peices then the pricing error becomes larger.
Is there a way to control BAPI_SALESORDER_SIMULATE to actually simulate the actual amount instead of rounding off the the number.
So Now my simulation is wrong because if this.
thanks
Ryan
Hi All,
I am in a situation where in BAPI_SALESORDER_SIMULATE are rounding off a dollar amount for ZWOT
I have 12.34567 but sap rounds it off to 12.35 for the net price before taxes
when simulate an order of 1000 peices i get 12350.00 instead of 12345.67
now when i simulate and order of 10000 peices then the pricing error becomes larger.
Is there a way to control BAPI_SALESORDER_SIMULATE to actually simulate the actual amount instead of rounding off the the number.
So Now my simulation is wrong because if this.
thanks
Ryan
2007 May 29 4:35 PM
Ryan,
I am curious.... does it calculate the price correctly if you manually create a sales order for the same item(s) in VA01?
2007 May 29 4:46 PM
Hi John,
In VA01 the calculation is correct because i still get a price of 12345.67
after ordering 10000 peices instead of 12350.00
in simulate i get a rounded number and i multiply by 10000 but somehow SAP is possibly multiplying 1000 by 12.34567 but not 12.35
thanks!
2007 May 29 4:49 PM
Let's clarify this statement:
"in simulate i get a rounded number and i multiply by 10000 but somehow SAP is possibly multiplying 1000 by 12.34567 but not 12.35"
"I multiple by 10000"???
JUST after the BAPI returns... before you multiply anything, is the price correct?
2007 May 29 5:08 PM
Hi John,
Yes i get the net price from simulate, after that i X 10000 for the qunatity.
how ever just before i X the number i already get the rounded of dollar amount 12.35 instead of 12.3456
is there a way to maintain 12.3456 to be returned by simulate?
thanks
2007 May 29 5:16 PM
Ryan,
And this 12.35 value is returned into field COND_VALUE of an internal table of type BAPICOND??
COND_VALUE has a def that supports 28 digits b/4 the decimal place and 9 digits after the decimal (for the fractional piece).
2007 May 29 5:40 PM
Hi John,
I think i solved the issue.
the way i did it is let simulate also take care of the total calculation and retreived that value and it is now working properly.
Here is the code
CALL FUNCTION 'BAPI_SALESORDER_SIMULATE'
EXPORTING
order_header_in = g_order_header_in
IMPORTING
return = wa_bapireturn
TABLES
order_items_in = gtab_order_items_in
order_partners = gtab_order_partners
order_schedule_in = gtab_order_schedules_in
order_items_out = i_bapiitemex
order_condition_ex = t_order_condition_ex.
i was able to get the total net value from order_items_out = i_bapiitemex in the field NET_VALUE1 so not i dont have to worry about calculation after bapi
Thanks for all the help
Points rewarded accordingly
2009 Oct 23 8:04 AM
I had the same issue, thank you Ryan for your help.
Julien
Edited by: P PROJET ASTRE on Oct 23, 2009 9:33 AM
2007 May 29 4:39 PM
Hi,
check the user settings (defaults) in SU01 Tcode.
or use the command SET COUNTRY ' ' in script.
it will print the country specific format.
or
go to t-code: SU3
go to second tab defaults...
change the decimal notation and try...
need ur reward points.
Regards
Ravi
2007 May 29 4:48 PM
Hi Ravi,
the most decimal places is only xxx.xx nothing more
thanks
2007 May 29 4:51 PM
Ravi,
User settings have no relevance in pricing calculations.
2007 May 29 4:53 PM
Hi,
Please check table parameter ORDER_CONDITION_EX and field ROUNDOFFDI perhaps it may help.
Regards,
Ferry Lianto
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |