2009 Apr 01 6:55 AM
hi gurus.....
I have quantity amount which comes in the output as 200.0000
i want to take only the 200 , after the decimal point i want to discard it
can u help me out how that can be dont
I want to display as only 200
Thankyou so much
2009 Apr 01 7:06 AM
2009 Apr 01 7:00 AM
Hi,
data: text2(20) type c,
text3(3) type c,
text1 = 200.0000
split text1 at ',' into text2 text3.
write: text2.
or
SHIFT text1 LEFT DELETING LEADING ','.
Regards
Nicole
2009 Apr 01 7:00 AM
hi,
take another variable with type P decimals 0...move the value to this variable.
eg: data : netpr TYPE netpr value '200.000',
v1(15) TYPE p decimals 0.
v1 = netpr.
write v1.
output: 200
Hope it helps!
Regards,
Pavan
2009 Apr 01 7:05 AM
Hi,
Use the following Sample Code use floor
data: dec TYPE p DECIMALS 3 VALUE '2.000', " or if Value will be 2.999 will also return you 2
with_out_fp TYPE string.
with_out_fp = floor( dec ).
WRITE: with_out_fp.
Best Regards,
Faisal
2009 Apr 01 7:06 AM
2009 Apr 01 7:08 AM
You can use the in-built function TRUNC(num)...check it out....
2009 Apr 01 7:11 AM