Skip to Content

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

Can we create internal table from txt file seperated by space?

Hi all,

I have text file abc.txt :

BP1 SAP1

BP123 SAP2

Now I can read this file GUI_UPLOAD FM

But I want to return this as table with two columns and two rows.

First row with two columns: BP1 SAP1

Scond row with two column: BP2 SAP2

I tried using

TYPES:

BEGIN OF i_po_data,

BP(3) TYPE c, " lmax length of the line of the text file

BP_name(10) TYPE c,

END OF i_po_data.

but in this case

First 3 characters will be filled in first column.

But in the second row BP123 , BP1 will be in first column but

'23' will not fit in first column.

How to insert the data in the first column just by space?

so that BP123 can also fit in the second column.

Thanks,

SUSHANT

Tags:
Not what you were looking for? View more on this topic or Ask a question