‎2009 Mar 18 5:42 AM
Hi ABAP Experts,
I need to calculate ratio of the following:
Lv_Ratio = lv_var1 / lv_var2.
Note: TYPE of lv_var1 and lv_var2 = Currency, Length 13, Dec 2.
I would like to know, what 'TYPE' should the variable lv_ratio be declared?
Thanks a lot in advance.
Best regards,
TM
‎2009 Mar 18 5:43 AM
‎2009 Mar 18 5:43 AM
‎2009 Mar 18 5:44 AM
‎2009 Mar 18 5:48 AM
Refer this:
data: l1 type glt0-tslvt,
l2 type glt0-tslvt,
l3 type glt0-tslvt.
l1 = '19.02'.
l2 = '12.05'.
l3 = l1 / l2.
‎2009 Mar 18 5:56 AM
Hi,
surely you want the ration value to be in decimal as the two variables can be in decimals so bettre to declare the variable as P with decimal 2 to capture the decimal part also.
Pooja
‎2009 Mar 18 5:58 AM
Hi,
Declare data like this
data: lv_ratio type p decimals 2
Regards,
Jyothi CH.
‎2009 Mar 18 6:04 AM