Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Fixed length file splitting

Former Member
0 Likes
351

     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?

1 REPLY 1
Read only

Former Member
0 Likes
308

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