2012 Sep 12 4:50 PM
I got a requirement to upload a fixed length text file and get data from it and post to fbs01
I used gui_upload and got the data in an internal tables.
Now i need to extract data depending on the coloumn position.
should i use offests.or is there any alternate way to do it?
A functionmodule?
2012 Sep 12 5:28 PM
Hi
It depends on how the data are written in the file, if the file was a CSV, you can split the file at ;, but if your file is positional, you should define an internal structure arranged like the structure of the file and to move the data to it.
DATA: BEGIN OF RECORD,
FIELD1(N) TYPE C,
FIELD2(Z) TYPE C,
...........................
END OF RECORD.
LOOP AT T_FILE.
MOVE T_FILE TO RECORD.
................
Max