cancel
Showing results for 
Search instead for 
Did you mean: 

Message Split and ZIP

Former Member
0 Kudos

Hello and greetings.

I come here to ask for a word of advice regarding a requirement I got assigned.

The scenario is as follows.

We have 3 SAP systems that will send us different XML files with different lenghts, these XML files will contain different documents in the payload and here's the first part of the requirement:

For each one of the documents contained in the payload, we have to create a single XML document containing that information. The way I intended to fullfil this requirement is to do a message split and every time a new document line is found to perform the message split and follow a mapping to create the new xml file. The next step is, every 500 XML files, we need to create a ZIP file and send it to a SOAP interface.

The issue I'm having is trying to figure how we're gonna be able to do this last part; I'm trying to find any ideas regarding if SAP PI can help me perform this task via configuration or even code, and thus the reason why I come here for your advice if you have any insights I can follow to deliver the solution for the client.

We're working on a SAP PI 7.3 instalation with a dual-stack.

Please give me your feedback regarding any ideas on how to approach the requirement, and thank you in advance.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Emmanuel,

From my point of view, your case is the typical to use a ccBPM or SAP Netweaver BPM because you need to wait to n files to bulk a message and later m files to bulk the final one.

Check this example Message merge using the BPM - Process Integration - SCN Wiki

Regards.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you all for your comments. In the end client decided to change the scenario, so we're done with this.

Regards.

0 Kudos

Hi Emmanuel,

One alternative idea is use (inside the PI )"split" the problem in several steps (without BPM) for the "every 500 XML files, we need to create a ZIP file and send it to a SOAP interface." requirement

1. First, one interface will receive the inbound xml files and will place it in a first temporaly folder, but writing "in appending mode" one single file with a fix filename (for example: big_file.xml )

2. A second PI Step, in the same interface, will be a interface that will be a file receiver of the "big_file.xml" and then, in a mapping, count the xml documents inside..if get the number of 500 documents, make a message split and use the  "ZIP Adapter Module" to create a zipped resulting file

3. After all of this, other third step should catch all the ZIPs, sent, and them delete from the original folder.

Best regards,

Antonio

PriyankaAnagani
Active Contributor
0 Kudos

Hi Emmanuel,

Can you please let us know what kind of adapter you are planning to use at sender side? I would suggest any of the two below options based on it.

Solution1: If you are using IDocs at sender side, then you can use IDoc packaging. Specify the package size as 500 so that one message will have 500 Idocs data and you can create target file for this data and ZIP it using Payload ZIP bean in the receiver channel.

Solution2: As suggested in earlier post, use BPM to collect the data and create files at receiver side.

Regards,

Priyanka