Use the method LOG_MONITORING_INFORMATION (or set the flag IV_LOG_TO_CCMS in the methods LOG_MESSAGE, LOG_STEP_COMPLETION, or LOG_STEP_COMPLETION_EXCEPTION) to report any type of information required by an administrator, ensuring all SAP Gateway components are running.
Note that for the backend system (where software component IW_BEP is deployed) a corresponding class exists called /IWBEP/CL_COS_LOGGER for OData Channel development.
The following conditions may help identify the relevant problems:
Problem can influence all users or can endanger the functionality of the entire component and/or application.
Failure cannot be solved by retrying, or the maximum number of tries has been reached.
Failure might not be immediately seen by the user; this can be an indicator for a potential problem.
Information provided with the log can help the administrator or the support person to find or to solve the problem. For this reason, failed background processes must also be logged.
SAP system failures must be logged to provide a complete picture.
Some examples are as follows:
Consumer and/or SAP system connectivity layer is not configured correctly.
Generic mapping of the inbound data to canonical internal data structures or of the internal data structures to SAP system data structures is not correct.
The Document Publisher status and the Business Notification Sender queues have to be monitored (out-of-the box with qRFC).
Background process ended in a failure.
Status of scheduled tasks in the SAP system.
The method LOG_MONITORING_INFORMATION can consume logs of any severity type. The administrator sees a traffic light in the CCMS system that corresponds to the severity of the log.
CCMS can be configured to notify the administrator through mail or SMS if a log item of certain severity occurs. Exceptions have to be logged only at the level in which they can be handled appropriately. It is not recommended to log them on each instance they pass, since this can distort the results displayed in the analysis tools (Solution Manager Diagnostics and others).
BAPI return codes have to be translated into the corresponding set of logging attributes.
Do not pass the content of BO items in any of the parameters.
Use only the values specified in the table /IWFND/V_CCMS, as the context structure defined in CCMS relies on them. If you try to log a message to CCMS (by setting the flag IV_LOG_TO_CCMS or by calling the method below) by using an agent not specified the table /IWFND/V_CCMS, the following error message is created in the application log: Message ‘message class’ ‘message ID’ of the agent ‘agent’ could not be logged in CCMS.
Parameter Name |
Parameter Type |
Optional |
Data Type |
Def. Value |
---|---|---|---|---|
IV_MSG_TYPE |
importing |
SYMSGTY |
Message type |
|
IV_MSG_ID |
importing |
SYMSGID |
Message class |
|
IV_MSG_NUMBER |
importing |
SYMSGNO |
Message number |
|
IV_MSG_V1 |
importing |
X |
SYMSGV |
Message variable |
IV_MSG_V2 |
importing |
X |
SYMSGV |
Message variable |
IV_MSG_V3 |
importing |
X |
SYMSGV |
Message variable |
IV_MSG_V4 |
importing |
X |
SYMSGV |
Message variable |
IV_SYSTEM_ALIAS |
importing |
X |
/IWFND/DEFI_SYSTEM_ALIAS |
System alias |
IS_OBJECT_KEY |
importing |
X |
/IWFND/S_COR_ID |
ID of the object whose processing caused the errors |
IV_AGENT |
importing |
/IWFND/SUP_IW_AGENT |
IW agent should be taken from table /IWFND/I_COCCOL |