‎2008 Mar 12 7:57 PM
hi, im trying to download an itab into a text file.... using gui download....
the thing is that i have been requested to cut off all the zeros from the fields... but they must still be aligned right like a number....
for example
Material
00001254
00015680
should be
Material
1254
15680
any help will be rewarded
Edited by: JAVIER SALAZAR on Mar 12, 2008 8:57 PM
‎2008 Mar 12 8:34 PM
You can try:
data: Mat(10) value '0000001254'.
translate mat using '0 '. "<==== zero to space
Rob
‎2008 Mar 12 8:07 PM
You Can use the following statement:
SHIFT c LEFT DELETING LEADING c1.
eg.,
data : matnr(8) value '00001234'.
write : matnr.
shift matnr left deleting leading '0'.
write : matnr.
Output:
000001234
1234
Reward points if it is useful..
‎2008 Mar 12 8:34 PM
You can try:
data: Mat(10) value '0000001254'.
translate mat using '0 '. "<==== zero to space
Rob
‎2008 Mar 12 9:19 PM
i tried both solutions
1. it does the change but doesnt align to the right
2. Does the changes but also deletes zeros from the number....EG wont work for 52060..
help!
‎2008 Mar 12 9:28 PM
Well, I'm a bit embarassed. I usually check that sort of thing. So try:
DATA: mat(10) VALUE '0000001054'.
SHIFT mat LEFT DELETING LEADING '0'.
SHIFT mat RIGHT DELETING TRAILING ' ' "<==== space.Rob