Skip to Content
Author's profile photo Amber Badam

Test Tools for Posting IDoc XML to SAP over HTTP

There are quite some and detailed posts on emulating the process to post IDoc xml over HTTP and also posting IDoc using SOAP protocol. However, there are times where we want to test these scenarios ourselves using some kind of tools/ Applications.  This document details on some of the various tools which we could use to post IDoc XML to sap.

IDoc xml over HTTP

You could follow the blog here from Grzegorz Glowacki for detailed step-by-step procedure to set up the configuration.

In nutshell these are the steps to post IDoc xml to SAP over HTTP:

  1. Maintain distribution model in BD64 & generate Inbound Partner Profiles. Use WE20 to set up partner profiles manually.
  2. Check HTTP is enabled ( which is true in almost every case ) . Tcode SMICM è GoTo è Services (Shift +f1). 
  3. Activate the idoc_xml service in SICF . Path /sap/bc/idoc_xml/   Virtaual Host is usually the default one.
  4. Ping http://[server]:[port]/sap/public/ping?sap-client=[client] to get response “Server reached successfully”.

Tools to post Idoc XML :

The UI is simple and straightforward. One could click and add additional custom headers & Authentication for the message easily.

Screen Shot 2015-07-03 at 15.47.07.png

Once you install the add on, click on the RESTCLIENT add on to trigger the below screen. Select Method “POST”  and enter the url as http://<server>:<port>/sap/bc/idoc_xml?sap-client=<client>

Screen Shot 2015-07-03 at 16.31.18.png

Click on the header and add the header as text/xml and click on Authentication to add the basic authentication as below.

Screen Shot 2015-07-03 at 16.30.18.png

Once you enter the above details and press “SEND” to post the XML to SAP. You should get response as “IDoc-XML-inbound ok”.

Screen Shot 2015-07-03 at 16.30.57.png

IDoc is successfully posted as shown below.

Screen Shot 2015-07-03 at 16.44.31.png

WE05 / WE09 in SAP:

Screen Shot 2015-07-03 at 16.47.15.png

  • Google Chrome with Postman addon by with better UI and more features like the possibility to run scripts before request is called and save test cases etc. I like this personally because of the ease of the UI and the possibility to see the History. The working of this tool is similar to REST CLIENT add-on on Mozilla.

Screen Shot 2015-07-03 at 16.07.44.png

Enter the URL/ Endpoint along with selecting basic authorization. Select the format as text/xml in the headers and press SEND to post the IDoc to SAP. Status code 200 represents a successful posting to SAP.

Screen Shot 2015-07-03 at 16.07.01.png


SoapUI is a free and open source cross-platform for testing SOAP and REST services. It has got easy-to-use graphical interface , enterprise-class features and has multiple options  when it comes to creating test scenarios. More about SOAP UI here. Download latest version of SOAP UI from here

First step would to create a new REST project as shown below. Click on new REST project and input the endpoint/URL where the IDoc needs to be posted to:



Screen Shot 2015-07-06 at 10.37.50.png

Enter the URL and press enter.

Screen Shot 2015-07-06 at 13.25.16.png

Choose the authentication as Basic and select the Authenticate pre-emptively option.

Screen Shot 2015-07-03 at 17.05.23.png

Now choose the method as “POST” along with selecting the media type as text/xml as shown below. Copy paste the IDoc xml with out any whitespaces and paragraph breaks into the REQUEST /INPUT window as shown below and press on submit.

Screen Shot 2015-07-06 at 13.31.03.png

When the IDoc is successfully received at the recipient SAP system, following success message is shown in SOAPUI.

Screen Shot 2015-07-03 at 17.04.48.png

Important points:

  • Use textfixer to remove the white spaces between the tags and paragraphs in the xml. Formatted XML should like the one below:


  • Always use the addition encoding=”UTF-8″ in the xml message.
  • Some times you get error “IDoc ‘0000000000000000’ has already been received, therefore reception is refused”. To over come this error message, you need to put an external break-point in the include LEDINF10 after the select statement on SRRELROLES. Now make the retrun code to “1” after the select on SRRELROLES , to post the Idoc with out any error.  The cause of the error (“I think”) could be due to inconsistency in buffer refresh.  Every time an IDoc is posted from one of the above tools, SAP tries to select an IDoc with number 0000000000000000 from SRRELROLES, which seems to always exist and eventually the error.

Screen Shot 2015-07-03 at 16.29.55.png

Fix as described above:

Screen Shot 2015-07-03 at 16.43.23.png

  • You could use function module IDOC_XML_TRANSFORM to transform an existing IDoc into XML format.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Carlos Duarte
      Carlos Duarte


      Whe think that when we send an XML IDoc to SAP ERP the element <DOCNUM> must have the IDOC number in the source system or one unique number, for example to avoid duplicates and to link the 2 IDocs with differents numbers, the outbound in source system and inbound in target . If that element is empty or does not exist then the SAP system assigns "00000.." (16 zeros) and this is the reason for the error mentioned in the blog.

      We can avoid this validation in transaction WENOLINKS, for example if we don't need  later to reconstruct  the document flow.

      Also see:

      Thanks, CD