Converting IDocs to XML format

In this tip, learn how to convert IDocs into XML format for use in the SAP Exchange Infrastructure (XI) and additional applications.

This article details the step-by-step conversion of IDocs into XML format for further use in XI or any other application....

It is assumed that the reader of this article has some knowledge in ALE, IDocs and change pointers.


Conversion of the Material IDoc (Message type: MATMAS) to XML format and storage of the same in the application server of SAP.


Change pointers are used for sending IDocs for master data like Material Master. To work with change pointers, the following two steps have to be performed:


  • Turn on the change pointer update
  • Provide the message types to be included for change pointer updates.

To do the above configurations:
TCode: SALE -> IDoc Interface / Application Link Enabling (SALE) -> Modeling and Implementing Business Processes -> Master Data Distribution -> Replication of Master Data

ALE configuration steps


  1. Create a logical system for the sender system
  2. Assign the logical system to the client
  3. Create a logical system for the recipient
  4. Create RFC destination (Connection type:TCP/IP)

  6. Create the model view (TCode: BD64)

  8. Save the Model View and Generate Partner Profiles.
  9. There might be a problem with the automatic port creation. The port may need to be created manually.
  10. Create an XML Port from the transaction WE21 (Port type: XML File).
  11. Directory is the path on the application server. The Function Module is used for file naming conventions. Any of the SAP-provided function modules could be used for this (Use F4 help to check on this) or you could create a custom function module for any other naming conventions. In the outbound trigger tab, mention the RFC destination created earlier.


  12. Make an entry in the partner profile generated earlier for message type MATMAS.


  13. A background job needs to be scheduled for a periodic run (interval as required) for the program RBDMIDOC with the message type MATMAS.
  14. Depending on the settings in the partner profiles, it may be necessary to send IDocs directly by executing the program RSEOUT00 (if the setting is to "Collect IDocs")

Test the above scenario by creating a material using MM01. An XML file would have been created in the directory specified in the XML port. The file could be downloaded onto the front-end system using the transaction CG3Y.

Dig Deeper on SAP UX

Data Management
Business Analytics
Content Management