The ultimate site for SAP XI certification and tutorial resources. Submit tutorials/scenarios and get assured gifts!!! For more info click here...

gift

scenario - multiple idocs to file

Author : Hemanth Konduru
This document covers the basic steps that are to be followed in BPM for collecting multiple IDOCs and sending it in form of flat file.

SCENARIO

image


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

ISU_UKGAS_NOM1
ISU_UKGAS_NOM2
ISU_UKGAS_NOM3.

Our NOM1 type IDOC has the following structure :
image
NOM2 type :

image

NOM3 type :

image

First of all create the idocs in the R/3(source) system and then import the idoc to the IR(Design)

  • Goto your SWCV,under that u can see imported objects
  • Expand that ,under that click on idocs and select import IDOC
  • U will be opened with a wizard,just press continue and then in the third step select the idocs u want  to import and then cliock finish.

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:


image

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) (Use MT: ISU_UKGAS_NOM1)
MI_ISU_UKGAS_NOM2_ABS (Abstract Asynchronous) (Use MT: ISU_UKGAS_NOM2)
MI_ISU_UKGAS_NOM3_ABS (Abstract Asynchronous) (Use MT: ISU_UKGAS_NOM3)
MI_NOM_ABS (Abstract Asynchronous) (Use MT: MT_NOM)
MI_NOM_IB (Inbound Asynchronous) (Use MT: MT_NOM)

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:
(i) MM_ISU_UKGAS_NOM1_to_NOM1_ABS
(ii) MM_ISU_UKGAS_NOM2_to_NOM2_ABS
(iii) MM_ISU_UKGAS_NOM3_to_NOM3_ABS

SOURCE

TARGET

ISU_UKGAS_NOM1

MT_NOM

ISU_UKGAS_NOM2

ISU_UKGAS_NOM3

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)
(iv) MM_ISU_UKGAS_NOM_to_NOM_ABS

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)

_______________________________Next page>>