Converting IDocs to XML format

Converting IDocs to XML format

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.

Scenario

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

Approach

    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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)
  5.  

  6. Create the model view (TCode: BD64)
  7.  

  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.
 

This was first published in December 2006

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.