You are on page 1of 12

Monitoring and Debugging XML Messages in SAP SRM 7.

0 System

Applies to:
SAP SRM 7.0. For more information, visit the Supplier Relationship Management homepage.

Summary
The article describes the procedure to monitor as well as debug the failed XML messages in SAP SRM system. In this scenario, data migration is from SAP R/3 (ECC 6.0) to SAP SRM 7.0 via SAP XI. Author: Saba Sayed

Created on: 12 September 2009

Author Bio
Saba Sayed is a SAP certified NetWeaver ABAP Consultant. She has approximately four years of SAP experience and has worked extensively in ABAP, OO ABAP, Workflow and ALE/IDoc. She has worked on SAP R/3 as well as SAP SRM systems.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 1

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

Table of Contents
1. 2. 3. 4. 5. 6. 6.1 6.2 Business Requirement........................................................................................................................... 3 Definition ................................................................................................................................................ 3 Navigation .............................................................................................................................................. 3 Transactions .......................................................................................................................................... 3 Issue ...................................................................................................................................................... 4 Step by step procedure.......................................................................................................................... 4 Monitoring XML messages .................................................................................................................... 4 Debugging failed XML messages .......................................................................................................... 6

Related Content ................................................................................................................................................ 11 Disclaimer and Liability Notice .......................................................................................................................... 12

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 2

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

1. Business Requirement
i) Monitor XML message flow between the sender and the receiver systems via SAP XI. ii) Track and debug failed XML messages (Please note: In this case, SAP SRM 7.0 is the receiving system, SAP R/3 is the sending system and SAP XI is a middleware that connects both the system. Failure is at receiving end, so, we will have to monitor and debug its cause in SRM system.)

2. Definition
SAP Exchange Infrastructure The SAP Exchange Infrastructure (SAP XI) is a middleware that enables you to connect SAP and non SAP systems with each other in a heterogeneous system landscape and transform message content between sender and receiver systems, for example between an SRM document and a Document Builder document. Both systems are connected to SAP XI by means of special classes called proxies. Exchanging XML Messages The core of the SAP XI infrastructure is a message-oriented communication based on Hyper Text Transfer Protocol (HTTP). Business content is transferred in the form of eXtensible Markup Language (XML) messages. The structure of a message is determined by the interface data structure that is used. For detailed information please check the below link: SAP Exchange Infrastructure

3. Navigation
SAP NetWeaver > Process Integration > SAP Exchange Infrastructure > Runtime > Integration Engine > Monitoring > Monitor for Processed XML Messages.

4. Transactions
Monitoring XML Messages - SXMB_MONI ABAP Proxy generation SPROXY

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 3

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

5. Issue
Data migration failed at the receiving end. We will have to analyze the error and its cause by monitoring and then debugging the failed XML message at the receiving end i.e. SRM system.

6. Step by step procedure


6.1 Monitoring XML messages
a. Go to transaction SXMB_MONI to monitor XML messages. Click on execute button.

It will navigate to the following screen:

b. Red flag means there is an error in XML message.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 4

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

Select the message and click on Error Information pushbutton (as shown in the above picture) to check the error message only. c. Now, to display the entire message in detail, either double click on the message or click on Display pushbutton as shown below.

Following screen will appear:

d. Select Trace (Call Inbound Proxy -> SOAP Header -> Trace) to check the error description on the right-hand side.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 5

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

e. Under Payloads Main Document, you will get the main record detail (i.e. posted from IDOC).

f.

Get the Receiver namespace and interface details.

g. You can reprocess the error message by clicking on Restart button as shown in figure e.

6.2 Debugging failed XML messages


a. Go to transaction SPROXY to check the service details. Select the respective node and interface (from 7.1 point f) on the left-hand side.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 6

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

On the right-hand side, double click the Provider Class name. It will navigate you to the class interface screen as seen below:

b. On double clicking the method name (under Methods tab), you will get the executing code where you could place a breakpoint, in order to debug the message. c. You can debug the message from SPROXY transaction by clicking on Test (F8) button on Application toolbar (first screen).

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 7

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

d. Following dialog screen will appear:

e. Select the respective inputs and execute. It will navigate you to the XML message screen.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 8

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

f.

Click on XML Editor from application toolbar (4 button from left). Copy the message from Main Document (SXMB_MONI transaction code) and paste it here. Save the data and then execute the record. (By copying the failed message directly in your editor, you are ready to debug that particular record. This will save your time and efforts.)

th

g. Since you have set a breakpoint in the code (step b), following debugging screen will appear. Now you can debug the code and analyze the error and its cause. Accordingly, you can take necessary actions for its resolution.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 9

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 10

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

Related Content
SAP Exchange Infrastructure Sending an IDoc through XI Failed Problem Description SAP Exchange Infrastructure

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 11

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 12

You might also like