Error in splitting records from an internal table
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
Swarna Munukoti replied
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. endloop.
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.
Edited by: Swarna Munukoti on Sep 13, 2008 5:54 PM