01-09-2007 9:16 AM
Hi,
I am downloading an internal table into .CSV format.
In my internal table i have currency field which is having values EX: 4,900.00
While converting to .CSV i am removing ',' EX: 4900.00
But my problem is after removing the ',' it is not condensing with no-gaps. there is a space which i have to remove it.
EX: 4 900.00
can any one suggest me.
Thanks in advance.
Deepak.
01-09-2007 10:01 AM
01-09-2007 9:19 AM
hi,
1) move that currency value to Char
2) Use condense on the char value.
eg:
data: l_amnt(100) type c.
l_amnt = Curr_value..
replace all occurrences of ',' in l_amnt with space.
CONDENSE l_amnt NO-GAPS.
write l_amnt.
Regards
Anver
01-09-2007 9:21 AM
use a character field instead of the type curr field..it wil not have any issues then..
01-09-2007 9:23 AM
Have u tried using this FM SAP_CONVERT_TO_CSV_FORMAT
or
data : v_curr(20).
loop at itab.
v_curr = itab-curr.
replace all occurrences of ',' in v_curr with space.
condense v_curr.
itab-curr = v_curr.
mdify itab transaporting curr index sy-tabix.
endloop.
Message was edited by:
Chandrasekhar Jagarlamudi
01-09-2007 9:34 AM
Hi,
I am getting an error with REPLACE statement.
data v_amnt(25) type c.
v_amnt = d_out_it-wrbtr.
replace all occurrences of ',' in v_amnt with space.
condense v_amnt.
d_out_it-wrbtr = v_amnt.
ERROR "occurrences of ',' in v_amnt" is not expected.
Thanks,
Deepak.
Message was edited by:
KDeepak
01-09-2007 9:46 AM
all occurrences is not working in 4.6c , try
REPLACE ',' WITH SPACE INTO V_CHAR .
01-09-2007 9:51 AM
Hi,
REPLACE ',' it is not working. Throughing error.
Is there any alternative.
Or any example code on this.
Thanks in advance.
Deepak.
01-09-2007 9:54 AM
01-09-2007 10:01 AM