Skip to content

Key Metrics Details

How the KPIExtractor calls SAP function modules to extract KPIs.

5 min read Updated SS

How KPI Extraction Works (KPIExtractor)#

The KPIExtractor loops through every SAP instance, then through every function module mapped to that instance.

For each FM, it:

  1. Builds import parameters from input_parameter.
  2. Builds option parameters from option_parameter.
  3. Builds an input field list from input_fields.
  4. Executes the FM using SapServerConnection.execTableFunction(…).
  5. Choose one of the extraction cases below.

Case A: Row-Count KPI#

Used when the mapped FM field list contains exactly one field whose name contains ROW_COUNT.

1. Call the FM.

2. Read the returned table.

3. Use table.getNumRows().

4. Find the matching row in sap_kpis

5. Emit a single KPI.

For example:

a. CNV_MBT_READ_ST22_DUMPS returns 5 rows

b. ABAP_DUMP_ROW_COUNT = 5.0

Case B: Job-Count KPI#

Used when the first mapped field contains JOB_COUNT (typically RFC_READ_TABLE against TBTCO).

1. Call RFC_READ_TABLE.

2. Convert the returned table to a string.

3. Count |F as a success.

4. Count |A as a failure.

5. Populate BJ_SUCCESS_JOB_COUNT and BJ_FAILURE_JOB_COUNT.

Case C: Workload Table KPI (SWNC_GET_WORKLOAD_SNAPSHOT)#

Used when the FM name contains WORKLOAD.

1. Read the requested columns directly from the SAP table (USERTCODE or MEMORY).

2. Keep only fields marked kpi = 1.

3. Use TASKTYPE to rename the KPI keys:

TASKTYPE Output key rule
01 Keep original name (e.g., RESPTI) — Dialog
04 Prefix with BJ_ (e.g., BJ_RESPTI) — Background

4. Group values by KPI name and average them.

Case D: Structured KPI from SWNC_GET_STATRECS_FRAME#

Used when the FM name contains STATRECS.

  1. Reduce the top-level ALL_STATRECS table to the current SAP instance using instanceDataForTable(…).
  2. Read fields from the MAINREC structure.
  3. Keep only fields marked kpi = 1.
  4. Rename KPI keys by task type:
TASKTYPE Output key prefix
65 HTTP_
66 HTTP_
FE RFC_
  1. Group values by KPI name and average them.

How Transaction Extraction Works (TransExtractor)#

TransExtractor only processes function modules whose table_name is ALL_STATRECS.

Initialization#

Loads the sapTaskType.properties file, if present:

properties
01=Dialog
04=Background
65=HTTP
66=HTTP
FE=RFC

If the properties file is missing, extraction continues, but audit step names fall back to raw TASKTYPE codes.

Data Read Path (per instance)#

  1. Call SWNC_GET_STATRECS_FRAME.
  2. Isolate the matching instance’s STATRECS.
  3. Read MAINREC.
  4. Try to read BATCHSTEP and store JOBNAME.
  5. For task types 65 or 66, try to read HTTPRESC and store PATH.

Required Transaction Fields#

The mapped transaction fields must include the following:

Field Why
TCODE Primary transaction name
TRANSID Groups related steps
TASKTYPE Determines audit step name
Response field (usually LOCKTI) Used to compute the total response

Audit Grouping Logic#

1. Code groups rows by TRANSID, then creates a step list as follows:

  • Dialog:120,
  • RFC:80,
  • HTTP:50

2. The final transaction key is chosen in the following order:

    1. TCODE if present.
    2. JOBNAME if TCODE is empty.
    3. PATH if both are empty.

Final Transaction URL and Payload#

For each transaction, the extractor:

1. Sums all mapped response values for a specific TRANSID.

2. Builds a URL such as the following:
/VA01?txn_id=ABC123&steps=3&stepDetails=Dialog:120,RFC:80,HTTP:50

3. Converts to Heal transaction format:

    • method = POST,
    • status_code = 200
    • uri = /VA01?txn_id=…
    • response = 250.0,
    • timestamp = extraction upper-bound time
    • instance = ECC_Instance_1

KPI Reference#

The actual production seed (sap-adapter-insert.sql) defines 98 KPIs.

The full list is below.

Dialog KPIs (from SWNC_GET_WORKLOAD_SNAPSHOT USERTCODE/MEMORY, TASKTYPE=01)#

KPI String Aggregator Description
RESPTI avg Response time (dialog)
CPUTI avg CPU time
QUEUETI avg Queue wait time
PROCTI avg Processing time
ROLLWAITTI avg Roll-in wait time
READDIRCNT avg Direct reads request count
READDIRTI avg Direct read request time
READDIRBUF avg Direct read buffer rows
READDIRREC avg Direct read database rows
READSEQCNT avg Sequential reads request count
READSEQTI avg Sequential read request time
READSEQREC avg Sequential read database rows
READSEQBUF avg Sequential read buffer rows
PHYREADCNT avg Physical read count
CHNGCNT avg Number of changes
CHNGTI avg DB change request time
CHNGREC avg Number of DB changed rows
PHYCHNGREC avg Number of DB change calls
DSQLCNT avg Application request data
QUECNT avg Batch-input queue data
CPICCNT avg CPIC requests data
SLI_CNT avg Sources & loads data
GUITIME avg GUI response time
GUICNT avg Number of GUI roundtrips
GUINETTIME avg GUI network response time
MEMSUM avg Memory usage
USEDBYTES avg PRIV memory usage
PRIVSUM avg Extended memory usage
MAXBYTES avg Memory used in transaction
MAXBYTESDI avg Memory used in the dialog step
PRIVCOUNT avg WP PRIV mode count
RESTCOUNT avg WP restart count

Background Job KPIs (TASKTYPE=04, BJ_ prefix)#

Same 32 metrics as dialog, prefixed with BJ_:

`BJ_RESPTI`, `BJ_CPUTI`, `BJ_QUEUETI`, `BJ_PROCTI`, `BJ_ROLLWAITTI`, `BJ_READDIRCNT`, `BJ_READDIRTI`, `BJ_READDIRBUF`, `BJ_READDIRREC`, `BJ_READSEQCNT`, `BJ_READSEQTI`, `BJ_READSEQREC`, `BJ_READSEQBUF`, `BJ_PHYREADCNT`, `BJ_CHNGCNT`, `BJ_CHNGTI`, `BJ_CHNGREC`, `BJ_PHYCHNGREC`, `BJ_DSQLCNT`, `BJ_QUECNT`, `BJ_CPICCNT`, `BJ_SLI_CNT`, `BJ_GUITIME`, `BJ_GUICNT`, `BJ_GUINETTIME`, `BJ_MEMSUM`, `BJ_USEDBYTES`, `BJ_PRIVSUM`, `BJ_MAXBYTES`, `BJ_MAXBYTESDI`, `BJ_PRIVCOUNT`, `BJ_RESTCOUNT`

HTTP KPIs (TASKTYPE=65/66, HTTP_ prefix)#

KPI String Aggregator
HTTP_QUEUETI avg
HTTP_PROCTI avg
HTTP_REPLOADTI avg
HTTP_GENERATETI avg
HTTP_ROLLED_OUT avg
HTTP_DBREQTIME avg
HTTP_LOCKTI avg
HTTP_ROLLINTI avg
HTTP_CPUTI avg
HTTP_RESPTI avg

RFC KPIs (TASKTYPE=FE, RFC_ prefix)#

KPI String Aggregator
RFC_QUEUETI avg
RFC_PROCTI avg
RFC_REPLOADTI avg
RFC_GENERATETI avg
RFC_ROLLED_OUT avg
RFC_DBREQTIME avg
RFC_LOCKTI avg
RFC_ROLLINTI avg
RFC_CPUTI avg
RFC_RESPTI avg

Error/Count KPIs#

KPI String Aggregator Source FM
ABAP_DUMP_ROW_COUNT count CNV_MBT_READ_ST22_DUMPS
TRFC_ERROR_ROW_COUNT count /SDF/GPC_GET_TRFC_ERRORS
UPDATE_ERROR_ROW_COUNT count /SDF/EWA_GET_UPDATE_ERRORS
QRFC_OUT_ROW_COUNT count TRFC_QOUT_GET_ERROR_QUEUES
QRFC_IN_ROW_COUNT count TRFC_QIN_GET_ERROR_QUEUES
QRFC_OUT_CURRENT_ROW_COUNT count TRFC_QOUT_GET_CURRENT_QUEUES
QRFC_IN_CURRENT_ROW_COUNT count TRFC_QIN_GET_CURRENT_QUEUES
LOCK_ENTRY_ROW_COUNT count ENQUEUE_READ
BJ_SUCCESS_JOB_COUNT count RFC_READ_TABLE against TBTCO
BJ_FAILURE_JOB_COUNT count RFC_READ_TABLE against TBTCO

Viewing KPI#

After configuring the SAP connector using the Control Center, you can view the SAP service-related KPIs in the HEAL UI.

To view the KPIs, follow the steps below.

  1. Login to the HEAL UI application by entering the Username and Password you received in your email.

  1. After successful login, the dashboard below:

  1. Choose the Account ID (1) from the drop-down, and then click Application pod (2).

  1. The Application summary page: Click SAP service in the SDM screen to view the service details of the SAP service.

  1. The Service Details screen displays the number of instances running on this service, workload KPIs, behaviour KPIs, active signals, and events. You only have access to those services mapped to applications assigned to you.

To view the instance details, click a block with events at the instance level, as shown below.

  1. The Instance Details screen displays the metrics related to that KPI category, as shown below.