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

Inbound IDOC using XML


I need to create an Inbound IDOC using Function modules using an XML file as Input.

I am using mySAP ERP 2004(WAS 6.4).

IDOC type : HRMD_A05

Message Type : HRMD.

I am using the FM's in an ABAP report for testing, reading the data from the XML File using the FM GUI_UPLOAD .

I tried using the FM <b>IDOC_INBOUND_XML_VIA_HTTP</b>,with import parameters XML_STREAM, CONTENT_LENGTH, CONTENT_TYPE, REMOTE_ADDR.(ALL Type Strings)

This FM creates the IDOC successfully but i do not get the status record for the IDOC as there are no export parameters or tables where i can get the value.

I am trying using the FM <b>IDOC_INBOUND_XML_SOAP_HTTP</b>,with import Parameters as <b>XML_STREAM type XSTRING</b>,and there is the export parameter ASSIGN ,type IDOC_ASSIGN_TAB and i was wondering if this could return the status.

I used the same XML and used the FM "SCMS_STRING_TO_XSTRING", to convert the file input string into XSTRING.

On executing this i get the exception,"NO DATA RECEIVED" .

Can anybody Please Tell me

1)How to get the status of an IDOC if i use the FM IDOC_INBOUND_XML_VIA_HTTP ?


3)Is there any other way to create an IDOC with XML input?



Siddhartha Jain

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 12, 2006 at 02:40 PM

    Hi Siddhartha,

    I feel if you can just copy the FM to a Z FM and then return the value of idoc number from the FM, that i feel will solve your problem because then you can select from EDIDC and get the status.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI Sidharth,

      Thanks for replying.

      Using The FM IDOC_INBOUND_XML_VIA_HTTP,i can post the IDOC via XML string,but i do not get the document number of the generated IDOC.I thought of explicitly checking the status from the EDIDC table,but due to unavailabilty of DOCUMENT number,the primary key ,the option left to get the DOCNUMBER and STATUS would be using the create date and create time along with other parameters.

      What i did was,

      1)Read XML using GUI_UPLOAD.

      2)Create IDOC using


      3)Read status as:

      SELECT * FROM EDIDC INTO TABLE Idoc_cntrl_rec_40



      DIRECT = '2' AND



      SNDPRT = 'LS' AND


      RCVPRT = 'LS' AND


      CREDAT = sy-datum.

      But this might give a problem as this FM would be called from an application,accessed by many users simultaneously and it might create more than one IDOC at the same time.I mean can we be sure that we get the Correct/Relevant IDOC Number and Status using this method ?

      Please correct me if i'm wrong.

      So,i was thinking of using the FM IDOC_INBOUND_XML_SOAP_HTTP ,which has an Export parameter,which might give the status.

      Any IDeas?




  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2006 at 07:53 AM

    Hi Siddartha,

    Check out this link for using xml in idoc's.

    Displaying xml msg in idoc:

    Hope this helps u,



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      Did you ever get this working. I want to post IDOC as a xml from WebLogic (BEA Web/App Server). Did you ever get this working? I got the BAPI through WebService from BEA Web/App Server. I want to do the same with IDOC. If I can do the same with WebService and you have any pointer that would be helpful too.


      Sanjay Amin

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.