DataSet text file to internal table
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>
DATA: lv_data TYPE string.
OPEN DATASET file1 FOR INPUT IN TEXT MODE ENCODING UTF-8. and READ DATASET
READ DATASET file1 INTO lv_data.
**lv_data will contain the same string line as the file appears in AL11.
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?
Thanks everybody for your help. I have used below guide with exactly the same and it works just as I wanted.