Show TOC

Logging in SAP GatewayLocate this document in the navigation structure

For SAP Gateway monitoring, files are generated and saved for the system log and the application log.

  • For system logs, go to transaction SM21.

  • For application logs, go to transaction /IWFND/APPS_LOG (/IWBEP/VIEW_LOG)) and open the SAP Gateway Application Log Viewer /IWFND/ on the hub system or /IWBEP/ on the SAP Business Suite system.

Logs are persisted on the ABAP database. To configure logging settings on the hub system, go to the SAP Reference IMG in transaction SPRO and choose the activities under the following node: Start of the navigation path SAPNetWeaver Next navigation step SAP Gateway Next navigation step OData Channel Next navigation step Administration Next navigation step Logging Settings End of the navigation path. To configure logging settings on the backend system, go to the SAP Reference IMG in transaction SPRO and choose the activities under the following node: Start of the navigation path SAPNetWeaver Next navigation step SAP Gateway Service Enablement Next navigation step Backend OData Channel Next navigation step Logging Settings End of the navigation path.

The three activities Set Log Level for All Users, Set Log Level for Specific Users, and Set Display of Sensitive Information (only available on the hub system) allow you to specify the settings for log and trace files.

Logging API

The logging API provided by the class /IWFND/CL_LOGGER (hub system) and /IWBEP/CL_COS_LOGGER (backend system) provides different methods to serve different use cases or circumstances. It differentiates between user/request specific and non-user/request specific situations.

Depending on the category, the log information is directed to the corresponding tool. The administrator can find user/request specific logs in the Solution Manager Diagnostics; non-user/request specific logs are in the CCMS.


Table 1: Implementation Details

SAP GW Agent

Describes the agent, component or class that creates the log entry, for example, Destination Finder, Consumer Connectivity, /IWFND/CL_DEVICE_MANAGER.

Object key and/or system alias

If both are available, both should be specified. If only the object key is available, the system alias will be derived from it. When a SAP system calls a SAP Gateway system, the system alias should contain the name of the SAP system.

Message container

If a message is logged through the message container, it must not also be logged through the Logger API, since the message container also logs its messages through the Logger API.


This parameter maintains the correlation between the step initialization and the step completion message in the Applications Log. The MSG_HANDLE parameter is returned using the method LOG_STEP_INIT. You must store the value internally until you pass it to the LOG_STEP_COMPLETION or LOG_STEP_COMPLETION_EXCEPTION methods.

BO items

The content of BO items must not be passed in any of the parameters.


Recommendation for logging in Applications Log:

The tables /IWFND/V_CCMS and /IWBEP/V_CCMS contain values for the most of the available framework agents. If you want to pass the name of an agent, use the values maintained in this table.


Note the following security aspects:

  • You should not log T100 message variables if they contain person-related, sensitive data.

Preliminary Considerations

Consider the following aspects before deciding where to log a message:

Message Type


User/request related messages

These are messages issued for a specific user and/or request context.

Non-user/request related messages

These messages describe a system-wide, cross-user, component-wide or cross-system failure or other critical state. Such a situation affects the entire system, application or component.

End-user related messages

These messages describe a failure or state the end-user can influence, for example, by executing an activity in a different way or retrying a certain request with different parameters.

Administration-related messages

These messages describe the processing steps/results of a user request. The information provided in these messages can be used by the administrator or by a support person to solve problems. These messages typically contain information that is not understandable to the end user.

Notes for T100 Messages

For framework-related messages use the message class /IWFND/CM_LOGGING or /IWBEP/CM_LOGGING to provide a message per implementation step for your component and/or agent. Message example: Step init: Map the proxy structure to the GenIL Data Container.

For applications: use your own message class to describe application-specific steps.

In your component and/or agent specific message class, provide descriptions for the different step completion cases:

  • Step was completed successfully.

    For example: Mapping the proxy structure to the GenIL Data Container was completed successfully

  • Step finished with a warning, error, abort.

    For example: Mapping the proxy structure to the GenIL Data Container ended with an error/warning. Error description ...

    Provide the long text if you have to describe the problem in detail and if you already have potential solution capabilities and options.

  • Step finished with an exception.

    For example: Mapping the proxy structure to the GenIL Data Container ended with an exception

    The exception itself will be described through the exception object and is logged in a separate log message internally.

User/Request Specific Logging in the Application Log

The following table depicts the essential steps executed by the SAP Gateway components and agents. To ensure that the processing of a request on SAP Gateway becomes transparent and understandable, these steps must be logged correctly. Therefore, it is necessary to keep the process defined after the table.



Use Case

Consumer Connectivity

Consumer Application Inbound Service

  • Map the proxy structure to the GenIL Data Container

  • Prepare the WS response

  • Return response to the SAP GW

  • Check if the request ID has been processed (resumability and idempotence)

Consumer Outbound Service

  • Determine relevant users (currently done in the GSI implementation)

  • Determine relevant consumer

  • Determine relevant outbound channel

  • Map the outbound document

Common Services

Event Manager

  • Registration of event

  • Process registered events

  • Invoke event handler

  • Transfer data to event handler

Event Handler

Application specific logic

Instance Manager

  • Retrieve system alias from input or destination finder

  • Retrieve version aliases for system aliases from destination finder

  • Instantiate GSI implementation(s) for an inbound request

  • Find composition BSO

  • Instantiate GSI implementation(s) for a system alias and GSDO type

Device Manager

  • Create or update device object

  • Remove device details

  • Get the details of a device with the specified DEVICE_ID

  • Get the details of a device with the specified user id

  • Get the user language for a specific user id

  • Update a user device object according to the specified consumer name

  • Get the details of a SAP GW with the specified user id and device

  • Get/Set application ID and the related version

  • Get/Set application attributes

Message Container


Destination Finder

  • Find the corresponding list of system aliases for an inbound request.

  • Get RFC destination for a system alias/get WS destination.

  • Get RFC destination for an explicit user for a system alias.

  • Get system alias description.

Cache/Persistency Manager


Business Notification Sender


Document Publisher

  • Instantiate the consumer adapter class.

  • Call the consumer adapter's sent message.

  • Extract the GSDO data.

  • Read the document from the attachment storage.

  • Get front-end user via user mapping.

  • Call the consumer Web Service via the bgRFC wrapper function Update OIL.

  • Get reports from the report database for the report ID obtained from the GSDO.

Generic Event Handler

  • Read the GSDO instance.

  • Fetch the subscriber list from the GSDO node.

  • Read Device Manager information for the subscriber list.

  • Call content publisher send method.

Consumer Adaptation Layer

  • Mapping logic for flat WS.

  • Field conversions.

Interface Layer

Generic Service Consumer

  • Determine the GenIL component.

  • Delegate the request to the GenIL runtime.

  • Cache side effects.

  • Error processing.

  • Event processing (notify event manager about side effects).

GenIL – no logging

  • Instantiate the Service Provider class.

  • Delegate the query request to the Service Provider class.

  • Return DO and side effects.

Generic Service Provider

  • Call the Instance Manager to instantiate the GSI implementation.

  • Delegate the query (+CRUD) request to the GSI implementation.

  • Convert the GenIL data container into a GSDO list.

  • Execute DB commit and initiate remote update and commit/rollback at the consumer connectivity layer.

  • Create preliminary ID (create method).

  • Publish a mapping between the preliminary ID and the permanent ID (save method).

  • Map enriched data from the SAP system to the GenIL DO.

  • Delegate to GSI check before save to request potential checks.

  • Request local update prior to remote update.

  • Remote update.

  • Local update after remote update.

  • Compensation logic.

  • Clean-up of local caches.

  • Request the reset of internal buffers.


Generic GSI

  • Request to buffer the modification/deletion of a GSDO.

  • Check if the GSDOs that will be modified can be persisted.

  • Request DB update prior remote update.

  • Request remote update.

Abstract GSI

  • Extract the IDs out of a GSDO list.

  • Return the BOP instance. Delegate the mapping of the selection parameters to the BOP DO.

  • Delegate the mapping of the result set out of the BOP DO into the GSDO list.

  • Delegate the mapping of the IDs out of IO_REQUEST_DATA into the BOP DO.

Composition BSO

Delegate requests.

Adaptation BSOs

  • Adapt the query result set to the canonical format, which in this example is identical to the GenIL object mode.

  • Insert the adapted query result into the SAP Gateway data container.

  • Adapt the query parameter to the SAP system format.

  • Delegate the query (+CRUD) to the BOP.

  • Cache update request for local and remote objects.

  • Perform local update (after remote call).

  • Publish modified GSDOs using the list of changed instances.

  • Provide permanent ID (save remote method).


Mapping prior and after delegation to BSO.

SAP System Connectivity

Backend Outbound Service

  • For each Web Service proxy and SAP system, a logical port must be defined.

  • Execute the SAP system operations and/or check BADI suppression flag.

  • Create a BOP.

  • Provide a reference to the extension container of the GSDO that is provided to the BAdIs.

  • Provide a reference to the enhancement class BAdI.

Backend Inbound Service

  • Process inbound message.

  • Call BgRFC unit.

  • Asynchronous processing (call BSO, cache, call event manager).

  • Adapt SAP system data to canonical GSDO format (optional as same as READ for workflow and reporting).

SAP System

SAP GW Application logic

Application-specific logic