Managing the connector log file

The connector log in the SAP application displays in reverse chronological order all events and errors that relate to the connector, such as Create or Update operations, or events that arrive in the event queue. The log file lists the date, time, and event for each log entry. The log file is a good source to start troubleshooting problems.

Setting log options

You can set the global and user settings to the level of detail you want logged in the connector log file, as well as the number of entries and type of data you want displayed. To set the connector logging levels using IBM CrossWorlds Station, click the Configuration tab, and then select from level 0 - 3 under Logging Level.

The four levels of logging are as follows:

Note:
Logging level 0 is not recommended. Logging level 1 is recommended for a production system. Logging level 3 is recommended for a development or debugging system.

Displaying the log

To view recently processed objects and details associated with them, display the connector log. To display the connector log in the SAP application:

  1. Go to IBM CrossWorlds Station (transaction /n/CWLD/HOME).
  2. Click the Management tab, and then click the Log button.

Log entries display the date, time, and event. Entries are color-coded:

green--indicates a successful event

yellow--indicates a warning message

red--indicates an error

white-- indicates an archived object

Magenta (SAP application GUI versions previous to 4.6) or orange (SAP application GUI version 4.6 and later) entries provide information on the beginning and end of the event. Click on any arrow to link to SAP's display transaction for that business object.

Filtering log details

You can change the amount of detail that is displayed about each event. To change the display level, click the More Details or Fewer Details button depending on the level of detail desired.

If the amount of data displayed is more than you currently need, narrow the information displayed. For example, you can view business objects by user, name, date, or log entry number.

  1. Click the Filter Data button.
  2. Populate the appropriate fields to filter the log file.
  3. Click Filter.

In the Configuration tab, you can set user settings for the number of log entries to display at one time and the default logging display level.

Reprocessing archived objects

You can reprocess failed or archived objects from the connector log file. Failed objects are objects in SAP that fail to process successfully. Archived objects are objects that you configure to be archived without processing. In either case, you can manually step through the object by setting breakpoints in specific locations of the code. For Dynamic Transaction and IDoc objects only, you can step through the screens for the transaction.

The breakpoints can be set before the:

Dynamic Transaction and IDoc objects use call transactions; therefore you can view the screen processing for these objects. You have the option of viewing:

Dynamic Retrieve and BAPI objects do not use screen processing.

Configuring an object to be archived

By default, ABAP Extension Module business objects that have no archive option (A, X, or N) specified in their verb's application-specific information are archived in case of failures. In other words, when processing yields return codes other than 0 or 21, the business objects are archived in the /cwld/obj_arc_h and /cwld/obj_arc_i tables.

Important:
Because these archive tables grow, they must have their contents deleted or archived periodically to prevent impacting overall database performance.

Altering the archiving behavior is accomplished at the business object's verb level; that is, for each business object, the archiving activity can vary by verb. To specify how an object is archived, use the following syntax in the verb's application-specific information:

AppSpecificInfo = connectormodule.class, ArchiveParameter: ABAPhandler
 

where ArchiveParameter:

A
Archives the object when it first enters the SAP application.

N
Suppresses object archiving. Even in the case of failure, the object is not archived.

X
Archives the object immediately. The log is updated with a warning message stating that processing ended. A success code is returned to the connector, so that the requesting integration broker processes successfully.

You can specify more than one parameter at a time. The A and X archive parameters add an entry in the log table with a link to the reprocessing tool in IBM CrossWorlds Station. The status of the archived object is entered in the line below the entry for the archived business object.

The following example archives a Dynamic Transaction object and adds a entry in the log table.

AppSpecificInfo = sap.sapextensionmodule.VSapBOHandler, 
 A:/CWLD/DYNAMIC_RETRIEVE 
 

The following example archives an IDoc object, SAP4_Order Create, when it enters the SAP application, and then stops the processing of the object.

AppSpecificInfo = sap.sapextensionmodule.VSapBOHandler, 
 X:/CWLD/ORDER:ORDER_C1
 

Note:
In your production environments, use only the N parameter for business objects and all their verbs. When WebSphere InterChange Server is the integration broker, you should only use System Manager to reprocess and resubmit business objects; you should not use the IBM CrossWorlds Station reprocessing tools in your SAP application.

Using the reprocessing tool

The Reprocessing Tool enables you to reprocess WebSphere business objects for SAP using the ABAP Debugger.

Attention: This tool should be used in a development environment only.

To reprocess archived objects:

  1. Go to the connector's log in the SAP R/3 application.
  2. Double-click the archived object entry.

    The "CW reprocess objects from archive tables" window appears. Its Archived Object Number field is populated with the object number.

  3. Click the Set Breakpoint check boxes for the breakpoints that you want to set. You can set multiple breakpoints if needed.
  4. For objects that use Call Transaction, you can select the screen processing option.
  5. Click Execute (F8).

    The ABAP Debugger is invoked with the archived object.

  6. Use the ABAP Debugger to step through the object.

To manually access the Reprocessing Tool in IBM CrossWorlds Station, from the Tools tab click Reprocess Object. Enter the appropriate values in the fields provided.

Deleting archived objects

You can delete archived objects from the SAP R/3 application using the adapter-provided Delete Archive Objects tool. This tool enables you to delete archived objects manually. Once you have deleted an archived object, the object's entry in the connector log is updated with the new status. The object is physically deleted and only the status of the object is kept for reference.

To delete an archived object using IBM CrossWorlds Station (transaction /n/CWLD/HOME):

  1. From the Maintenance tab, click the Del Object Archive button.
  2. Specify the objects to be deleted. You can delete objects based on the following:
  3. Click Execute (F8).

To schedule an archive object program to delete objects automatically, contact your basis administrator and schedule report /CWLD/DELETE_OBJECT_ARCHIVE.

Setting up truncation of the event log

SAP keeps an event log of the connector's activity. This log can, over time, take up a lot of disk space. To save disk space, you can set this log to automatically truncate. When you set automatic truncation, by default SAP prints the truncated entries to the default printer of the user who sets up the job. Therefore, you may also want to control the print options.

To truncate the log manually:

  1. Go to IBM CrossWorlds Station (transaction /n/CWLD/HOME).
  2. Click the Maintenance tab.
  3. In the Online section, click Delete Log.
  4. Populate the applicable fields.
  5. Click the Execute button (F8).

To schedule the automatic truncation of the event log, set up the truncation options, and contact your basis administrator to schedule report /CWLD/DELETE_LOG.

Important:
It is recommended that you run this report on a regular basis.

Copyright IBM Corp. 2003, 2004