Skip to Content
Author's profile photo Raghunathan Balasubramanian

IDocs and BODS – Message Variant


IDoc processing using BODS is used for both real-time and batch processing of data. IDocs are increasingly used for both data migration and data integration.

There is hence a possibility for IDocs from one stream/process overlap another thus reating a need for ensuring that specific groups of IDocs from a given process/program. Message Variants come in handy under these circumstances to be able to group the IDocs from a specific process or even a specific BODS Job execution.

Steps to Define Message Variant

Message Variants can be defined for IDocs in their partner profile for the given message type. In the example below message variant definition for IDoc message type “CRMXIF_PARTNER_SAVE” in SAP CRM. The example demonstrates the message variant creation from Inbound Parameter. The same can be performed for Outbound Parameter too.

To open and maintain the Partner Profiles use transaction code WE20.

In Fig1 below, the message type “CRMXIF_PARTNER_SAVE” does not have a message variant defined.


Hence reviewing the IDocs that were generated by a BODS job for a given execution of the BODS job becomes difficult as the number of IDocs generated can only be filtered using the created time stamps and sender partner profile. As the same partner profile is usually used by BODS jobs it is hence useful to have message variants defined.

In order to add message variant for the IDoc message Type click on the “Create Inbound Partner” button on the maintain partner profile screen as shown in Fig2 below.


In the “Partner profiles: Inbound parameters” screen enter the parameters as shown in Fig3 below.


The message code holds the message variant value. The Message Variant can be three characters long. Any combination of unique three characters (alphanumeric) can be used for defining the Message Variant. Fig4 below shows the created Message Variant under the inbound parameters.


Use Message Variant in BODS

The defined message variant can be used in BODS either as a constant value in the MESCOD mapping or as a global variable.

View IDocs by the message variant

The IDocs created using this message variant can be viewed using the WE02 transaction either for a given timestamp range and sender partner or for the entire IDocs list generated. A screenshot of the parameter options in the WE02 transaction code is shown below in Fig5.


The same message variant value can be used in filtering the list IDocs in table EDIDC to filter the list of IDocs generated under this Message variant for the givene Message Type and Partner Number. If partner and number and message type are not specified the same message code if used in more than one partner profile or message type can produce results that contain IDocs not generated by the specific BODS job.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member


      This is a good document. We use batch processing of IDocs for data migration and especially the CRMD_ORDER_SAVE IDoc for CRM transaction objects like service contracts, service orders, service requests etc., We initially had serious issues with overlapping IDocs and how to isolate individual sets by data migration object. We then used message variants which was very handy as we were almost at the verge of creating separate partner profiles to handle each DM object.

      Author's profile photo Raghunathan Balasubramanian
      Raghunathan Balasubramanian
      Blog Post Author

      Hi Suresh,

      We were in a similar situation once. Interesting to note that I was not the only one teetering on the verge of creating multiple partner files.


      Author's profile photo Former Member
      Former Member

      Interesting document.