Start of Content Area

Procedure documentation Using the Component Trace  Locate the document in its SAP Library structure

Use

The component trace is a trace that you can use for SAP Business Workflow as well as for other components.

The trace records detailed technical runtime information that you can use to analyze errors. To be able to interpret the trace, you must have detailed knowledge of the relevant component. The trace is mainly used by SAP Support.

Caution

When the trace is activated, a large amount of data is amassed in a short period of time. This also affects performance. Ensure that you specify an appropriate duration for recording trace data, and remember to deactivate the trace once you have finished analyzing any errors. Delete all trace files that you no longer require.

System trace

You cannot make changes to a trace created by the system. For example, you cannot activate or deactivate a system trace. All you can do is delete the trace files when you no longer require them.

Prerequisites

You are assigned the role SAP_BC_BMT_WFM_DEVELOPER or SAP_BC_XI_ADMINISTRATOR_ABAP.

Create, Activate, and Analyze the Trace

       1.      Call transaction SWF_TRC.

Use this transaction to create a trace for component BC-BMT-WFM (SAP Business Workflow). To create a trace for a different component, call transaction SWF_TRC_SEL. Note that you require the appropriate authorization to call transaction SWF_TRC_SEL.

       2.      Create a trace for an object or a package:

       Trace for an object:

                                                  i.       Choose the icon with the quick info Create Trace ® Create Trace.

The screen that is displayed depends on the component of the selected object.

                                                ii.       Enter the required object, for example, the workflow definition.

The system creates the trace as a pattern. The system uses the pattern when the instances for the workflow definition to be traced are created.

                                               iii.       Specify whether the system is to start the trace for the next instance only, for all instances, or for just a specific number of instances. 

For example, if you want the system to record the next two instances of the specified workflow definition, select Number of Instances and enter 2 as the number.

       Trace for a Package:

...

                                                  i.       Choose the icon with the quick info Create Trace ® Create Trace for Package.

The screen that is displayed depends on the component of the selected package.

       3.      In the Trace Level field, select the level of the data to be traced.

The more data the trace logs, the more information is available for analysis. However, the amount of resources required also increases.

       4.      Specify when the system is to activate or deactivate the trace. By specifying this period, you can control when the trace information is recorded. You can also specify an expiry date to indicate when the trace will probably no longer be required. If you specify an expiry date, you can delete all expired traces in one step. 

       To activate the trace immediately, in the Activate Trace From field, choose the current time (default).

       To activate the trace at a different time, in the Activate Trace From field, enter the required time.

       To specify when the system is to deactivate the trace, in the Trace Activated Until field, specify the required time.

       To specify the expiry date, enter the required date in the Delete Trace From.

The trace is added to the trace catalog and is displayed in a new line.

Interpret Display

       5.      Check the display.

If the trace contains sub elements, they are displayed in a sub structure. An example of such a sub element would be a sub workflow.

Column Local: This indicator is remains set until the system has defined an instance ID (for example a work item ID) for an object that is to be traced (for example, a workflow).

Activate Trace for Sub Objects

       6.      If you also want to trace sub objects, such as sub workflows, in the relevant line, choose the icon with the quick info Propagate to Sub Objects.

Activate/Deactivate Trace

When the trace is activated, the system records trace entries. If the trace is deactivated, the system does not record any trace entries.

You can manually activate or deactivate a trace at any time.

       7.      To activate a trace, in the line for the relevant trace, choose the button for switching between Active and Inactive.

If the previous activation time is in the future, the system automatically changes it to the current time.

If the previous activation time was in the past, the system automatically changes the activation period to the next 24 hours. 

       8.      To deactivate a trace, in the line for the relevant trace, choose the button for switching between Active and Inactive.

Note that this does not alter the activation period.

Analyze Trace Data

       9.      To display the data in a trace, double-click the relevant trace.

The trace data is displayed in the lower part of the screen.

The entries are sorted by time. If more than one entry has the same time, the entry in the Index column tells you which entry was written first.

   10.      To display detailed information about a specific entry, such as the container contents, double-click the relevant entry.

Display Trace

Call transaction SWF_TRC_SEL and enter the selection criteria for the trace you want to display.

If there are lots of traces, SAP recommends that you reduce the maximum number of traces to be displayed. The traces to be displayed are then selected at random until the maximum number is reached. 

Caution

If you enter a maximum number, it is possible that not all subelements of a trace will be displayed. If you delete the higher-level element, all subelements are also deleted, even if they are not displayed.

Activate/Deactivate Traces Centrally

To avoid performance problems, you can check centrally for which components the trace is activated. To optimize resource consumption, only activate those traces that are currently required and deactivate the trace for all other components. You cannot deactivate specific traces.

   11.      Call transaction SWF_TRC_SEL.

   12.      Choose Program  ® Activate Trace Components.

The system displays an overview of all trace components and whether they are currently activated or deactivated.

   13.      Deactivate all trace components currently not required.

Delete Trace or Trace Data

The SWWCLEAR report automatically deletes expired traces. This report is usually scheduled to run once daily.

You can also manually delete trace files that are no longer required. You can delete either the entire trace including all data, or just the previously recorded data for a specific trace. 

Delete Trace Data

...

       1.      Call transaction SWF_TRC.

       2.      Double-click the required trace to display the relevant data.

       3.      In the lower screen area, choose the icon with the quick info Delete Previous Data.

Delete Trace

...

       1.      Call transaction SWF_TRC.

       2.      Select the traces to be deleted:

       To delete a single trace, select the trace and choose the icon with the quick info Delete Trace.

       To delete all traces that you have created or changed, choose the icon with the quick info Delete Trace and then Delete User-Specific Entries.

       To delete all expired traces, choose the icon with the quick info Delete Trace, followed by Delete Expired Entries.

 

End of Content Area