05-11-2007 11:32 AM
Hello.
When I execute this code
WRITE: '"' NO-GAP, itab-wrbtr, '"' NO-GAP.
* where:
* itab - internal table
* wrbtr - is amount (similar in BSEG)
It has this kind of output: " 19,994,548.66 "
I think the spaces is like an allotment to fill the field length (13).
But, how can I remove this? I need to have this output: "19,994,548.66"
Thank you!
05-11-2007 11:39 AM
you can do like this
write : (10) itab-wrbtr.
or use
write : itab-wrbtr no-gap.
for previous field also you have to use no-gap
regards
shiba dutta
05-11-2007 11:37 AM
05-11-2007 11:39 AM
you can do like this
write : (10) itab-wrbtr.
or use
write : itab-wrbtr no-gap.
for previous field also you have to use no-gap
regards
shiba dutta
05-11-2007 11:41 AM
Hi,
If you want to just display the amount, you can collect it in a char variable & then condense it.
Thanks
Sandeep
05-11-2007 11:41 AM
First take it to a field using CONCATENATE...
Then use
SHIFT <filed> LEFT DELETING LEADING SPACE
05-11-2007 11:59 AM
But all of this suggestion requires me to convert the amount into string or character format.
My dilemma with this is that by doing converting the data type, the comma separators are removed ("19994548.66") and I need to display it.
Thanks!
05-11-2007 12:02 PM
if you convert the in character format , separator will be there ... but you can try my previous suggestion it was not changing the data type it is just formatting...
regards
shiba dutta
05-11-2007 12:06 PM
I see..
But, how do I convert without losing the comma's?
Also, I cannot use the format of limiting the characters to (10) because I am printing in a loop and cannot determine the specific amount per record.
Thank you so much!
07-28-2007 4:56 AM