Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There is a very flexible high-performance reporting API available. These APIs are called readers. Currently three different reader exist:

Class

Description

/PCH/CL_BPF_RD_RPROCESS

The Process Reader is used to read processes based on many different selection criteria.

/PCH/CL_BPF_RD_RPROCESS_LISTNG

The Enhanced Process Reader is based on the above mentioned Process Reader but extends the available fields for better readability (e.g. Name of the user, Status description, ...)

/PCH/CL_BPF_RD_RACTIVITY

The Activity Reader is used to read based on activities but also provides information about its parents objects (part process, process).

The usage of all the readers is quite simple (see example at the end of the chapter):

...

The supported tables and fields are described below.

Field

Description

Process Reader

/PCH/BPF_RPRC

Contains all the runtime information about a process. Please refer to this structure to see the available fields.

Enhanced Process Reader (in addition to the Process Reader)

STATUS_DESC

Description of the process status (e.g. Completed)

PRIORITY_DESC

Description of the priority (e.g. Low)

OBJECT_TYPE_EXT

Description of the object type (e.g. Material)

BEZEI

Description of the process

PROCESS_ID

External ID of the process

VERSION

Version of the process

INITIATOR_NAME

Full name of the process initiator (e.g. Hans Müller)

OBJECT_KEY_EXT

Object key in external representation (e.g. without leading zeros)

CREATED_NAME

Full name of the user who has (technically) created the process

STARTED_NAME

Full name of the user who has (technically) started the process

COMPLETED_NAME

Full name of the user who has finished the process

CANCELLED_NAME

Full name of the user who has aborted the process

OVERDUE_SINCE

Overdue in days if a process is overdue

Activity Reader

/PCH/BPF_RACT

Contains all the runtime information about an activity. Please refer to this structure to see the available fields.

/PCH/BPF_RSPC

Contains all the runtime information about the corresponding part process. Please refer to this structure to see the available fields.

/PCH/BPF_RPRC

Contains all the runtime information about the corresponding process. Please refer to this structure to see the available fields.

TITLE

Title of the corresponding workitem

ACTIVITY_ID_EXT

External id of the activity

ACTIVITY_DESC

Description of the activity

PARTPROCESS_ID_EXT

External id of the part process

PARTPROCESS_DESC

Description of the part process

PROCESS_ID_EXT

External id of the process

PROCESS_DESC

Description of the process

PRIORITY_DESC

Description of the priority (e.g. Low)

Field

Description

Process Reader


/PCH/BPF_RPRC

Contains all the runtime information about a process. Please refer to this structure to see the available fields.

Enhanced Process Reader (in addition to the Process Reader)


STATUS_DESC

Description of the process status (e.g. Completed)

PRIORITY_DESC

Description of the priority (e.g. Low)

OBJECT_TYPE_EXT

Description of the object type (e.g. Material)

BEZEI

Description of the process

PROCESS_ID

External id of the process

VERSION

Version of the process

INITIATOR_NAME

Full name of the process initiator (e.g. Hans Müller)

OBJECT_KEY_EXT

Object key in external representation (e.g. without leading zeros)

CREATED_NAME

Full name of the user who has (technically) created the process

STARTED_NAME

Full name of the user who has (technically) started the process

COMPLETED_NAME

Full name of the user who has finished the process

CANCELLED_NAME

Full name of the user who has aborted the process

OVERDUE_SINCE

Overdue in days if a process is overdue

Activity Reader


/PCH/BPF_RACT

Contains all the runtime information about an activity. Please refer to this structure to see the available fields.

/PCH/BPF_RSPC

Contains all the runtime information about the corresponding part process. Please refer to this structure to see the available fields.

/PCH/BPF_RPRC

Contains all the runtime information about the corresponding process. Please refer to this structure to see the available fields.

TITLE

Title of the corresponding workitem

ACTIVITY_ID_EXT

External id of the activity

ACTIVITY_DESC

Description of the activity

PARTPROCESS_ID_EXT

External id of the part process

PARTPROCESS_DESC

Description of the part process

PROCESS_ID_EXT

External id of the process

PROCESS_DESC

Description of the process

PRIORITY_DESC

Description of the priority (e.g. Low)

Example

Code Block
languageabap
TYPES:
    BEGIN OF ts_result
  ,   object_id           TYPE /pch/bpf_rprc-object_id
  ,   object_key          TYPE /pch/bpf_rprc-object_key
  ,   object_type         TYPE /pch/bpf_rprc-object_type
  ,   status              TYPE /pch/bpf_rprc-status
  ,   status_desc         TYPE string
  , END OF ts_result
  , tt_results            TYPE STANDARD TABLE OF ts_result
                          WITH DEFAULT KEY
  , tt_status             TYPE STANDARD TABLE OF /pch/bpf_rstatus
                          WITH DEFAULT KEY
  .

DATA:
    lo_reader             TYPE REF TO /pch/cl_bpf_rd_rprocess_listng
  , lt_result             TYPE tt_results
  .

TRY.
    CREATE OBJECT lo_reader.

    lo_reader->set_process_state(
      VALUE tt_status(
        ( /pch/if_bpf_constants=>c_runtime_status-ready )
        ( /pch/if_bpf_constants=>c_runtime_status-started )
      )
    ).

    lo_reader->set_activity_agents(
      ia_range        = sy-uname
      iv_member_type  = /pch/if_bpf_constants=>c_type-user
    ).

    lo_reader->read(
      IMPORTING
        et_data = lt_result
    ).

  CATCH /pronovia/cx_invalid_obj_type
        /pronovia/cx_invalid_para.
    RETURN.
ENDTRY.

...