2009 Jun 04 6:47 PM
Hi,
we have written one VOFM routine for the Calculation of Profit Margin and Gross Margin in the Sales Order.
The Problem is we need to show the value in the Sales Order as
for example if the Profit Margin % is 0.27, then i need to display it as something 27.xx.
The above scenario is working fine. we are multiplying the value with 100 and assigning to a character filed.
and the character field we are passing to XKWERT and the value is coming perfectly.
But the Problem is when the Profit Margin is 0.09%, when we multiply with 100, we are getting the value as 9.xx.
when we assign it to XKWERT field from the character field , it is converting 9.xx as 9x.xx.
Could you please tell me how to resolve the above problem.
in the routines we are unable to perform arithmetic operations between Currency values.
Thanks,
Adi.
2009 Jun 08 2:48 AM
Hi Adi ,
first thin u need to remember while working with VOFM routines is calculations or % should take place with 1000 not with 100,bcos SAP condition values are at % of 1000 not 100.
regards
Prabhu
2009 Jun 08 3:20 AM
the above post is exactly correct.... In a similar scenario I remember using floating variable and FM to convert floating variable to Char..
data: lv_f type F.
se37 > floatchar*
2009 Oct 07 5:02 AM