Introducing the Integration of SAP Sales Cloud and SAP Service Cloud Version 2 with SAP S/4HANA
Preparing Technical System Settings
Preparing Functional Dependencies in SAP Sales Cloud and SAP Service Cloud Version 2
Setting Up and Running Product Replication from SAP S/4HANA to SAP Sales Cloud and SAP Service Cloud Version 2
Setting Up and Running Business Partner Replication from SAP S/4HANA to SAP Sales Cloud and SAP Service Cloud Version 2
Monitoring Messages and Troubleshooting

Monitoring Messages Across All Systems

Objective

After completing this lesson, you will be able to identify monitoring tools and monitor messages across all systems

Monitoring in General

Purpose of Message Monitoring

Monitoring messages plays an essential role during several phases within an integration project:

  • During the setup of integration scenarios, for instance, as smoke tests, especially when the first message of a newly configured integration scenario is sent.
  • During ongoing productive operations to ensure the integration remains healthy and functions reliably.
  • During troubleshooting to analyze issues, trace the route of messages, and identify the root cause of problems.

Each system has its own tools for monitoring message processing within that system. Once a message is passed to the next system, the corresponding monitoring tool in that system must be invoked to track the messages. There are also ways to centrally monitor message processing. SAP Cloud Application Lifecycle Monitoring (Cloud ALM) enables you to monitor messages end-to-end and set up alerts if errors occur.

This lesson focuses on the standalone message monitoring capabilities of this course's systems.

General Message Monitoring Capabilities

  • List outbound and inbound messages (or IDocs)
  • Filter based on different criteria, such as processing message type, status, time stamp, sender, receiver, and so on.
  • Restart or cancel messages that run into an error when first processed
  • View the payload (content) of the message (or IDoc)
  • View error details in case of processing errors

Monitoring in SAP S/4HANA

SAP S/4HANA offers various monitors for data replication activities, web service messages, and IDocs. Although IDocs are not part of the course scenarios, the IDoc monitor is briefly mentioned here because some scenarios still use IDocs.

The following list provides a quick overview of the different monitoring capabilities in SAP S/4HANA. The subsequent sections explain them in more detail.

  • Data Replication Framework Log:
    • DRFOUT: Shows details right after manual replication
    • DRFLOG: General access to the DRF log
  • Web Service Message Monitoring:
    • SRT_UTIL: Access the message monitor, error log, or activate traces
    • SRT_MONI: Web Service Message Monitoring
  • IDoc List:
    • WE02: List IDocs and view payloads
    • BD87: List IDocs, view payloads and perform actions, such as restart

Data Replication Framework Log

The initial contact with the Data Replication Framework log happens during manual data replication using transaction DRFOUT. After transmission, the log shows which filter criteria were used and which objects were identified as a result.

Three screenshots displaying the Data Replication Framework logs in S/4HANA after replicating data using DRFOUT

The previous screenshot displays the different views of the log.

  1. The overview screen in the upper left appears after data is sent. The marked row (A) lets you see more details.
  2. The details screen on the right provides insights about the considered filters, affected objects (B), and, in some outbound implementations, even the messages that were created (C). Selecting the View Details button for such entries takes you to the web service message monitor (SRT_MONI).
  3. This screen contains details of selected objects.

The Data Replication Framework log can also be accessed directly through the transaction DRFLOG. This transaction provides details on replications initiated by automatic replication, meaning due to the creation or modification of data. This can help you verify if filter settings (transaction DRFF) function correctly and assists in identifying potential issues.

Displaying Logs for selected replication models in S/4HANA

For inbound messages, the application log, accessible with transaction code SLG1, can help analyze errors that occur during processing at the application level.

Web Service Message Monitor

You can monitor web service-based communication using transaction SRT_UTIL. From this transaction, you can access the Error Log or the Message Monitor, and even initiate more advanced features, such as payload or functional traces.

The message monitor can also be accessed directly via transaction SRT_MONI and the error log using transaction SRT_ELOG. Although the message monitor displays messages in the states successful, processing, and error, some kinds of errors only appear in the error log. Therefore, if you‘re having trouble finding a message, you should always check both logs.

S/4HANA Web Service Monitor / SRT_MONI / SRT_UTIL

The previous screenshots display the monitoring capabilities for web service messages:

  1. Web Service Utilities (SRT_UTIL) with buttons to access the Error Log and the Message Monitor.
  2. Message Monitor (SRT_MONI) displays messages that have been processed or are currently being processed.
  3. The toolbar at the top allows you to view the XML payload of a message, see error details, restart messages with errors, cancel messages that are in processing state, and much more.
  4. Details view of a message that can display additional error information or the payload.

IDoc List

Several transactions with different features are available for monitoring IDoc-based communication. With transaction WE02, you can list IDocs of all processing states based on their direction (inbound or outbound) and type. You can also view the payload (look into the IDoc) by double-clicking on the respective row. The following screenshot shows that.

S/4HANA IDoc Monitoring

Alternatively, you can use transaction BD87 to access another monitor where you can select IDocs based on their processing status. This transaction also allows you to process IDocs that have not yet been processed. Without transaction BD87, you need to use a program to select and process IDocs.

Monitoring in Cloud Integration

Monitoring

Processing and monitoring are one of the main tasks of a middleware. In Cloud Integration, you can access the message processing log through the navigation menu under MonitorIntegrations and APIs.

The overview screen, partly shown in the following screenshot, consists of several tiles that display the number of processed messages matching different criteria, such as completed, failed, retried, etc., messages during different time frames, such as within the past hour, within the past 24 hours, and so on. You can customize the tiles or add new ones.

Selecting a tile takes you to the message monitor with the relevant filters applied. Choose a message to view more details, such as the sender and receiver, the message or application message ID, existing logs, and more.

Cloud Integration Monitoring – Processing logs

Tracing

Unlike other systems, you cannot see the contents of a message in Cloud Integration by default. However, you can temporarily activate the Trace mode for integration flows to record such details during message processing and view it for a limited time.

Cloud Integration Monitoring - Trace mode

The Trace mode can be activated in the Manage Integration Content area (1) within the Log Configuration section. Once activated, it stays active for a limited time, usually 10 minutes. During this period, a detailed message log is generated for messages processed, including payload and header data at each internal processing step. You can view these details in the Monitor Message Processing area after selecting a processed message (2). The trace data is typically retained for one hour.

Screenshot showing the Trace Details of a Processed Message in Cloud Integration

Depending on your user roles on SAP BTP, you might be able to activate the trace mode, and see some details for each processing step, such as the processing time, but you may still not see the Message Content. The following screenshot shows this situation, where the message You are not authorized to view trace data. Contact your tenant administrator for permissions. is displayed instead.

Screenshot of Cloud Integration with a Trace log open and the hint that the user is not authorized to display the message content.

In such a case, your user needs a different or additional user role. Common examples are:

  • Role collection PI_Integration_Developer allows you to carry out most tasks in Cloud Integration, such as integration flow deployment and message monitoring, but doesn't give you access to the message content.
  • Role collection PI_Business_Expert allows you to monitor messages, including the message content (payload)

You can find more about roles in the SAP Help Portal.

Monitoring in SAP Sales and Service Cloud Version 2

SAP Sales and Service Cloud Version 2 offers the Message Monitor, which administrators can access from the user menu under System SettingsAll SettingsIntegration cardMessage Monitoring.

The following screenshot displays the Message Monitor.

SAP Sales and Service Cloud Version 2 Message Monitoring

Above the table, there are several filter options and actions, such as Retry or Cancel a message. When you select a message in the Message Entity Name column, as shown in the previous screenshot, you can view more details about the message and potential error messages, as illustrated in the following screenshot.

SAP Sales and Service Cloud Version 2 Message Monitoring details amd actions

SAP Sales and Service Cloud Version 2 groups messages that are processed together, like the confirmation message for a processed incoming message. From this point, you can also access the message payload or view details about errors as shown in the screenshot.

Monitor a Message Across the Systems

Graphic showing the three systems with small screenshots of each system's monitoring tools and arrows that visualize the message flow.

Video: Monitoring Messages Across All Systems

In the following video, a sample product is sent, and we track the message across the systems using each system's monitoring tools.

  1. The product is sent from SAP S/4HANA using transaction DRFOUT.
    1. The Data Replication Log appears after triggering the replication. Alternatively, you can open the log with transaction DRFLOG.
    2. The web service message monitor in transaction SRT_MONI can be used to verify that the message was successfully sent to the middleware. You can use the Message ID to track a message across subsequent systems.
  2. In Cloud Integration, you can view processed messages under MonitorMonitor Message Processing. You can find the message by entering the message ID into the ID field. The properties section refers to it as Application Message ID.
  3. In SAP Sales and Service Cloud Version 2, the Message Monitor is located within the Integration card in the System Settings. You can Search by Message ID to find the message.
  4. Since the message was processed successfully, the product can be viewed in the Products app.