Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

split problem

Former Member
0 Likes
718

boys i have the problem with instruction split , in the field, I put the symbol #

and can not intercept with replace end find.

help

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
687

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

8 REPLIES 8
Read only

Former Member
0 Likes
687

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

Read only

0 Likes
687

Which is not to be ,

hexadecimal character is in debug o000d

Read only

0 Likes
687

use this cl_abap_char_utilities=>NEWLINE it will work

Read only

0 Likes
687

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

Read only

0 Likes
687

Which is not to be ,

hexadecimal character is in debug o000d.

Read only

Former Member
0 Likes
688

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

Read only

0 Likes
687

?????????????????????'

Read only

0 Likes
687

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 ..