‎2008 Jan 18 4:57 AM
Hi all,
i have problem like this i want to delete first two (~~) characters . i am written concatenate statement in the loop so v_string taking spaces
so i want to remove this ~~ .
plz any tell how to do this.
this is code in the loop.
CONCATENATE v_string ','
itab-arktx
itab-vrkme
total
total1
itab-vat_rate
itab-matkl
total2
INTO v_string SEPARATED BY '~~'.
present ouput:
~00500000123~ 2~0003000963~~~test6
~00500000123~ 2~0003000963~~~test6
act output :
00500000123~~ 2~0003000963~~~test6
00500000123~~ 2~0003000963~~~test6
thaks for advance
regards
sai
‎2008 Jan 18 4:58 AM
‎2008 Jan 18 4:58 AM
‎2008 Jan 18 4:59 AM
‎2008 Jan 18 5:07 AM
hi sai,
you better use the SHIFT command.
i.e., Shift v_string by 2 places
see the below code.
CONCATENATE v_string ','
itab-arktx
itab-vrkme
total
total1
itab-vat_rate
itab-matkl
total2
INTO v_string SEPARATED BY '~~'.
SHIFT str by 2 places left deleting '~~
i didn't see the syntax.but check the syntax also.
if it is useful Reward me.
‎2008 Jan 18 5:12 AM
Hi Sai
CONCATENATE v_string ','
itab-arktx
itab-vrkme
total
total1
itab-vat_rate
itab-matkl
total2
INTO v_string SEPARATED BY '~~'.
lv_len = strln (v_string).
v_string = v_string+2(lv_len-2).
‎2008 Jan 18 5:22 AM
‎2008 Jan 18 5:24 AM
Sai
CONCATENATE v_string ',' "--> Guess at this point v_string is EMPTY, try to avoid this and check the result
itab-arktx
itab-vrkme
total
total1
itab-vat_rate
itab-matkl
total2
INTO v_string SEPARATED BY '~~'.
Regards
Eswar
‎2008 Jan 18 5:30 AM
hi,
u can do like this:
DATA: str(10) TYPE c VALUE '1234567890'.
DATA: str1(10) TYPE c.
str1 = str+2(8).
This means that take character from third position, and 8 characters from the point. You can specify it as your field's length minus 2.
Where str can be ur string.
Regards,
Renjith Michael.
Edited by: Renjith Michael on Jan 18, 2008 11:00 AM
‎2008 Jan 18 12:12 PM