srm xml message debug

12
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1 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.

Upload: mabelend

Post on 28-Oct-2014

99 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: SRM XML Message Debug

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 1

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.

Page 2: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 2

Table of Contents

1. Business Requirement ........................................................................................................................... 3

2. Definition ................................................................................................................................................ 3

3. Navigation .............................................................................................................................................. 3

4. Transactions .......................................................................................................................................... 3

5. Issue ...................................................................................................................................................... 4

6. Step by step procedure.......................................................................................................................... 4

6.1 Monitoring XML messages .................................................................................................................... 4

6.2 Debugging failed XML messages .......................................................................................................... 6

Related Content ................................................................................................................................................ 11

Disclaimer and Liability Notice .......................................................................................................................... 12

Page 3: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 3

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

Page 4: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 4

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.

Page 5: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 5

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.

Page 6: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 6

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.

Page 7: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 7

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

Page 8: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 8

d. Following dialog screen will appear:

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

Page 9: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 9

f. Click on ‘XML Editor’ from application toolbar (4th 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.)

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.

Page 10: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 10

Page 11: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 11

Related Content

SAP Exchange Infrastructure

Sending an IDoc through XI Failed Problem Description

SAP Exchange Infrastructure

Page 12: SRM XML Message Debug

Monitoring and Debugging XML Messages in SAP SRM 7.0 system

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 12

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.