Lifecycle Management

Lifecycle Management includes activities such as monitoring your SAP NetWeaver environment, SAP events, or the SAP Solution Manager. You can analyze your system and application logs, or you can register to System Landscape Directory to get an overview of all your installed components. You can switch the operation mode to redistribute the available system resources optimally without stopping and restarting the instances. See how your AE system allows you to interact with your SAP system.

This page includes the following:

 

Monitoring SAP NetWeaver

SAP offers various monitors that you can use to track your SAP environment including its corresponding components. Events are significant for the background processing of SAP. The AE provides Console-type Event objects that you can use to monitor these SAP events.

Monitoring Monitors

The R3_GET_MONITOR script function reads the provided information and makes it available for further processing. You can also use the RemoteTaskManager object which provides monitoring functions in the SAP system. Depending on the specified filter criteria, it displays jobs that were triggered by SAP.

AE JCL for SAP

Example

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

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

Use the PREP_PROCESS script function if you want to filter parts of the monitored information. Based on your filter definitions, the script function supplies a data sequence that can then be processed. The SAP Agent lists the information of the monitor in columns. The following example filters for the term "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 R3_GET_MONITOR script function in the background. For details, see PREP_PROCESS

Monitoring SAP Events

You can define filters that help you define the SAP events that should be monitored. If the agent reports an SAP event, the statements that are defined in the Form view of the Process page are processed. In doing so, you can handle the further processing steps.

To monitor SAP events

  1. Create a Console-type Event object and open it.
  2. In the Console Event page, specify the agent that is connected to the SAP system, and define the filter criteria for the SAP events.
  3. In the Event Process page, enter the script statement that should be processed if an SAP event occurs which meets the specified filter criteria. The GET_EVENT_INFO script function supplies details about the SAP event. For details, see GET_CONSOLE, GET_EVENT_INFO.
  4. Important!

    • If an SAP event is triggered which meets at least one filter specification, the Event Process page is processed. If several filter specifications are met, this page is NOT processed several times.

    • Filters may overlap if you use several Console-type events. In such a case, the agent notifies all Console-type events about the relevant SAP event.

  5. (Optional) Fill in the other tabs of the Console-type event and store the object.
  6. Activate the Console-type event to include SAP events in your processing.

See also Event Management

SAP Agent Connection

The agent periodically polls the SAP system for occurred SAP events and reports them to the active Console-type events. The administrator can define the interval in the JOB_CHECKINTERVAL key of the UC_HOSTCHAR_DEFAULT variable. For details, see JOB_CHECKINTERVAL

XBP 3.0 is required to monitor Console-type SAP events. The administrator can define the XBP 3.0 interface in the INI file of your SAP Agent. See Agent SAP

  • The SAP system time may run behind the AE system time. In this case, the first SAP events cannot be received if they occur in the gap that exists between the two different times.
  • The agent may lose its connection to the SAP system. SAP events can accumulate because the agent cannot forward them to the Console events. When the connection has been re-established, the agent checks if there are SAP events and reports them to the affected Console events.
  • As huge data amounts can be involved, the agent does not read all SAP events at once. The administrator can define the required handling in the INI-file parameter maxEventTimeSpan= of the SAP Agent.
  • If the agent is terminated, it cannot monitor SAP events. After a restart, it retrieves the point in time when it last monitored SAP events. SAP events that occurred during its termination are reported.
  • All agents that are connected to the SAP system poll SAP events. Each agent reports all SAP events that occurred to the Console events.

AE JCL for SAP

The following script functions help you handling SAP events through Job objects:

Monitoring the SAP Solution Manager

By integrating your AE system with the SAP Solution Manager, you can use its powerful and centralized monitoring functions, or manage background processing with the SM36 and SM37 transactions.

AE JCL for SAP

SAP provides interfaces for external applications that you can use to report status data to the Solution Manager. The SAP Agent uses such an interface to access the monitor structure in the CCMS and creates the connection through a Connection (CONN) for ABAP Basis. The following script elements help you to modify attributes or delete nodes:

You can use the Form view on the Process page of SAP jobs to access nodes. A separate browser displays the monitor "All Monitoring Contexts" of the monitor set "SAP CCMS Technical Expert Monitors". The node colors represent the current alarm status. For more information, see Forms View on the Process Page.

See SAP Solution Manager

Analyzing System and Application Logs

You can use the AE to read SAP logs including application logs and the system log. Both log types provide information about the processing status and possible error situations. Several AE functions are available that help you read the relevant entries. You can use filters, store them in a report or file, and analyze the results.

An extra report is available for canceled SAP Jobs that contain current messages of the SAP system log. This report facilitates error analysis, as referring to the SAP system is not necessary. This report type is called SLOG and can also be used in PREP_PROCESS_REPORT the script element. The number of lines to be kept as well as other settings are defined in the Connection (CONN) object of the SAP Agent.

AE JCL for SAP

  • R3_GET_APPLICATIONLOG

    Retrieves messages from the application log, and provides them as a report or a file

  • R3_GET_SYSTEMLOG

    Reads the system log of an SAP system during a defined period of time

See Special Reports for SAP Jobs

Registering to System Landscape Directory (SLD)

The SAP System Landscape Directory (SLD) supplies an overview of installed software components. You can configure the SAP Agent in a way that it registers to the SLD whenever it starts.

The following steps are required:

  1. Log on to system client 0000
  2. Create a new Connection (CONN) for SAP
  3. Open the Connection object, click the R3 Connection page and select the connection type Internet.
  4. Specify the connection parameters and save the Connection object.
  5. Switch to the folder HOST and open the SAP Agent object.
  6. Select the Connection object in the Agent page, and fill in the field System Landscape Directory.
  7. Save the Agent object.

The SAP Agent now tries to register to t the SLD whenever it starts. If the agent cannot register because of incorrect connection parameters, for example, it can still successfully start. The log file of the SAP Agent contains a message that informs you whether the registration to the SLD was successful.

Switching Operation Modes

SAP provides an option that allows you to switch operation modes. The intention is to redistribute the available system resources optimally without stopping and restarting the instances. According to your requirements, you can define various specifications for dialog and background processing. Your AE system also supports this SAP function with the R3_SWITCH_OPMODE script element that allows you to switch operation modes for individual or all SAP application servers.

AE JCL for SAP

See also: