Monitoring, traces and logs
ASAPIO Integration Add-on comes with the Monitor transaction, a powerful built-in app for interface monitoring, error analysis and performance analytics.
Overview
This section describes main features of built-in monitor application, useful for troubleshooting and health monitoring of ASAPIO Integration Add-On.
With the add-on you can perform many monitoring and logging activities, such as:
- View statistical and graphical analysis of data volume, times, and errors
- Logging of HTTP return codes and messages
- Logging of requests (RAW data). It can be switched on/off in application customizing (IMG)
- Re-transmission control through SAP change pointers (to ensure message delivery) if errors occur
- Notification and/or escalation to system administrators (or through SAP Workflow) if multiple errors occur
Functionality described in this document is valid for SP5 release.
Known issue is closure of active change pointers in menu “Show Un-processed Change pointers”. Closure doesn’t work without OSS note 3205543. This note is valid for SP5 and corrects the issue.
How to use it
Access to monitor application
User must have PFCG role /ASADEV/ACI_ADMIN_ROLE to access Add-On monitor.
- Transaction /n/ASADEV/ACI_MONITOR to start the monitor.
- You will see the entry screen with a selection form on top and graphical statistics below.
RFC Destination – Used to check monitor from remote system. For example, User is currently in system A, and wants to check monitor log from system B. If there is trusted connection between the systems A and B user can use RFC destination to check remotely log.
Cloud Instance – name of the instance for search. For example, SAP_CPI, SAP_EM etc.
Cloud Object Name – name of object for search. For example, MD_COST_CENTER_UPLOAD
Variants – if Add-On is scheduled for specific program variant, it is possible to search via variant. Variant names can be found via SE38/SA38. Program name is /ASADEV/AMR_REPLICATOR.
ACI-specific time stamp – date selection range for search.
Response Error Code – HTTP status code of executed transaction. For example, 200, 404, 106 etc.
User ID – name of user which executed upload. For example, BATCH_RTP, SAP_WRFT etc.
Object ID – free object search for the objects. Enter here for example purchase order ID. Behind this functionality is search in BDCP2 (change pointers) table on field TABKEY. For full loads or data migration loads this search mechanism doesn’t work.
All selection options work as restriction of output. If no criteria entered, then all transactions(logs) are displayed.
Log entries
In the transaction list menu, there is a standard ALV toolbar with standard ALV buttons for the list view available together with Add-On specific buttons:
Due to limitation of button’s quantity in ALV table some functional buttons were moved to the tab “Views” on the top of the page:
Addon specific buttons
Button “Refresh” updates the list to get information of newest uploads/downloads:
Button “Reprocess Selected Variant” executes program /ASADEV/AMR_REPLICATOR in background with the selected variant. Only single row selection possible.
Button “Reprocess Selected Variant via selection screen” has 3 variants of re-processing:
Reprocess variant – Button “Reprocess Selected Variant” executes program /ASADEV/AMR_REPLICATOR in foreground with the selected variant. Only single row selection possible.
Reprocess CP – opens list with all processed change pointers in selected transactions. Use ctrl + left mouse button click or shift + left mouse button click to select several entries:
List of change pointers has standard ALV toolbar with special button to re-process change pointers:
Multiple change pointers can be re-processed by the button “Re-process CP”:
– Re-process CP immediately – executes framework in background for selected change pointers to repeat transactions. Multiple change pointers selection and re-processing is possible.
– Mark CP as unprocessed – reset status of change pointer to not processed. It will be picked by next job run or can be used for troubleshooting.
– Re-process all change pointers – executes in background re-processing of all processed change pointers related to selected transactions:
Button “Open Application Log for selection” – opens SLG1 logs for the selected entry:
Only single object selection is possible.
Button “Open workflow logs” display error notification workflow for the selected entry:
Button “Display statuses of created IDOC” is used for inbound objects if transaction results in IDOC creation:
Select single entry and click on the button to display IDOCs:
Hint If process code of IDOC is linked to business object, it is possible to jump into created business object via GOS button from IDOC view:
New window with created or changed business object will be displayed. For example, tr. code ME53N will be opened with created purchase requisition.
Button “Bytes” opens a diagram with uploaded bytes for all entries in the list:
Selection of entries is ignored; the output is valid for the entire list:
If list contains single instance, but multiple objects, analytics is performed on object level:
Button “Times” opens a diagram with processing time for all entries in the list:
Selection of entries is ignored; the output is valid for the entire list:
If list contains single instance, but multiple objects, analytics is performed on object level:
Button “Errors” opens a diagram with caught exceptions for all entries in the list:
Selection of entries is ignored; the output is valid for the entire list:
If list contains single instance, but multiple objects, analytics is performed on object level:
Button “Show Trace” shows 2D diagram with uploaded bytes of selected entry:
Content of request and response can be downloaded locally:
Button “Download traces” downloads locally in .zip file traces of selected entries:
Button “Delete Trace” removes traces of selected entries:
Button “Delete all Traces” removes all traces saved by Integration Add-On:
Please be careful with this button. It removes all traces, not only available on the screen.
Button “Show change pointers” shows all processed change pointers related to selected objects:
Open view with all related change pointers. (SAP database table BDCP2):
Multiple change pointers can be re-processed by the button “Re-process CP”:
– Re-process CP immediately – executes framework in background for selected change pointers to repeat transactions. Multiple change pointers selection and re-processing is possible.
– Mark CP as unprocessed – reset status of change pointer to not processed. It will be picked by next job run or can be used for troubleshooting.
Button “Show Un-processed CP” shows all change pointers without “processed” flag related to selected objects:
Multiple change pointers can be processed by the button “Close Change Pointer immediately”:
– Change Status to “Processed” – sets status of change pointer to processed. After that change pointer is not picked by Add-On in scheduled runs.
– Re-process CP immediately – executes framework in background for selected change pointers to repeat transactions. Multiple change pointers selection and re-processing is possible.
Traces
If tracing is activated for an outbound object, you can also view the sent payload using the menu option Views > Show Trace
Note:
Tracing functionality is not enabled by default. If you want to have tracing active, please maintain the checkbox while creating the outbound objects.
In case of transmission errors, the traces are written regardless of this setting. There is no need to activate it in the production system.
Display Application Log (SLG1)
Click the button on the monitoring toolbar ( ) to view the application log in transaction SLG1:
Pro-active administrator alerting
Threshold alerting is a feature that enables pro-active notifications about connection errors when sending messages. The notifications happen via the Business Workplace. A notification is only triggered when a configured threshold is exceeded. The system calculates an error rate for all calls in a configured time range. If the rate is above the configured threshold, an alert is sent to the inbox.
Alerting configuration
The alerting can be configured in 2 dimensions:
- How the error rate is calculated / evaluated
- Who is notified in case the error rate is above the threshold
The evaluation can either be calculated on:
- Connection level (i.e. one error rate for all objects of a connection together as one value)
- Object level (i.e. an error rate per configured object; this is the recommended configuration)
The notification can be configured on:
- Connection level (i.e. one recipient definition for all sub objects)
- Object level (i.e. one recipient definition for each outbound object)
For the connection level notification, the evaluation of the error rate on the connection level or object level can be selected in the variant.
However only the object level evaluation may be selected for object level notifications.
Connection-level notification | Object-level notification | |
Connection-level evaluation | x | |
Object-level evaluation | x | x |
New in Release 9.32304:
Option to specify different thresholds for different Connections / Objects:
With the new options in the alerting report you can configure different variants for different connections / objects. That way you can have specific altering configurations for certain interfaces.
Example configuration:
Assuming you have the following Connections and Objects:
- Connection 1: Azure
- Object 1.1: Sales Order Change
- Object 1.2: Material Change
- Connection 2: Solace
- Object 2.1: Delivery Notification
- Object 2.2: Invoice Create
The different settings in the alerting report will result in the following evaluations:
Selected Instances | Selected Objects | Evaluated Instances | Evaluated Objects |
Azure | Azure | Sales Order Change, Material Change |
|
Azure | Sales Order Change | Azure | Sales Order Change |
Azure, Solace |
Material Change | Azure | Material Change
if objects are specified, they have to be specified for all instance |
Azure, Solace |
Material Change, Delivery Notification, Invoice Create |
Azure, Solace |
Material Change, Delivery Notification, Invoice Create |
Azure, Solace |
Sales Order Change, Material Change, Delivery Notification, Invoice Createif no connections / objects are selected then everything is evaluated (as in previous releases) |
Set-up notification on connection level
Edit the connection instance customizing that tie together the RFC destination and the cloud connector type:
- Transaction: SPRO
- Go to ASAPIO Cloud Integrator – Connection and Replication Object Customizing
- Select Entry and specify:
- Checkbox Threshold Alerting: Checkbox to true for activation
- Field Agent ID: Agent ID to be notified
- Field Agent Type: Type of agent e.g. User
Set-up notification on outbound object level
Edit the outbound objects customizing:
- Transaction: SPRO
- Go to ASAPIO Cloud Integrator – Connection and Replication Object Customizing
- Select the Connection
- Go to section Outbound Objects
- Select Entry and specify:
- Checkbox Threshold Alerting: Checkbox to true for activation
- Field Agent ID: Agent ID to be notified
- Field Agent Type: Type of agent e.g. User
Set-up linkage to notification workflow
Configure the linkage to the notification workflow:
- Transaction SWE2
- Switch to Change Mode
- Select New Entries and configure the following:
- Object Type: /ASADEV/AA
- Event: ACTIVE_ALERT
- Receiver Type: TS00382117
- Receiver Call: Function Module
- Receiver Function Module: SWW_WI_CREATE_VIA_EVENT_IBF
Set-up Job for error evaluation
Create a Variant
The variant is required to define the customizing of the job:
- Transaction: SE38
- Enter the program name /ASADEV/ACI_ACTIVE_ALERTING
- Execute (F8)
Here you can see the customizing of the report:
- Minutes to consider: current time subtracted from the specified time in minutes
- Instance Level/Object Level: on which level the error rates should be evaluated
- Cloud Instance Name / Object Name: the instance / object for which to run the evaluation (new in release 9.32304)
- Threshold: Threshold in percent to trigger a notification
When the customizing is done, Save as Variant… (Ctrl + S).
Now enter a Variant Name and Description. Save (Ctrl + S).
Schedule a Job
A job must be scheduled for the report /ASADEV/ACI_ACTIVE_ALERTING for the regular checking of the calls and for continuous notifications. You can use the previously created variant.
You can find a detailed explanation on scheduling jobs in the SAP Help Portal about Scheduling Background Jobs.
Find notification in inbox
Notifications are all collected in one area in the Business Workplace:
- Switch to Business Workplace
- Go to Inbox
- Select Workflow:
- Go to Grouped according to task
- Select ACI active alerting
The example shows only one notification.
Function modules
There are two RFC function modules with which you can get the error rates with which you can feed a custom monitoring system if needed.
One module calculates all rates at the connection level and the other at the object level.
- Function Group: /ASADEV/ACI_A_ALERTING
- Function Modules: /ASADEV/ACI_THRESHOLD_CAL_CONN
- Function Modules: /ASADEV/ACI_THRESHOLD_CAL_OBJ
Monitor configuration options
Integration health monitoring
Set following parameter via SM30 in table /ASADEV/ACI_PAR equal to ‘X’:
It enables calculation of health values for the monitoring. Additional view appears in Add-On monitor with “Update graphs” drop down:
Please note it is not recommended to switch on this feature for a long period of time due to possible performance impact.
Timestamp selection Offset
In the selection window of the ACI Monitor you can set the time range for the displayed log entries. The default value is 4 hours to the past and 4 hours into the future. With this new setting each user can change this default time offset individually.
To set the individual time range offset in the ACI Monitoring Cockpit:
- Go to Transaction: SU3
- Switch to Parameters
- Enter parameter ID: /ASADEV/MONI_SPAN
- Enter parameter value: time in seconds (e.g. 7200 for 2 hours)
Set/Get parameter ID | Parameter value |
/ASADEV/MONI_SPAN | time in seconds |
Additional troubleshooting options
Report /ASADEV/RESET_CAT_CP which is available from SPRO is not part of the monitor, but serves to massive change pointer reset
If mediated connectivity is used and for a while middleware set successful transaction response codes, but, transactions did not reach target system, it is possible to reset change pointers for a problematic period to massively repeat the output.
Archiving and removal of logs
Report /ASADEV/ACI_AMRLOG_DELETE removes logs and / or traces recorded for Add-On monitor:
Possible options are:
- delete logs / traces older then X days
- delete logs / traces within a given date range
- checkbox “Only traces” will just delete the traces and not the monitor log entries
- all options can additionally be restricted to
- Instance
- Object
- Return codes
The additional restrictions allow you to create variants with different settings for each interface.
There is also the option to archive the logs (instead of deleting).
Following programs archive / delete monitor records:
- /ASADEV/AMR_ARCHIVE_DELETE Program for delete the content of the ACI tables
- /ASADEV/AMR_ARCHIVE_READ Program for extracting the ACI tables
- /ASADEV/AMR_ARCHIVE_WRITE Program for archiving the ACI tables
Trace in Add-On monitor
Enable tracing
Trace is automatically recorded when any HTTP call ends with error. It is possible to trace every run by enabling trace on object level.
Transaction Code: SPRO
Path: Integration with Other SAP Components->SAP NetWeaver Addon for Event Enablement
Activity: Connection and Replication Object Customizing
Please note that it is not recommended to permanently activate this flag due to consumption of memory in the database.
Trace limitations
There are limitations of trace size and if threshold is not set, there is a risk to get a dump with following error:
And cancellation of scheduled job:
To prevent it from happening please maintain MAXTRACE parameter on each instance like described below:
Recommended size is 10000.
Quick-monitoring features for manual tests
Inbound objects
During manual execution of Add-on for inbound interfaces:
Log shows created IDOCs and status of execution:
Button “Show IDOC” navigates to IDOC page where status of IDOC can be checked.
If IDOC is linked to business object by “Relationships” button in GOS button it is possible to navigate further to business objects.
New window with created or changed business object will be displayed. For example, tr. code ME53N will be opened for created purchase requisition.
Outbound objects
During manual execution of Add-on for outbound interfaces:
Log shows saved trace and status of execution:
Reference: monitoring data model
The following chart shows the data model of the monitoring application (Subject to change).
Set-up Batch Job (Job-processed messaging)
Prevent synchronous call for message type
Note
With the following settings change pointers will be set but not being sent directly.
- Transaction: SPRO
- Go to ASAPIO Cloud Integrator – Connection and Replication Object Customizing
- Or go directly to transaction: /ASADEV/68000202
- Click on Synchronous call for message type
- Or go directly to transaction: /ASADEV/ACI_SYNC
- Add New Entry and specify:
- Message Type: the created message type
- Sync. On: Clear checkbox (Change Pointers will be set and the event is not being sent)
Define Variant
- Transaction: n/ASADEV/ACI
- Select the Connection and hit enter
- Select Upload Type: I
- Select Replication Object
- Save Variant
Schedule background job
- Transaction: SM36
- Choose your start conditions
- ABAP program: /ASADEV/AMR_REPLICATOR
- Variant: the created and saved Variant
Test background job
- First create an Event
- Then run the job
- Check the ACI_Monitor in transaction /ASADEV/ACI_MONITOR: You will be able to see the Variant and the Trace. For troubleshooting, check the SLG1-Log.