Purpose
This page describe the usage of the tool SPROXY to debug incoming XML messages in SUS.
Overview
- Selecting XML message
- Starting the Tool
- Debugging
- Debugging tips
Selecting XML message
To debug the incoming XML processing, you will need a failed or successful XML message. To identify such a message you can use transaction SXI_MONTIOR. Often the failed XML message will contain already some information about an error as described on this page, so that debugging will not be even necessary. If debugging is not avoidable please save the payload of the XML message as an XML file, as described on the referred Wiki page. Please also mark the receiver namespace and interface.
Starting the Tool
The tool you need for debugging the XML processing can be started with transaction SPROXY, which will display an Object Navigator similar to SE80 transaction:
Under Enterprise Service Repository you will be presented an object list for all the relevant software component versions installed on your system. Open the node for your version of SRM SERVER and search for the namespace and interface of your XML message. Once you find it please double-click the interface name which should bring up a screen similar as this:
Debugging
To be able to debug the XML message processing first you need to execute the proxy, by pressing the button. On the Test Service Provider screen please chose the 'Debug Method' options and press the 'Execute' button.
This will bring up the XML Display/Editor window pre-filled with a dummy XML content. To be able to debug your XML message first you will need to load the previously saved XML file by using the 'Load file' button.
To start debugging now press the 'Execute' (F8) button.
Debugging tips
It is not always straight forward to find out during debugging where a particular error is issued. Different kind of errors will be handled in different ways. The following program elements could be used to set a breakpoint to identify an error:
- Function Module
BBP_PD_ABORT
BBP_PD_MSG_ADD
BBP_MESSAGE_APPEND - Class
CX_BBP_PD_ABORT - Statement
CATCH
RAISE
You can use the built in editor in SPROXY transaction before executing an XML message debugging to change data in the XML. To simulate the behavior you could for example change, delivery date, prise, unit of measure, etc. for a Purchase Order XML. It will be necessary for example to change the backend PO number in the XML message if you want to debug the creation of a PO and the XML message has already been processed successfully, which means the SUS PO document has been already created on database level. In this case you can change the PO number to a fictional number in order a new PO can be created during XML debugging.
No comments:
Post a Comment