Building the MRM TDS model for an IDoc

The MRM domain Tagged/Delimited String (TDS) physical format is suitable for parsing and writing SAP ALE IDocs and SAP File IDocs. ALE IDoc messages are exported from SAP across the WebSphere® MQ Link for R3. File IDocs are exported from SAP to the file system.

About this task

This topic describes how to build the message model that is required by the MRM parser when parsing and writing SAP ALE and File IDocs using its TDS physical format.

Obtaining the IDoc

About this task

Create an import file of the required IDoc data for the IBM® Integration Toolkit.

Procedure

  1. Log on to an SAP system.
  2. Run the supplied transaction we60, which extracts the IDoc data as a C header file.
    1. In Basic Type, select the IDoc type of interest; for example, MATMAS02.
    2. Leave the Control, Data, and Status check boxes cleared.
    3. Select the Record types version. A version 4 IDoc is type 3.
    4. Press F7 to display a C representation of the IDoc.
    5. Click unconverted.
    6. Select System > List > Save > Local file.
    7. When prompted, enter a file name and directory for the output from the transaction.
      The C representation of the IDoc is saved to this C header file.

What to do next

Tip: The exported C header can be imported into the IBM Integration Toolkit without any further manual processing.

Modeling the IDoc

About this task

Create your message model.

Procedure

  1. Switch to the Integration Development perspective of the IBM Integration Toolkit.
  2. Use the New Message Set wizard to create a message set for your IDoc. Select text data as the data to use. This action creates a Tagged/Delimited String Format (TDS) physical format, and presets the Default message domain property to MRM.
  3. Use the Message Set editor to rename the TDS physical format to Text_IDoc.
  4. Use the New Message Definition File From IBM supplied message wizard to import a prebuilt model of the overall ALE or File IDoc message structure.
    This model includes definitions of the DC and DD segments. The prebuilt models are called SAP ALE IDoc and SAP File IDoc. The resultant message definition file is called ale_idoc.mxsd or file_idoc.mxsd. For information about using the New Message Definition File From IBM supplied message wizard, see Message Sets: Importing from IBM supplied messages.
  5. Use the New Message Definition File From C Header File wizard, or the mqsicreatemsgdefs command, to import the C representation of the IDoc into the new message set.
    Specify the following settings:
    • Set the Pre-processing option to SAP ALE IDoc or SAP File IDoc. If this option is not specified, the C header is not imported.
    • Create messages for the segments that appear in the IDoc.
    • Use the String Encoding option to import character arrays as fixed-length strings.
    • Use the Padding Char for String option to make space ( ) the padding character that is used.
    For information about using the wizard, see Message Sets: Importing from C.

Using the IDoc message model

About this task

You can now use your message model to help you to construct a message flow that processes instances of your IDoc message, in the same way as any other message that belongs to the MRM domain.

Tip: SupportPac IA0F contains a more detailed description of the steps involved in building the IDoc message model. You can ignore utilities IDocHeaderTweak and IDocMsgSetTweak because that processing has been incorporated into the New Message Definition File From C Header File wizard.