Ansicht
Dokumentation

User Exit for Processing Workload Statistics ( RELNBC_USEREXIT_WORKLOAD )

User Exit for Processing Workload Statistics ( RELNBC_USEREXIT_WORKLOAD )

PERFORM Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Short text

User Exit for Processing Workload Statistics

Description

For every dialog step (online screen change or each step of a background job or every update request) a statistics record is created by the SAP kernel, which contains data about the workload caused by this process on the database and on the application server. The records also contain information about the generator of the workload, that is, which user generated the workload by executing which transaction. This means that these statistics records are a very good basis for system measurements and for calculating activity (in the sense of data center accounting). The following describes how you can read these statistics records in your own applications. First, a brief description of the standard use of the statistics records.

The statistics records are stored by the R/3 kernel in the "stat" file (usually in the "data" directory). The statistics records are then read by the job COLLECTOR_FOR_PERFORMANCEMONITOR, which runs once an hour, and stored in the database in an aggregated format. The workload statistics can be displayed with the Workload Monitor (transaction ST03). The Accounting Interface is also supplied with data by the job.

To allow the implementation of your own applications based on the statistics records, a user exit has been built into the above job, with which the statistics records read by the job are made available to your own applications. Note that it is not possible to read the statistics records directly from the stat file, since the administration of the SAP system depends on it and, in particular, the deletion of the file could lead to data losses in your own application.

  1. Structure of the Statistics Records
    The SAP kernel generates a statistics record for each dialog step - or, more precisely, for each:
    - Online screen change (see structure SAPWLPFNRM)
    - Update request (see structure SAPWLPFNRM)
    - Background job (see structure SAPWLPFNRM)
    A number of subrecords can be generated for each of these main records. Subrecords are generated for:
    - Steps of a background job (see structure SAPWLPFBTC)
    - Table accesses to transparent tables (see structure SAPWLPFTAB)
    - Remote Function Calls (both on the client side and on the server side)
    (see structures SAPWLPFRC and SAPWLPFRS)
    - Remote Function Calls, cumulated by RFC destinations
    (see structures SAPWLPFRCD and SAPWLPFRSD)
    - Spooler actions (see structures SAPWLPFSPP and SAPWLPFSPA)
    (as of release 4.0)
  2. Description of the User Exit
    The user exit consists of the possibility of calling a function module - if it has been defined and activated in the customer system - every hour with the current statistics records for processing. The function module that is to be called must have the name Z_USEREXIT_WORKLOAD and have the interface described below. The function module is then executed in the context of the job COLLECTOR_FOR_PERFORMANCEMONITOR, which should be scheduled hourly.
  3. Interface of the Function Module Z_USEREXIT_WORKLOAD
    1. Import Parameters
      - SERVER (Reference field: SAPWLSCPRO-SERVER)
      SAP instance name on which the statistics records were generated
      - HOST (Reference field: SY-HOST)
      Name of the physical host on which the statistics records
      were generated.
    2. Export Parameters
      None required
    3. Table Parameters
      - V2_NORMAL_RECORDS (Reference structure: SAPWLPFNRM)
      Table with the main records described above
      - V2_BTC_STEP_RECORDS (Reference structure: SAPWLPFBTC)
      Table containing statistics records for background job steps
      - V2_TABLE_RECORDS (Reference structure: SAPWLPFTAB)
      Table containing access statistics for transparent database tables
      - V2_RFC_CLIENT_RECORDS (Reference structure: SAPWLPFRC)
      Table containing RFC statistics for RFC clients
      (outbound RFC calls)
      - V2_RFC_SERVER_RECORDS (Reference structure: SAPWLPFRS)
      Table containing RFC statistics for RFC servers (inbound RFC calls)
      - V2_RFC_CLIENT_DEST_RECORDS (Reference structure: SAPWLPFRCD)
      Similar to V2_RFC_CLIENT_RECORDS, cumulated for RFC destinations
      - V2_RFC_SERVER_DEST_RECORDS (Reference structure: SAPWLPFRSD)
      Similar to V2_RFC_SERVER_RECORDS, cumulated for RFC-Destinations
      - V2_SPOOL_PRINT_RECORDS (Reference structure: SAPWLPFSPP)
      Only for release 4.0. Table with statistics about spool requests.
      - V2_SPOOL_ACTIVITY_RECORDS (Reference structure: SAPWLPFSPA)
      Only for release 4.0. Table with spooler statuses and
      activities
      - NORM_SUBRECORD_INDEX (Reference structure: SAPWLSRCIX)
      This internal table contains information about which subrecords
      (that is, all data from the table parameters except
      V2_NORMAL_RECORDS) belong to which main records
      (from V2_NORMAL_RECORDS)
    4. Exceptions
      Exceptions are not caught.

Damage caused to data by errors

Software/hardware requirements

Installation information

Effects on System Administration

Effects on Customizing

Effect on batch input

Changes to the Interface

Changes in procedure

Procedure for removing dataset errors

Dependent functions

Planning

Further notes






Vendor Master (General Section)   General Material Data  
This documentation is copyright by SAP AG.

Length: 5936 Date: 20240520 Time: 210422     sap01-206 ( 92 ms )