cancel
Showing results for 
Search instead for 
Did you mean: 

File2Idoc: File with Multiple Occurence

Former Member
0 Kudos

Hi,

In File2 Idoc scenario: how to read a file with multiple structure/occurrence. I tried as per below links, it is picking only first structure i.e - (Data0).

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

http://wiki.sdn.sap.com/wiki/display/XI/FiletoMultipleIDOCSplittingwithoutBPM

My Input file as like :-

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:MT_SENDER xmlns:ns0="http://FileToIdoc">

- <DATA0>

<DOC_NUM>0017000374</DOC_NUM>

<POSITION_NUM>10</POSITION_NUM>

<DELVRY_ITEM>000000000000000014</DELVRY_ITEM>

<PLANT>1010</PLANT>

<QUANTITY>3</QUANTITY>

<DATE>2010.08.24</DATE>

<SERIAL>AAAA01E1123458</SERIAL>

</DATA0>

- <DATA1>

<DOC_NUM>0017000374</DOC_NUM>

<POSITION_NUM>10</POSITION_NUM>

<DELVRY_ITEM>000000000000000014</DELVRY_ITEM>

<PLANT>1010</PLANT>

<QUANTITY>3</QUANTITY>

<DATE>2010.08.24</DATE>

<SERIAL>AAAA01G1123456</SERIAL>

</DATA1>

- <DATA2>

<DOC_NUM>0017000374</DOC_NUM>

<POSITION_NUM>10</POSITION_NUM>

<DELVRY_ITEM>000000000000000014</DELVRY_ITEM>

<PLANT>1010</PLANT>

<QUANTITY>3</QUANTITY>

<DATE>2010.08.24</DATE>

<SERIAL>AAAA01G1123457</SERIAL>

</DATA2>

</ns0:MT_SENDER>

Please suggest concept.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

The structure what you have created wrong, create this structure and change occurrence of DATA to 1 to unbounded.if you want to read multiple records (same structure) then it is not required to create same structure multiple times.

*<DATA>+ 1 to unbounded.*
>   +<DOC_NUM>0017000374</DOC_NUM>+
>  
>   +<POSITION_NUM>10</POSITION_NUM>+
>  
>   +<DELVRY_ITEM>000000000000000014</DELVRY_ITEM>+
>  
>   +<PLANT>1010</PLANT>+
>  
>   +<QUANTITY>3</QUANTITY>+
>  
>   +<DATE>2010.08.24</DATE>+
>  
>   +<SERIAL>AAAA01E1123458</SERIAL>+
>  
>   +</DATA>

Regards,

Raj

Former Member
0 Kudos

Hi Raj,

Thanks, Even I used the same one as below.

--- DATA 1..unbounded

DOC_NUM 1.1

POSITION_NUM 1.1

DELVRY_ITEM 1.1

PLANT 1.1

QUANTITY 1.1

DATE 1.1

SERIAL 1.1

If you look into fields of structures DATA [0,1,2] only SERIAL field value is changing.

Rest is same. The requirement is that client is giving me all structures in one file.

Thanks,

Anshul

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

The serial number going to change every time??or only 0,1,2.If it is 0,1 , 2 then you have to create the whole structure , else it is not required.

Regards,

Raj

Former Member
0 Kudos

Hi,

Yes, each time it is going to change as per respective structures and there could be N structures in one file.

Then, what to do in this case ? Please suggest ?

Thanks.

Answers (0)