Exchange Infrastructure (XI)
Collect Multiple IDocs to File using BPM
in XI (Middleware)
IDoc types from Source system
of all we have to create <U>Data type</U> for the flat Receiver
as shown in figure
create <U>Message Type</U> for Target Data: EMP_MT_09 with data
type used emp_file_structure.
three <U>Message Interface</U> of type <U>Abstract
Asynchronous</U> for the IDOCs and two for the File as follows:
ZEMHDR_MI_ABS_09 (Abstract Asynchronous)
ZWKDET_MI_ABS_09 (Abstract Asynchronous)
ZCLDET_MI_ABS_09 (Abstract Asynchronous)
EMP_MI_ABS_09 (Abstract Asynchronous)
EMP_MI_IB_09 (Inbound Asynchronous)
three <u>Message Mapping</u> 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
mapping is for N:1 transformation. (Here input will be having three
different types of Abstract IDOCs and target will be having Abstract Target
Interface Mapping to replicate Business Partner data between two systems.
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
Let see the step by step BPM formation for collecting multiple IDOCs:
First of all create Container content as:
<u>CollectEmhdr</u> is used to retrieve Abstract form of IDOC type
<u>CollectEmhdrlist</u> is used to collect the IDOC of type
ZEMHDR.ZEMHDR02 , and so we have set its Multiline as true.
Same way for IDOCs of type ZWKDET.ZWKDET02 and ZCLDET.ZCLDET02 we defines the
container items as <u>CollectWkdet </u>and <u>Collectcldet</u>
For collecting them we again define <u>CollectWkdetlist</u> and
<u>CollectCldetlist</u> of type ZWKDET.ZWKDET02 and ZCLDET.ZCLDET02
respectively with their Multiline property as true.
we are going to collect three different types of IDOCs in our BPM, we
specify the Correlation as follows:
Let us name it as <u>CorrFileType</u>
set the value in <u>Properties</u> as follows:
Specify correlation field in XPath option. E.g here we are selecting
the<u> SSN</u> as our Correlation field.
Once we select the field we find the <u>XPath Expression</u> at
bottom as shown in figure.
way select the Correlation Field for all three IDOC types. And after
selection of values we can observe our Properties screen as exposed below:
it is time to toil with graphical editor. First step is to add <u>Block
step </u>to our BPM.
Set <u>Properties</u> of Block step as follows:
Give some Exception name in Exception Property. E.g TimeOut
<u>EXCEPTION Step</u> to BPM. We can insert this step by
Right clicking on Block and then select the <u>Insert</u> option
of menu and then select <u>Exception Branch </u>option of
submenu. The menu looks like as shown in figure below:
After adding the Exception Block we have to set its
<u>Properties</u> as shown in figure below:
(TimeOut is Exception name which we have given in our Block step)
<u>DEADLINE Step</u> in BPM. It can be added by selecting
the Deadline branch submenu from the menu option<u> “Insert of
It will look like as in figure below.
Set <u>Properties</u> of Deadline Step as follows:
We have to specify the <u>DURATION </u>property which depicts
the time for which the block processing will be done. (e.g 2 Minutes in our
in our paradigm, three different types of IDOCs going to be collected in BPM,
so we add <u>FORK step </u>in our BPM as exposed below:
Set the <u>Properties</u> of Fork step as follows:
As we need to have three different branches in our fork, we set the
<u>NECESSARY BRANCH </u>property as 3 as shown in figure below.
need to collect each type of IDOCs for some time duration (one which we have
specified in our deadline step). So we add <u>LOOP step </u>
in our fork branch, which enables to collect IDOCs for specified time
duration. Our BPM looks like:
Set the <u> Property</u> 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.
receive IDOCs into BPM we insert <u>RECEIVE step</u> (as
shown below). This will receive IDOC of ZMHDR02 type.
We set the <u>Properties</u> 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 CollectEmhdr, as
this Receive step will use to collect ZEMHDR.ZEMHDR02 IDOCs. Second property
we set here is the correlation; here we give name of correlation (CorrFileType)
which we have created in beginning.
<u>CONTAINER Operation step</u> in our BPM(as shown in
figure below). This Step facilitates collection of IDOCs which the Receive1
step has collected.
Set <u>Properties</u> of CONTAINER as follows:
In <u>Target Property</u> we specify the name where we want to
collect our IDOCs.
As shown in figure below we are selecting CollectEmhdrList which is of
Abstract type and whose Multiline property we have set as true.
<u>Operation Property</u> 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 <u>Expression </u> which
will specify the type of IDOC going to be collected by the CONTAINER. Here
our container will be collecting the ZEMHDR type of IDOC so we specify
Expression as CollectEmhdr which is again of the Abstract type of IDOC.
as ZEMDHR02 we have to add receive and container operation for ZWKDET02 and
For ZWKDET02: Receive2 and Container2
For ZCLDET02: Receive3 and Container3
As shown in figure below we find three branches in our fork and each branch
is collecting ZEMHDR02, ZWKDET02 and ZCLDET02 IDOCs respectively for the
time interval which we have specified in our deadline branch.
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 <u>TRANSFORMATION step </u>in the BPM. This step is
for the N:1 conversion. Our BPM will look like:
Set the <u>Properties</u> of TRANSFORMATION as follows:
<u>Interface Mapping property </u>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 <u>Source Messages </u>
property (In interface mapping program we have three input Abstract Data).We
then fill this value into CollectEmhdrList , CollectWkdetList,
CollectCldetList for ZEMHDR02, ZWKDET02, ZCLDET02 IDOCs respectively.
These Lists are output of Container Operations of Block.
In Third property of transformation we specify the <u>Target
Messages</u>. Here we set it as TargetFile which is of Abstract Target
Type as shown in figure below.
we complete the N:1 transformation of data a <u>SEND step</u>
follows. This is as stated in the figure below
We set the <u>Property</u> of Send as follows:
Set the <u>Message property</u> 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) in Integration
Configuration in Integration directory
follows from next page…..