Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error in splitting records from an internal table

Hi all,

After uploading the data from flat file into an internal table the data consists of # between each field and while I try to split each field and assign to a different table the data is not getting split properly ,

i.e. split function splits the fields after 3 '#' and storing it in the table field.

Thanks & Regards



Hi Jerry,

What Uwe said is correct. We too faced that kind of scenario. In the internal table when uploaded from flat file it will show '#' but it wont get split with '#' symbol in the program. However we solved the issue with the following class.

Data: c_tab value cl_abap_char_utilities=>newline,
         it_string type table of string.

" if it_table1 is the table which contains the flat file data, then go throuhg  this logic.

loop at it_table1 into wa_table1.

 split wa_table1 at c_tab into table it_string.


If the table is not getting split with cl_abap_char_utilities=>newline, then try using differnt attributes of that class ( like cl_abap_char_utilities=>cr_lf, cl_abap_char_utilities=>backspace so on ).

Hope this will help.


Swarna Munukoti.

Edited by: Swarna Munukoti on Sep 13, 2008 5:54 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question