Skip to Content
author's profile photo Former Member
Former Member

Retrieve IDoc schema via a service call

Hi,

I'm aware the schema for an IDoc type can be generated from WE60. I'm wondering if the same can be accessed either via a service call (HTTP/SOAP) to the SAP system or by executing a function module using JCo. I'm also aware of IDOCTYPE_READ_COMPLETE function module that can return the structure of the IDoc. But then I will have to parse this structure and create the schema myself if I were to call it from a Java application. Is there an easier way to achieve this.

Thanks,

Praneeth

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2015 at 08:16 AM

    Hi Praneeth,

    If schema needs to get for SAP PI systems, then we can import directly to PI ESR.

    If requirement is to provide schema to other systems, then i think you can have option 'Export XSD' in WE60.

    Also check standard BAPI's like BAPI_PO_CREATE1

    Or

    look at the service at trnsaction SICF

    sap/bc/idoc_xml

    to this node the external application can post XML document (IDOC in xml format).

    Regards,prasanth

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Prasanth for your reply. I'm able to generate the XSD from WE60. Also, I'm aware of the service sap/bc/idoc_xml. My requirement is to connect to SAP system from a Java application and retrieve the XSD for a given IDoc type. I will then use this XSD to create data model in my non-SAP system. At runtime, based on the values set by the user on my data model, I will generate the XML and POST it to sap/bc/idoc_xml.

      I'm looking for ways to retrieve the XSD from Java either using an HTTP call or an RFC call using JCo library. I do not want someone to manually download the XSD from the SAP system and feed it into my non-SAP system to generate the data model.

      Hope you get my question.

      Thanks,

      Praneeth

  • author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2015 at 02:33 PM

    Have a look at FM SDIXML_IDOC_TO_SCHEMA and it´s usage

    br

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.