SAP BLOG How to debug A2A inbound service call from SAP TM in SAP S4

SAP Blog

Kayıtlı Üye
Katılım
22 Ara 2017
Mesajlar
1,925
Tepki puanı
7
Puanları
6
How to debug XML message received in SAP S4 from Transportation Management using SPROXY?

Context


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 ).

SRT_MONI-1.png


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

  • Receiver interface namespace: SAP Help Portal
  • Receiver interface operation: TransportationOrderSUITEInvoicingPreparationRequest_In

the service definition can be found with the transaction SPROXY:

SRT_MONI_3.png


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:

SRT_MONI_2.png


Change the message ID to be unique:

SRT_MONI_4.png


Run test for the service​


Activate debug mode:

ABAP-activate-debug.png


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

SRT_MONI_5.png


Okumaya devam et...
 
Üst