2007 Mar 29 7:23 PM
Hi,
I need to check field 'f1' from itab and delete the character '/'.
I must delete where itab-f1 = '/'.
suppose itab-f1 = abc/def
it should show itab-f1 = abcdef
How should I write the code?
Message was edited by:
ramana peddu
2007 Mar 29 7:29 PM
Hi,
Use this code.
REPLACE '/' with SPACE into itab-f1.
CONDENSE itab-f1 NO-GAPS.
Regards,
RS
2007 Mar 29 7:27 PM
Hi,
Please try this.
...
TRANSLATE ITAB-F1 USING '/ '.
CONDENSE ITAB-F1 NO-GAPS.
...
Regards,
Ferry Lianto
2007 Mar 29 7:28 PM
Try this code.
LOOP AT itab.
REPLACE ALL OCCURANCES OF '/' IN itab-f1 WITH SPACE.
CONDENSE itab-f1 NO-GAPS.
MODIFY itab.
ENDLOOP.
2007 Mar 29 7:29 PM
Hi,
Use this code.
REPLACE '/' with SPACE into itab-f1.
CONDENSE itab-f1 NO-GAPS.
Regards,
RS
2007 Mar 29 7:30 PM
hi ramana,
instead of using delete stmt u can try split command for ur purpose.
Regards...
Arun.
Reward points if useful.
2007 Mar 29 7:30 PM
HI..,
if ur field is of type C,
then it will solve ur problem..
loop at itab.
replace all occurrences of '/' in itab-f1 with ' '.
condense itab-f1 with no-gaps.
endloop.
regards,
sai ramesh
2007 Mar 29 7:33 PM
Hi Ramana,
Use TRANSLATE statement inside LOOP...ENDLOOP.
LOOP AT ITAB.
TRANSLATE ITAB-F1 USING '/ '.
CONDENSE ITAB-F1 NO-GAPS.
MODIFY ITAB INDEX SY-TABIX.
ENDLOOP.
Thanks,
Vinay