Knowledge Base > Automation Engine and Target Systems > SAP > Monitoring Monitors

Monitoring Monitors

SAP offers various monitors that can be used to monitor the SAP environment including corresponding components. The function R3_GET_MONITOR reads the provided information and makes it available for further processing.

The following example reads the monitor "All Monitoring Contexts" and stores its content to a text file:

R3_GET_MONITOR MONITOR_SET="SAP CCMS Technical Expert Monitors", MONITOR="All Monitoring Contexts", FILE="C:\UC4_and_SAP\AllMonitoringContexts.txt"

Use the script function PREP_PROCESS if only parts of the monitored information should be filtered. Based on these filter specifications, the script function supplies a data sequence which can then be processed. The SAP agent lists the monitor's information in columns. The following example filters lines with the content "Enqueue". Four columns are used for further processing:

:SET &HND# = PREP_PROCESS("SAP01","R3MONITOR","*Enqueue*","MONSET=SAP CCMS Technical Expert Monitors","MONNAM=All Monitoring Contexts","COL=FILE","UC_LOGIN=LOGIN.SAP")

:PROCESS &HND#
:   
SET &Context# = GET_PROCESS_LINE(&HND#, CONTEXT)
:   
SET &Name# = GET_PROCESS_LINE(&HND#, NAME)
:   
SET &Value# = GET_PROCESS_LINE(&HND#, VALUE)
:   
SET &Status# = GET_PROCESS_LINE(&HND#, STATUS)
:   
PRINT "&Context# --- &Name#"
:   
PRINT "Value: &Value#"
:   
PRINT "Status: &Status#"
:   
PRINT ""
:
ENDPROCESS

The above example calls the function R3_GET_MONITOR in the background. Refer to the document that describes the script function PREP_PROCESS for more detailed information.

The RemoteTaskManager object also provides monitoring functions in the SAP system. Depending on the specified filter criteria, it displays jobs triggered by SAP.

AE JCL for SAP

Script Element

Description

R3_GET_MONITOR

Reads the data of a SAP monitor