‎2007 Sep 19 5:18 PM
Hi friends,
My internal table contains following fields
Net weight type c length 15
Length type c lenth 15.
I am moving length and netweight from vekp to my internal table
So my internal table contains values as
Net weight 15.000
Length 5.000
I need to change above values as 00015.0 (before decimal 5 places and leading zeros if the value is not of length 5). And after decimal only one digit.
Length to 0005 (means no decimal and before decimal 4 places with leading zeros if space is there).
Can any body help on this. I have tried but the values are not changing properly.
Please help me.
Thanks a lot.
‎2007 Sep 19 5:41 PM
How about something like this.
report zrich_0001 .
data: Net_weight(15) type c value '15.000'.
data: str1 type string.
data: str2 type string.
data: whole(5) type n.
data: dec(1) type n.
split net_weight at '.' into str1 str2.
whole = str1.
dec = str2(1).
concatenate whole dec into net_weight separated by '.'.
write:/ net_weight.
Regards,
RIch Heilman