Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
Showing results for 
Search instead for 
Did you mean: 
How to debug XML message received in SAP S4 from Transportation Management using SPROXY?


It is decision to use external SAP Transportation Management (SAP TM) and to integrate with two different SAP S4 systems with the focus at Logistics, Controlling, Finance.

SAP TM has a service-oriented architecture. The majority of communications between TM with other systems occur through XML messages.

Assuming, all BASIS actions are carried out and the connection is established, we can test and analyze the interface.

Selecting a scenario 

As an example, we will review the A2A Inbound service  TransportationOrderSUITEInvoicingPreparationRequest_In Receive create or change requests for supplier invoices in SAP ERP which represents Freight Settlement

This process consists of several steps:

  1. Send Freight Settlement Request to create Supplier Invoice: ext. SAP TM requests the creation of accruals ( creation of a service purchase order and service entry sheets) in SAP S4. It means the ). SAP S4 sends an update to ext. SAP TM as soon as the corresponding supplier invoice has been created.

  2. Receive Freight Settlement Confirmation: ext. SAP TM receives the confirmation from SAP S4 and updates the corresponding freight settlement document.

In our example, SAP S4 is the system waiting the service call from SAP TM side, when a call is executed, a message should be visible with the transaction SRT_MONI - WS Message Monitor (~ two applications communicate directly with one another without the use of a PI server ).

The processing status Transfered_to_Ext_App prompts that the original request could not be processed successfully and the response about the error was transferred back to ext. SAP TM.

On the other hand, if the XML message causes a short dump, open the short dump with the transaction ST22 and search for a variable named ID_XI_GUID. This variable will hold the MESSAGE ID for the XML message.

The aim will be to understand which data from the request and with which steps are processed, which BADI and enhancement points are available to fulfill customer requirements. 

Finding a web-service to repeat the request

Using the data from the request

the service definition can be found with the transaction SPROXY:

Running the service in the debug session

Prepare a file to simulate the request

We can take the record from the Monitor and export it into the file as XML file:

Change the message ID to be unique:

Run test for the service

Activate debug mode:

now we can execute implementation and analyze the request step-by-step:






Labels in this area