cancel
Showing results for 
Search instead for 
Did you mean: 

File conversion for more than one level of substructure

Former Member
0 Kudos

I have the following file format that needs to be converted into XML, but because it has more than one level of substructure I'm not able to give the correct file conversion parameter

source file sample:

1headeryyyyyyyyyyyyy

2itemsyyyyyyyyyyyyyy

2itemsyyyyyyyyyyyyyy

2itemsyyyyyyyyyyyyyy

3trailer1yyyyyyyyyyyyy

4trailer2yyyyyyyyyyyyy

2itemsyyyyyyyyyyyyyy

2itemsyyyyyyyyyyyyyy

2itemsyyyyyyyyyyyyyy

3trailer1yyyyyyyyyyyyy

4trailer2yyyyyyyyyyyyy

Thus you see above that there is one header followed by a bundle that conrains many items and 2 trailers and this bundle can repeat any number of time.

Could anyone let me know how to parse this type of file to XML?

Thanks,

Lakshmi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Lakshmi,

See this blog:

<a href="https://answers.sap.com/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter:///people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

[]´s

Marcelo Macedo

Former Member
0 Kudos

Hi Marcelo,

Those mentioned in the block contains only one level of substring, in my case I need the conversion parameters set such that after ut reads some items, trailer1 and trialer2, it should again pick up items. Currently I have declared the recordset structure as below:

FILE_HEADER,1,ITEMS,*,TRAILER1,1,TRAILER2,1

which reads only one batch of items, trialer1 n trailer2.

Thanks,

Lakshmi