‎2008 Feb 21 9:22 AM
hi,
i have field like that 12-3456
and i wont to delete '-' to have 123456
what is the best way to do that?
Regards
‎2008 Feb 21 9:36 AM
REPLACE
ALL OCCURRENCES OF
' -'
IN w_var
WITH space.
condense w_var no-gaps.
it will replace all occurance of '_'
regards
Sheeba
‎2008 Feb 21 9:25 AM
Hi,
TRANSLATE field USING '- '.
CONDENSE field NO-GAPS.
The TRANSLATE command replaces al '-' with blanks and the CONDENSE, NO-GAPS compresses the string to remove all spaces/blanks.
Cheers,
Aditya
‎2008 Feb 21 9:31 AM
Hi
I dont think we can delete same but split at '-' into var1 var2 and concatanate the var1 and var2 again
regards
Shiva
‎2008 Feb 21 9:33 AM
v_val = '12-345'.
search v_val for '-'.
if sy-subrc eq 0.
clear v_val+sy-fdpos(1).
condense v_val.
endif.
‎2008 Feb 21 9:33 AM
Hi,
First replace unwanted character with space and condense the string.
Regards,
Aparna.
‎2008 Feb 21 9:34 AM
Hi,
Use this logic
split w_char at '-' into char1
char2.
concatenate char1 char2 into w_char.
‎2008 Feb 21 9:34 AM
Hi,
Use this logic
split w_char at '-' into char1
char2.
concatenate char1 char2 into w_char.
‎2008 Feb 21 9:36 AM
REPLACE
ALL OCCURRENCES OF
' -'
IN w_var
WITH space.
condense w_var no-gaps.
it will replace all occurance of '_'
regards
Sheeba