Debugging XML from ECC to SRM
This blog will show how to debug XML that are transferred from ECC to SRM in the below scenarios:
- XML is successfully transferred to SRM but some data information is not correctly mapped
- XML is in error and you need to know what is the error/cause/solution
To start here, let’s imagine the first scenario where a Purchase Requisition is transferred to SRM and the XML is successfully transmitted. Then, you want to check what is being created and mapped from the XML to the cart.
1- Go to tx SXMB_MONI in SRM system
2- Go to Monitor for Processed XML Messages
3- Look for the time frame and open the XML correspondent (Take note of the sender interface and sender namespace which should be http://sap.com/xi/SRM/SE/Global – PurchaseRequestERPSourcingRequest_In)
4- Go to the main document (under Inbound -> Payload) and right click in the XML (lower right window) -> select view source
5- Copy the XML that will open in notepad
6- Go to tx SPROXY
7- Look for the interface you want to debug (In this example: PurchaseRequestERPSourcingRequest_In) and run it
8- Run again
9- Click on XML editor and paste the XML captured in SXMB_MONI (view source)
10- Click on pretty printer and check the form (F9) – It shall give you a positive message saying that XML is well-formed
11- Change the XML content that you pasted in the XML editor in this field: <ID> PR NUMBER </ID> to another PR number (E.g. <ID>11656092 </ID>)
IMPORTANT: make sure this PR does not exist in SRM yet. You can look on BBP_PD to ensure that
12- Put a BP in methods from class /SAPSRM/CL_SOA_PUR_REQ (Suggestion: /SAPSRM/IF_SOA_PUR_REQ~PROCESS and /SAPSRM/IF_SOA_PUR_REQ~CREATE)
13- Execute the XML (F8) and start debugging it.
Now, let’s imagine the second scenario where a Purchase Requisition is transferred to SRM and the XML is in error at SRM side. Then, you want to check which/why error is happening in SRM side.
Follow all the steps above, except step 11. There is no need to change the PR number since the original document has not been created in SRM.
Some relevant class/methods that you can put a BP to debug are listed below:
- XML not updating the Shopping Cart Status:
- Updating Shopping Cart from Purchase Requisition:
- Purchase Requisition Mapping:
Additional debugging hints are also found in this KBA here.