cancel
Showing results for 
Search instead for 
Did you mean: 

Line Feed + Carriage Return in FM READ_TEXT

Former Member
0 Kudos

Hi,

My problem is when i read a bill item text with the function READ_TEXT it shows me some # chars that is the line breaks. i have to split the text by this chars. I'm using this code but nothing appens:

CLASS CL_ABAP_CHAR_UTILITIES DEFINITION LOAD.

CONSTANTS: char TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF.

DATA: BEGIN OF texto3 OCCURS 0,

tdline LIKE tline-tdline,

END OF texto3.

CLEAR line.

LOOP AT texto INTO wa_texto.

CONCATENATE line wa_texto-tdline INTO line.

ENDLOOP.

CLEAR: texto3, texto3[].

SPLIT line AT char INTO TABLE texto3.

Can anyone help me?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,


CLASS CL_ABAP_CHAR_UTILITIES DEFINITION LOAD.
CONSTANTS: char TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF,  "Comment this     
                    char TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB "and use this


DATA: BEGIN OF texto3 OCCURS 0,
tdline LIKE tline-tdline,
END OF texto3.

CLEAR line.
LOOP AT texto INTO wa_texto.
CONCATENATE line wa_texto-tdline INTO line.
ENDLOOP.

CLEAR: texto3, texto3[].

SPLIT line AT char INTO TABLE texto3. Use above New Class and Attribute

" or
SPLIT line AT '#' INTO TABLE texto3. "use this

Regards,

Prabhudas

Former Member
0 Kudos

tdline LIKE tline-tdline, ...........this vriable must be of type C or N or D or T...

or declare

itab type table of string....

and split into table itab..

Use F1 help on SPLIT..

Edited by: Veeranji Reddy on May 5, 2009 6:38 PM