‎2009 Jun 01 5:35 PM
boys i have the problem with instruction split , in the field, I put the symbol #
and can not intercept with replace end find.
help
‎2009 Jun 01 6:33 PM
Hi,
TYPES : BEGIN OF ITAB,
text(30),
END OF ITAB.
DATA : tab TYPE TABLE OF itab WITH HEADER LINE,
str(1000),
x(15) type c.
str = 'abcde##1234'.
SPLIT str AT '##' INTO TABLE tab.
LOOP AT tab.
x = tab-text.
ENDLOOP.
Hope this helps
Aswarth
‎2009 Jun 01 6:03 PM
hi,
use ..cl_abap_char_utilities=>NEWLINE ( for single #)
cl_abap_char_utilities=>CR_LF ( for double ##)
DATA con_tab TYPE c VALUE cl_abap_char_utilities=>NEWLINE.
SPLIT t_hfile-rec AT con_tab
INTO t_header-header_id
t_header-doc_type
t_header-ora_soldto..
...
"or
REPLACE ALL OCCURRENCES OF con_tab
IN
w_string WITH space .
Regards,
Prabhudas
‎2009 Jun 01 6:15 PM
‎2009 Jun 01 6:16 PM
‎2009 Jun 01 6:21 PM
check in debugging mode..
if it is single # use this class ..cl_abap_char_utilities=>NEWLINE ( for single #)
if it is single ## use this class cl_abap_char_utilities=>CR_LF ( for double ##)
genrally this will occurs when we upload largte text from text file into internal table..
Prabhudas
‎2009 Jun 01 6:22 PM
‎2009 Jun 01 6:33 PM
Hi,
TYPES : BEGIN OF ITAB,
text(30),
END OF ITAB.
DATA : tab TYPE TABLE OF itab WITH HEADER LINE,
str(1000),
x(15) type c.
str = 'abcde##1234'.
SPLIT str AT '##' INTO TABLE tab.
LOOP AT tab.
x = tab-text.
ENDLOOP.
Hope this helps
Aswarth
‎2009 Jun 01 6:34 PM
‎2009 Jun 01 6:46 PM
The # ( it is a junk value) in the pgm appears like hexadecimal character is in debug o000d
so try to split or replace the string using cl_abap_char_utilities=>NEWLINE it will work ..