Skip to Content
Technical Articles
Author's profile photo Malte Schluenz

Extract an iDoc structure from SAP ERP to utilize in SAP CPI

As we currently replace our SAP Business Connector with SAP CPI, we faced the question on how to get the iDoc structure out of SAP ERP to import into SAP CPIs message mapping and avoid to manually create that. After After our research we found a way which really helped us so that I want to share the details with you within this blog article.
In the end, it is a very easy to go procedure. For this example we use the SYSTAT01 iDoc which we need for this article. Nevertheless, it works with the other iDocs and also iDoc enhancements as well.

  1. After you have logged in into your SAP CRM/ERP, you access transaction WE60 and enter the iDoc name you want to download the XSD for.
    WE20%20screen
  2. Before submitting or something else you open in the menu bar the Documentation menu and select XML Schema.
    Select%20the%20documentation%20export
  3. You confirm that you want to export it as Unicode.
    Export%20as%20Unicode%20Dialog
  4. Now you see the XSD content. To download that, right click the screen and select View Source. An editor window opens and when you save that file as *.xsd, you have the XSD-structure of the iDoc.
    Result%20and%20source%20to%20export
  5. Upload the downloaded XSD-file to your SAP CPI message mapping component as source message.
    And its done. Now you can develop your CPI message mapping as every other message mapping and complete your development.

In case of any questions or remarks, I am happy to discuss these with you in the comments.

Best regards,
Malte

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Srihari Valluri
      Srihari Valluri

      Hi Malte,

      Here we can enter either basic type or message type but usally we need to import Cremas.cremas05 like that how can we achieve this. Please guide me.   Fyi we can use the we60 tcode as well for the same purpose.

      Thanks and Regards,

      Srihari.

      Author's profile photo Malte Schluenz
      Malte Schluenz
      Blog Post Author

      Hi Srihari,

      It was successful for me by just entering CREMAS05 to the Basic type field. Does that help you?

      Best regards,
      Malte

      Author's profile photo Srihari Valluri
      Srihari Valluri

      Thank you Malte. I could downloaded as expected.

      Author's profile photo Fatih Pense
      Fatih Pense

      Hello Malte, thanks again for sharing!

      I have been using ICA to get Idoc structures. I think this method is especially useful for enhancements(Z/Y Idocs) or you have to do manual XSD modification on an Idoc structure.

      It is also useful if you want to do quick graphical mappings or schema validation for enhanced Idocs.

      Best regards,
      Fatih

      Author's profile photo Raphael Lechner
      Raphael Lechner

      Hi Malte,

      thanks for sharing.

      Just one question: Is there a special reason why you didn't use the report SRT_IDOC_WSDL_NS to download the wsdl of the IDOC structure?

       

      Best regards,

      Raphael

      Author's profile photo Tibin Joseph
      Tibin Joseph

      One Point to add,

      IDOC segments with max occurs upto 99999 ( length 5)  is supported in CPI.

      minOccurs="0" maxOccurs="99999">

      So please replace anything more than 5 with unbounded.

      if minOccurs="0" maxOccurs="999999">

      replace it with if minOccurs="0" maxOccurs="unbounded">

      Author's profile photo Marjorie Mcclintock
      Marjorie Mcclintock

      I need to export the XSD file for an IDOC structure that has a custom extension.  Since the WE60 transaction has a single select option for the Basic type or the Extension, how do you get an XSD for the complete IDOC structure?

      Author's profile photo Marcelo García
      Marcelo García

      Hey!

      You just need to set the extension on WE60. It gets you the full idoc XSD including the parent nodes

       

      Regards

      Author's profile photo Imran Shaik
      Imran Shaik

      Hi,

      Can you please let me know how to download the structure for Inbound IDOC to S4? I need post the data into SAP S4 system using IDOC. Can you please help.

      Thanks!!