Skip to Content

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

DataSet text file to internal table

Hi,

I have an XML file which is stored in AL11 as a one line string like below:

<?xml version="1.0" encoding= "UTF-8"?><GrpHdr><Matnr>1234567</matnr><MTART>type</MTART><MATKL>group</MATKL><BISMT>00000123</BISMT><VOLUM>17</VOLUM></GrpHdr>

I used:

DATA: lv_data TYPE string.

OPEN DATASET file1 FOR INPUT IN TEXT MODE ENCODING UTF-8. and READ DATASET

DO.

READ DATASET file1 INTO lv_data.

**lv_data will contain the same string line as the file appears in AL11.

ENDDO.

My questions is, how can I assign/map the fields in the file to my internal table of type customized table and store the new record in DB table?

Thank you,

Former Member
Former Member replied

Thanks everybody for your help. I have used below guide with exactly the same and it works just as I wanted.

Guide towards a simple conversion of an XML file to ABAP Internal table, using XML parsing

Thank you.

0 View this answer in context

Helpful Answer

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