‎2008 Dec 26 7:41 PM
Hi All,
I need to remove the ANY SPL character from the given string.
For eg.
If the input = 1234#890.
then the output should be
1234890.
Thanks in advance.
Shiva.
‎2008 Dec 26 8:26 PM
Use this Logic:
report:test.
data:value TYPE string VALUE '1234#890',
num TYPE i,
result TYPE char35,
BEGIN OF atext_tab OCCURS 0 ,
text TYPE c,
END OF atext_tab.
CALL FUNCTION 'SOTR_SERV_STRING_TO_TABLE'
EXPORTING
text = value
* FLAG_NO_LINE_BREAKS = 'X'
LINE_LENGTH = 1
* LANGU = SY-LANGU
tables
text_tab = atext_tab
.
LOOP AT atext_tab .
if atext_tab-text ca '! @ # $ % ^ & * '.
delete atext_tab INDEX sy-tabix.
else.
CONCATENATE result atext_tab-text into result.
endif.
ENDLOOP.
WRITE result.
‎2008 Dec 26 8:38 PM
also can try like, by using CONTAINS NOT-CN, we can achieve this, but, need to write all 0 to 9 and A to Z characters in CONTIANS NOT synstax.
thanq
‎2008 Dec 26 9:54 PM