cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert sequencial textlines into nested structure?

Former Member
0 Kudos

Hi experts,

I have an input-TXT file in which I get headerdata (1 line), positiondata (n lines) and for each position partnerdata (n lines). I have to map this data to Idoc ORDERS05. In this structure, there is 1 element per position (E1EDP01) which contains a subelement where I can enter position-partners. How can I achieve this mapping using the graphical message mapping tool in XI?

Example lines of inputfile:

(headerdata) 199992;100;10;...

(positiondata) 10;100200;50

(positionpartners) 10;partner1

(positionpartners) 10;partner2

(positionpartners) 10;partner3

(positionpartners) 10;partner4

(positiondata) 20;100201;100

(positionpartners) 20;partner1

(positionpartners) 20;partner2

(positiondata) 30;100202;75

must result in:

headerdata linked to E1EDK01, no problem

positiondata linked to E1EDP01, no problem

positionpartners linked to E1EDPA1 within E1EDP01. Here is the problem...just linking the input-positionpartners to EDEDPA1 does not work. Then I get all positionpartners of the complete inputfile linked to the first E1EDP01, and no partners from the second E1EDP01 on...

Regards,

William

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey,

First step is create a mapping structure(i.e data type and message type) which will be convenient

for you to map with the Idoc.

Then you can use File content conversion to convert the text file into the nested structure(one which you have created))

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

refer to this blog in order to convert the input file stream into the required nested structure.

Once done this map the message type to your Idoc.

revert in case of any problem with FCC(file content conversion).

reward points if useful.