‎2007 May 22 8:07 PM
Hello gurus,
I have a "," delimited text file, and i have to upload that to an internal table of two columns as as follows.
example:-
Text file:
Book,Pencil,pen
kumar,ramesh,srini,ram,lakshman.
Intenal table should get populated as follows:-
Book pencil
Book pen
kumar ramesh
kumar srini
kumar ram
kumar lakshman
plz help me out.
Thanks
Kumar
‎2007 May 22 8:13 PM
Something like this.
loop at input_text_table.
split input_text_table-csv_line at ',' into result_itab-field1 rest_of_it.
do.
split rest_of_it at ',' into result_itab-field2 rest_of_it.
if sy-subrc <> 0.
exit.
endif.
append result_itab.
clear result_itab-field2 .
enddo.
‎2007 May 22 8:10 PM
Hi,
you have to write programming logic to achiveve that.
thanks,
sksingh
‎2007 May 22 8:15 PM
Hi,
please can you give me the logic if you know..?
Thanks,
kumar
‎2007 May 22 8:13 PM
Something like this.
loop at input_text_table.
split input_text_table-csv_line at ',' into result_itab-field1 rest_of_it.
do.
split rest_of_it at ',' into result_itab-field2 rest_of_it.
if sy-subrc <> 0.
exit.
endif.
append result_itab.
clear result_itab-field2 .
enddo.