Purpose
This page is created to guide background workflow step debugging scenarios.
Overview
The following SAP Notes explained how to debug background workflow steps:
- 1731777 - Debugging background work items
- 1782731 - Instructions for debugging background steps
- 2197117 - Debugging of background work items
Starting from SAP Note 2197117, the debugging of background becomes much easier (simply set external breakpoints and then activate by transaction SWW_BREAKPOINT).
In this wiki page, we will focus on the solution from SAP Note 1731777.
Debugging Scenarios
Scenario 1 - You have an existing background step which got error/dumps during execution.
A. Create a new RFC destination using transaction SM59. This new RFC destination has the type "Logical Destination". The user field on the "Logon & Security" tab page is initial.
B. Then call transaction SMQS. Choose "Deregistration" and enter the name of the new RFC destination in the dialog box.
C. Use the workflow administration to set the value of the element '_RFC_DESTINATION' in the container of the background work item. Regarding how to change container value as workflow admin, see wiki page How to access workflow admin functions such as 'change container', 'Lock for execution' and so on.
D. Start the background work item using the workflow administration (SWIA).
E. After you start the background work item, call transaction SM58. You can use the name of your new RFC destination as a filter. The system displays a list with at least one entry. The entry has the "Transaction recorded" status.
F. You can now directly navigate to the debugger using "Edit -> Debug LUW".
Scenario 2 - Another way to debug work items in scenario 1.
A. Create a new RFC destination using transaction SM59. This new RFC destination has the type "Logical Destination". The user field on the "Logon & Security" tab page is initial.
B. Use the workflow administration to set the value of the element '_RFC_DESTINATION' in the container of the background work item. Regarding how to change container value as workflow admin, see wiki page How to access workflow admin functions such as 'change container', 'Lock for execution' and so on.
C. Set an external break-point in the application method. If you want to set an external break-point directly in the Business Object Repository (BOR) method, you can do this by entering the value 'PGES' directly in the OK code field.
Starting from SAP Note 2192237 - Support of external breakpoints in BOR objects, function of setting external breakpoints is available by default.
D. Start the background work item using the workflow administration (SWIA).
E. If sufficient free sessions are available, the system now displays a debugger window.
Scenario 3 - You want to debug a background work item before the first execution.
For this scenario, you have the option to set the value of the RFC destination in the workflow container. The workflow runtime system transfers the value to all new work items of this workflow that are created.
You can set the container value by container operation step or binding...
Related Content
Related Documents
SAP Community Wiki page How to access workflow admin functions such as 'change container', 'Lock for execution' and so on
Related SAP Notes/KBAs
SAP Note 2192237 - Support of external breakpoints in BOR objects
SAP Note 1731777 - Debugging background work items
SAP Note 1782731 - Instructions for debugging background steps
SAP Note 2197117 - Debugging of background work items