Building the message model for the IDOC parser

The ALE IDoc messages that are sent to, and received from, SAP applications using the WebSphere® MQ Link for R3, can be processed by the IDOC parser, which requires a message model to interpret the data correctly. This topic describes how to build the message model.

Before you start:

Obtain SupportPac™ IA0F, which contains detailed instructions to help with the creation of message sets for the IDOC parser.

Obtaining the IDoc

Create an import file of the required IDoc data for the Message Brokers Toolkit.
  1. Log on to a 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. Select System->List->Save->Local file.
    6. Click unconverted.
    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.
  3. Use the Java™ utility IDocHeaderTweak in SupportPac IA0F, to ensure that the format of the output file that you have created is correct for importing into the Message Brokers Toolkit.

Modeling the IDoc

Create your message model.

  1. Switch to the Broker Application Development perspective of the Message Brokers Toolkit.
  2. Use the New Message Set wizard to create a message set for your IDoc. Select binary data as the kind of data to be used. This creates a message set with a Custom Wire Format (CWF) physical format, and presets the Default message domain property to MRM.
  3. Use the Message Set editor to change the Default message domain property to IDOC.
  4. Use the New Message Definition File wizard to import a prebuilt model of the ALE IDoc message structure. To start the wizard, click File > New > Message Definition File From. When the wizard opens, select IBM supplied message, then SAP ALE IDoc. This SAP ALE IDoc prebuilt model includes definitions of the DC and DD segments. The resulting message definition file is called idoc.xsd. For information about using the New Message Definition File wizard, see Importing from IBM supplied messages.
  5. Use the New Message Definition File wizard, or the mqsicreatemsgdefs command, to import the C representation of the IDoc into the new message set. To start the wizard, click File > New > Message Definition File From.
    Specify the following settings:
    • Select C Header file.
    • 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 New Message Definition File From C Header File wizard, see Importing from C.
  6. Rename each message to be the name of the segment that it represents. The name must be in uppercase characters. For example, for a segment called E2MARAMM, name the message E2MARAMM. You can use the Java utility IDocHeaderTweak in SupportPac IA0F to do this.

Add the message set to a broker archive (BAR) file and deploy the BAR file to a broker execution group. The IDOC parser uses the MRM parser to parse the IDoc segments that you have defined.

The Message Domain property, the message set name, and the Custom Wire Format name, are used when you create a message flow to process an IDoc. These names appear as the values of the Message Domain, Message Set, and Message Format properties of an MQInput node. Do not supply a Message Type property on the MQInput node because the IDOC parser uses the contents of the SAP-defined IDoc DD field segnam to provide the name of the message.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:20:27

ac20030_