cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple IDoc to single file using IDoc Adapter

Former Member
0 Kudos

Hi Everyone,

I am using PI 7.4 and working Multiple IDoc To File Scenario.

Sender Adapter: IDoc Adapter

Receiver : File Adapter

ECC will release the IDoc in packet and as per the requirement PI has to create the target file consisting of as many line items as the number of IDocs.

So IDocs will be released from ECC in packets of lets say 25.

PI needs to loop over all 25 items and get the file created. Target file would consist of some header records (payment total, no of payment records(no of IDocs received in one message)) and line items (In this case it would be 25 lineitems).


Currently I have configured as below:
I could see multiple IDocs in one single message. But in message mapping the occurrence of IDoc is 1 so what should we do loop over multiple IDocs in mapping.

I read below note and blog:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bde6b?overridelayout=true

http://www.stechno.net/sap-notes.html?view=sapnote&id=814393

It says to create modified xsd by exporting the IDoc and import it back to repository and use the same.

But I am not sure whether we can use ALE connection via IDoc Adapter to connect to ECC.

Please provide your inputs.

Thanks,

Vertika

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Vertika - It should work without changing the occurrence as it's on the sender side...

In your mapping, you would receive all the IDOC's though the occurrence is 0..1...


Just simply paste the payload in the test tab and see.. it should not throw any error..



Former Member
0 Kudos

Thanks Harish,

I tried the same and its working. So, even though we can see 1..1 occurrence but in runtime defined context handling for multiple IDocs is serving the purpose of looping over the n number of IDoc and creating one single file with as many line items as the number of IDocs.

Thanks,

Vertika

former_member184720
Active Contributor
0 Kudos

Hi Vertika - Yes.. If it's on the receiver side then you have to change structure as it validates the xml

Former Member
0 Kudos

So, you mean to say if it is File To IDoc scenario then we have to change the structure i.e we have to make it 1..unbounded.

But if we are doing this by exporting the IDoc and importing the same as xsd in ESR then how we will be using the IDoc Adapter in this scenario.

Can we send the IDocs using ALE connection/IDoc Adapter if we are importing the IDoc as XSD and using the same in mapping?

Regards,

Vertika

former_member184720
Active Contributor
0 Kudos

Yes. You can..

engswee
Active Contributor
0 Kudos

Hi Vertika

If you use IDoc as your target message, you no longer need to export the IDoc structure, modify it and import back the XSD. You can just change the occurences in the Signature tab of Message Mapping.

Rgds

Eng Swee

Answers (0)