cancel
Showing results for 
Search instead for 
Did you mean: 

Create single IDOC from multiple XML file.

0 Kudos

Is that possible to create single IDOC from multiple XML file which is generated at different point of time in a day.

As of now from LS they are putting XML file only once in the end of day.. that we take and generate IDOC. its working perfectly fine.

Now onwards from LS the will be putting the XML at different time, means they will be putting XML files three four times. So as per our current logic it will generate separate Idocs, this we want to avoid.

How we can create one IDOC from multiple XML files.

We can either trigger the generation of idoc manualy from PI or specify some time for the IDOC generation.

How the mapping can be done for this kind of scenario.

Hope you understand our scenario. Please help me with some inputs with which i can search for.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184789
Active Contributor
0 Kudos

Hello Pradeep,

Do you want to merge the mappings or is it such that you just want the files to process simultaneosuly.If this is the case, then you can add the second file as an attachment or additional files..Go through the below link if this is what u r looking for:

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/404ee507-3fbc-2e10-00bc-be90ab28d036&override...

If this is not your requirement, then you have to go for a BPM as:

http://saptechnical.com/Tutorials/XI/BPM/Fork1.htm

Also there is an alternative of Java mapping as well:

http://wiki.sdn.sap.com/wiki/display/XI/Multi-Mapping+using+Java+Mapping

0 Kudos

Dear Adarsh,

Thanks for the reply,

I will explain what our requirement. Currently in out retail stores we are using LS Retail system and PI as our middle ware.

In our current scenario the daily sales, finance data etc are send to PI directory only at the end of the day. That means one file will be containing the whole sales details and so on.

Now since the data is huge the data transfer from LS to PI directory is taking too much time, they are planning to put these data separately, say up to after noon sale data they will send in the afternoon then may be in the evening and then the rest at the night like that.

According to the current logic. when some file is put in PI Directory corresponding IDoc will be generated.

This will increase the no of documents generated in SAP side. In order to reduce the number of document what we are thinking of clubbing the xml files to generate only one IDOC.

Is this possible. Is there any functionality like appending to an Idoc which is already created.

Or is there any functionality to hold the processing of xml till a particular time and process all together to generate one single IDOC.

I am basically an ABAPer and new to PI, so don't have much knowledge in PI.

Please let me know the possible solutions, and share some document or links which can help us solve the issue.

Thanks & Regards,

Pradeep Alex Luke.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Pradeep,

This is possible, use BPM MultiCollect If pattern to collect all messages then create one IDoc.

But here you have couple of challenges, when you create one IDoc for multiple files , your IDoc should accept all records data and all records should be processed in SAP.

So you need to build mapping logic and IDoc may need extension.

Other laternative would be use ABAP proxy at receiver end .

Regards,

Raj

former_member184789
Active Contributor
0 Kudos

Hi Pradeep,

If you can go for a BPM, the below link will give you stepwise solution for the same:

http://****************/Tutorials/XI/BPM/Fork1.htm

Also as your requirement is to collect messages & send as a single message, you can go for BPM MultiCollect If pattern as suggested by Raja...In your ESR, there is a BASIS SWCV, which contains a namespace http://sap.com/xi/XI/System/Patterns which contains the above example pattern. Also the Java mapping code which I posted previously can help you.