Skip to Content
IDOC (multiple types) Collection in BPM

This WEBLOG covers steps that are to be followed in BPM for collecting multiple IDOCs and sending it in form of flat file. Initially I have roofed some prerequisite steps to be trailed before we can walkthrough the steps of BPM. Let’s presume for time being no manipulations are done on the data in the IDOC. We sent what we receive.


For ease of documentation we take following paradigm:
Assume that we have three different type of IDOCs

Our NOM1 type IDOC has the following structure :


NOM2 type :


NOM3 type :


The Step by Step process for collecting the IDocs to be sent to a single file is stated as below:

Step 1:
First of all we have to create Data type for the flat Receiver as shown in figure:


Step 2 :
Then create Message Type for Target Data: MT_NOM

Step 3 :
Create three Message Interface of type Abstract Asynchronous for the IDOCs and two for the File as follows:
MI_ISU_UKGAS_NOM1_ABS (Abstract Asynchronous)
MI_ISU_UKGAS_NOM2_ABS (Abstract Asynchronous)
MI_ISU_UKGAS_NOM3_ABS (Abstract Asynchronous)
MI_NOM_ABS (Abstract Asynchronous)
MI_NOM_IB (Inbound Asynchronous)

Step 4:

Create three Message Mapping to convert Outbound type of IDOC into Abstract type so that we can collect it in our BPM. Message Mapping for conversion of three different types of IDOCs to their Abstract type are as follows:

Below mapping is for N:1 transformation. (Here input will be having three different types of Abstract IDOCs and target will be having Abstract Target File type)

Step 5:
Create the Interface Mapping as follows.

(a) Interface mapping for IDOC outbound to IDOC abstract.

IM_ISU_UKGAS_NOM1_to_NOM1_ABS (Message Mapping (i) is used here)
IM_ISU_UKGAS_NOM2_to_NOM2_ABS (Message Mapping (ii) is used here)
IM_ISU_UKGAS_NOM3_to_NOM3_ABS (Message Mapping (iii) is used here)

(b) Interface mapping for collected IDOCs of Abstract type to the file of Abstract Asynchronous type.

IM_ISU_UKGAS_NOM_to_NOM_ABS (Message Mapping (iv) is used here)

Step 6 :

Create the Integration Process to Collect IDOCs of different types to one place and after the specified time interval it will be posted to one flat file in some specific format.

Let see the step by step BPM formation for collecting multiple IDOCs:

Step 6.1 :

First of all create Container content as:

CollectNOM1 is used to retrieve Abstract form of IDOC type NOM1.
CollectNOM1list is used to collect the IDOC of type NOM1, and so we have set its Multiline as true.

Same way for IDOCs of type NOM2 and NOM3 we defines the container items as CollectNOM2 and CollectNOM3 respectively.
For collecting them we again define CollectNOM2list and CollectNOM3list of type NOM2 and NOM3 respectively with their Multiline property as true.


Step 6.2 :
As we are going to collect three different types of IDOCs in our BPM, we specify the Correlation as follows:
Let us name it as CorrFileType


In the Correlation editor , we specify Correlation Container, Involved Messages and Properties.


We set the value in Properties as follows:
Specify correlation field in XPath option. E.g here we are selecting the FILE_TYPE as our Correlation field.
Once we select the field we find the XPath Expression at bottom as shown in figure.


Same way select the Correlation Field for all three IDOC types. And after selection of values we can observe our Properties screen as exposed below:


Step 6.3 :
Now it is time to toil with graphical editor. First step is to add Block step to our BPM.


Set Properties of Block step as follows:
Give some Exception name in Exception Property. E.g TimeOut


Step 6.4 :
Add EXCEPTION Step to BPM. We can insert this step by Right clicking on Block and then select the Insert option of menu and then select Exception Branch option of submenu. The menu looks like as shown in figure below:


After adding the Exception Block we have to set its Properties as shown in figure below:
(TimeOut is Exception name which we have given in our Block step)


Step 6.5 :
Add DEADLINE Step in BPM. It can be added by selecting the Deadline branch submenu from the menu option “Insert of Block” .
It will look like as in figure below.


Set Properties of Deadline Step as follows:
We have to specify the DURATION property which depicts the time for which the block processing will be done. (e.g 2 Minutes in our example).


Step 6.6 :
As in our paradigm, three different types of IDOCs going to be collected in BPM, so we add FORK step in our BPM as exposed below:


Set the Properties of Fork step as follows:
As we need to have three different branches in our fork, we set the NECESSARY BRANCH property as 3 as shown in figure below.


Step 6.7 :
We need to collect each type of IDOCs for some time duration (one which we have specified in our deadline step). So we add LOOP step in our fork branch, which enables to collect IDOCs for specified time duration. Our BPM looks like:


Set the Property of Loop Step as follows:
Condition (1=1) indicates the Infinite loop. Once we click on the condition we get condition editor and there we set our left operand and right operand as 1 (as shown in figure below). This enables the execution of the loop for the time period we have specified in our deadline branch.


Step 6.8 :
To receive IDOCs into BPM we insert RECEIVE step (as shown below). This will receive IDOC of NOM1 type.


We set the Properties of Receive as follows:
Message property defines, what type of data is going to receive by the RECEIVE step. As shown in figure below, we have selected CollectNOM1, as this Receive step will use to collect NOM1 IDOCs. Second property we set here is the correlation; here we give name of correlation (CorrFileType) which we have created in beginning.


Step 6.9 :
Add CONTAINER Operation step in our BPM(as shown in figure below). This Step facilitates collection of IDOCs which the Receive1 step has collected.


Set Properties of CONTAINER as follows:

In Target Property we specify the name where we want to collect our IDOCs.
As shown in figure below we are selecting CollectNOM1List which is of Abstract type and whose Multiline property we have set as true.

Operation Property is used to define the operation we want to perform. Here as we want to append each newly coming IDOC, we are setting its value as APPEND.

Third property which we set here is Expression which will specify the type of IDOC going to be collected by the CONTAINER. Here our container will be collecting the NOM1 type of IDOC so we specify Expression as CollectNOM1 which is again of the Abstract type of IDOC.


Step 6.10 :
Same as NOM1 we have to add receive and container operation for NOM2 and NOM3 also.

For NOM2: Receive2 and Container2
For NOM3: Receive3 and Container3

As shown in figure below we find three branches in our fork and each branch is collecting NOM1, NOM2 and NOM3 IDOCs respectively for the time interval which we have specified in our deadline branch.


Step 6.11 :
Till now we have done everything to collect our IDOCs in our BPM. Once IDOCs are collected after the specified time interval (2 minutes in our case) a transformation step is required to convert the N collected IDOCs into one.

Add a TRANSFORMATION step in the BPM. This step is for the N:1 conversion. Our BPM will look like:


Set the Properties of TRANSFORMATION as follows:
Interface Mapping property is place where we specify our Interface mapping which will convert our N collected IDOCs into one. In our paradigm as soon as we select our Interface Mapping program we will get the three different source messages in our Source Messages property (In interface mapping program we have three input Abstract Data).We then fill this value into CollectNOM1List , CollectNOM2List, CollectNOM3List for NOM1, NOM2, NOM3 IDOCs respectively.
These Lists are output of Container Operations of Block.

In Third property of transformation we specify the Target Messages . Here we set it as TargetFile which is of Abstract Target Type as shown in figure below.


Step 6.12 :
Once we complete the N:1 transformation of data a SEND step follows. This is as stated in the figure below


We set the Property of Send as follows:
Set the Message property as TargetFile which is of Abstract type of output file and output of our N:1 transformation step as shown in figure below.


That’s all we need to follow for collecting IDOCs in BPM (N:1) .

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member
    Hi Pooja,

    Really nice detailed blog. 
    Can I ask why you did not set the ‘Block1’ attributes ‘Local Correlation’ = ‘CorrFileType’?


  2. Former Member

    Can you Please tell how the outbound IDoc will be mapped with Abstract Idoc. What will be the two messages in message mapping. Both will be the same IDOC or XSLT mapping will be enough. 

  3. Former Member
    Hi Pooja,
    I have implemented all the steps as you have mentioned but the scenario wasn’t working. It started to work only after introducing a control step within deadline branch which throws the time out exception. Is my interpretation wrong or did i miss something..
    1. Former Member Post author
      Hi Laawanya,

      Yes, a control step is needed in the deadline block. Thanks for your point. I will soon update the blog.

      Pooja Pandey


Leave a Reply