Exchange Infrastructure (XI)

Collect Multiple IDocs to File using BPM

Previous..

Design/Configuration in XI (Middleware)

  1. Import IDoc types from Source system
  2. First of all we have to create <U>Data type</U> for the flat Receiver as shown in figure

 

  1. Then create <U>Message Type</U> for Target Data: EMP_MT_09 with data type used emp_file_structure.
  2. Create three <U>Message Interface</U> of type <U>Abstract Asynchronous</U> for the IDOCs and two for the File as follows:

Message Interface

Message Type

ZEMHDR_MI_ABS_09 (Abstract Asynchronous)

ZEMHDR.ZEMHDR02

ZWKDET_MI_ABS_09 (Abstract Asynchronous)

ZWKDET.ZWKDET02

ZCLDET_MI_ABS_09 (Abstract Asynchronous)

ZCLDET.ZCLDET02

EMP_MI_ABS_09 (Abstract Asynchronous)

EMP_MT_09

EMP_MI_IB_09 (Inbound Asynchronous)

EMP_MT_09

  1. Create 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 follows:

ZEMHDR_MM_TO_ZEMHDR_ABS

ZWKDET_MM_TO_ZWKDET_ABS

ZCLDET_MM_TO_ZCLDET_ABS

  1. 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)

ZEMP_TO_ZEMP_ABS

ZEMHDR.ZEMHDR02

ZEMP_MT_09

ZWKDET.ZWKDET02

ZCLDET.ZCLDET02

  1. Create Interface Mapping to replicate Business Partner data between two systems.

ZEMHDR_MI_ABS_09

ZEMP_MI_ABS_09

ZWKDET_MI_ABS_09

ZCLDET_MI_ABS_09

  1. 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:

First of all create Container content as:

<u>CollectEmhdr</u> is used to retrieve Abstract form of IDOC type ZEMHDR.ZEMHDR02.
<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> respectively.
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.

  1. 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 <u>CorrFileType</u>

  1. We 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.

  1. 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:

  1. Now it is time to toil with graphical editor. First step is to add <u>Block step </u>to our BPM.


    image

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


    image
  2. Add <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:

image

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)


image

  1. Add <u>DEADLINE Step</u> in BPM. It can be added by selecting the Deadline branch submenu from the menu option<u> “Insert of Block”</u>.
    It will look like as in figure below.
    image

    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 example).

    image
  2. As 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:

    image

    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.


    image
  3. We 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:
    image

    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.


    image
  4. To receive IDOCs into BPM we insert <u>RECEIVE step</u> (as shown below). This will receive IDOC of ZMHDR02 type.

    image
    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.

 

  1. Add <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.
    image

    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.

  1. Same as ZEMDHR02 we have to add receive and container operation for ZWKDET02 and ZCLDET02 also.

    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.

    image
  2. 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 <u>TRANSFORMATION step </u>in the BPM. This step is for the N:1 conversion. Our BPM will look like:
    image

    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.

  1. Once we complete the N:1 transformation of data a <u>SEND step</u> follows. This is as stated in the figure below



    image

    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 Repository.

Configuration in Integration directory follows from next page…..

contd..


 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image