Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
MichalKrawczyk
Active Contributor
0 Kudos

Background Information
Many technical systems can only receive batches of data like, for example
one file with many business transactions, many master data objects (customers, materials).
It may be possible for those systems to receive the data on "one object per one file" basis but quite often
such systems wouldn't be able to handle it efficiently. SAP application systems in most cases use IDocs
to send data to other external systems. IDocs can be send in two ways:

a) immediately after they are created

b) as a package with a special report - RSEOUT00

Unfortunately even if we send a package with report RSEOUT00 XI/PI will still split them
on - one IDoc - one XI/PI request message.

What are the approaches then to send the many IDocs in one file ? 

 

1. Using IDocs that can handle multiple objects

Some IDoc have an occurance greater then one which means that more then object can be sent
in just one IDoc. Like for example we have DEBMAS03 IDOC which can only send one client master data
and DEBMDM can send the same set of data (also client master data) but the occurance is 1..9999.

One of my articles provide a little bit more details on this approach:

Provide more efficient master data management integration with SAP's new mass interfaces and extract...

Advantages 

+ very easy to use - no need to have any special service pack etc. and IDocs can be configured
to be created and sent immediately after the program run

Disadvantages

- there is only a certain number of objects (mostly master data) that can be used in this way
so if you need any other object you need to create it on your own 

 

2. Using a BPM to collect IDocs

PI/XI offers an easy to develop so called collect pattern which allows to group messages
from different sources with the use of a business process. This patterns cna be prepared
in many ways but one of them could be waiting for a certain number of time or for a certain number of messages
then mapping them into one message and sending to the receiver.

Advantages

+ very easy to develop - as all you need to do is a desing a simple BPM inside XI/PI

Disadvantages

- since we need to use a business process for handling many documents this is a highly ineffective pattern
in terms of efficiency - it will be very slow and you will experince many issues with it

- SAP not recommended pattern - because of the issues with performance

- please don't use it 🙂


3. Using a file port


All SAP systems that allow IDoc usage send them with the use of ports (transaction WE21).
The most common type of port is tRFC which allows sending IDocs to PI/XI with the use of IDoc
adapter. However there are a few other ports as well as for example file port. This kind of port
allows sending many IDocs to one file from where it can be fetched by PI/XI's file adapter.
This approach is described by Stefan in this blog:

Collecting IDocs without using BPM

Advantages

+ relatively very easy to develop
+ PI/XI will only fetch one file with multiple objects without the use of a business process

Disadvantages

- in many big companies you will not be allowed to use file ports for handling IDocs
- this approach shows that PI/XI is ont the best EAI tool there is... and we don't want to show that 🙂


4. Using an HTTP destination

Another approach shows the use of another IDoc port - http port. The approach is similar
in terms of the idea to approach with file port but the good thing is that
there is no need to store the file on the file system as the message goes directly to SAP PI/XI
This approach is very well described in this article:


How To… Send Multiple IDocs Within One XI Message

Advantages

+ relatively very easy to develop
+ flow goes directly to SAP PI/XI (as compared with approach No. 3.)
+ PI/XI will only fetch one file with multiple objects without the use of a business process

Disadvantages

- only one but pretty big - if the connection between SAP application system (IDoc sender) and SAP PI/XI
is interrupted IDoc will go to status 02 and it cannot be restarted. Each time this happens
you need to check if PI/XI received the message or not and resend it if necessary from SAP application system.

 

5. Having Enhancement Package 1 (EhP1) for PI 7.0

As of Enhancement Package 1 (EhP1) there is a way to receive multiple IDocs in PI/XI and
PI/XI does not split them anymore. The idea of the approach is described in my blog:

XI/PI: sender IDOC adapter packaging ?

and the actual implementation and configuration is described in the second edition of my book:

Mastering IDoc Business Scenarios with SAP NetWeaver PI

Advantages

+ very easy to develop
+ can be resterted if the flow is interrupted (as compared to approach No 4.)
+ PI/XI will only fetch one file with multiple objects without the use of a business process
+ this is the - best practice way - of collecting IDocs

Disadvantages

- you need to have EhP1 for SAP PI 7.0 (released)
- or you need to have EhP1 for SAP PI 7.1 (not yet released - at the time of wrting this article)


Hope this gives you a nice overview of all possible options for collecting IDocs.

8 Comments
Labels in this area