If you want to monitor business process steps with the Business Process Completeness Check, you need to instrument them in the source code of the managed systems. The instrumentation can be done via implicit or explicit enhancement points when enhancing SAP coding, or it can be done directly in customer coding.
For more information on the Exception Management Instrumentation Platform, see Exception Management Instrumentation Platform.
You have configured the business process and the subprocess that you want to as categories and subcategories in the Exception Management Instrumentation Platform configuration
You have assigned business process type IDs to the subcategories.
You have identified the business process steps that you want to instrument.
Usually, not all of the process steps and unit calls are critical and need to be instrumented. Consider also the following rules:
Remote function calls to other systems have to be instrumented as process steps.
To get the correct sequence of the steps, the calling system should be instrumented as well as the called system.
Error messages can only be logged for units (function calls and methods).
Explicit COMMITS
should not occur within a step, but outside of the step.
This procedure describes how you can instrument the process steps directly in the custom coding.
Initialize the SAP Business Passport.
Create a GUID for the business process instances.
Syntax
* Create Business Process Instance
ID CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = l_instance_id.
Write this GUID to the passport. Use the business process type ID (i_bpt_id
) configured in the Exception Management Instrumentation Platform configuration to identify the process.
Syntax
* Initially write the instance ID to the passport
/sdf/cl_em_ipa_write=>initialize_process(
i_bpi_id = l_instance_id
i_bpt_id = p_ptype).
Instrument the start of the first process step. Use a descriptive name for the step (Step 1).
Syntax
** EM Instrumentation: create start step via EM-IPA
/sdf/cl_em_ipa_write=>start_step(
i_step_name = 'Step 1').
Instrument the end of the process step.
Syntax
** create end step via EM-IPA
/sdf/cl_em_ipa_write=>end_step( ).
Between the start of the step and the end of the step, instrument the units (function calls and methods) of the process step. Possible unit types are:
ABAP function modules
ABAP form routines
BAPIs
Web service calls
ABAP class methods
Syntax
/sdf/cl_em_ipa_write=>create_unit_entry(
i_unit_name = 'ZFM_ORDER_UPDATE'
i_unit_type = 'ABAP Function Module'
it_parameter = lt_param
it_bapiret = lt_msg ).
In the same manner, instrument further process steps.
Instrument the saving of the data at the end of the business process or at the end of the function call (LUW).
When the process runs across different systems, at least one save data should exist before the another system is called, if not the data won't be logged.
Note
If you want to instrument the process steps in SAP coding, use implicit enhancement options. To display the implicit enhancements options, in the ABAP system, choose
.