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: . 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: .
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.
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.
Notes for /IWFND/CL_LOGGER and /IWBEP/CL_COS_LOGGER
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. |
MSG_HANDLE |
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. |
Table /IWFND/V_CCMS and /IWBEP/V_CCMS |
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 |
Description |
---|---|
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.
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.
Layer |
Agent |
Use Case |
---|---|---|
Consumer Connectivity |
Consumer Application Inbound Service |
|
Consumer Outbound Service |
|
|
Common Services |
Event Manager |
|
Event Handler |
Application specific logic |
|
Instance Manager |
|
|
Device Manager |
|
|
Message Container |
||
Destination Finder |
|
|
Cache/Persistency Manager |
||
Business Notification Sender |
||
Document Publisher |
|
|
Generic Event Handler |
|
|
Consumer Adaptation Layer |
|
|
Interface Layer |
Generic Service Consumer |
|
GenIL – no logging |
|
|
Generic Service Provider |
|
|
BAL |
Generic GSI |
|
Abstract GSI |
|
|
Composition BSO |
Delegate requests. |
|
Adaptation BSOs |
|
|
CSSO |
Mapping prior and after delegation to BSO. |
|
SAP System Connectivity |
Backend Outbound Service |
|
Backend Inbound Service |
|
|
SAP System |
SAP GW Application logic |
Application-specific logic |