Advanced Process Control Framework
Overview
In SAP standard, the approval workflow of a Change Record runs through a Process Route template. Every variation of the process, such as a different plant or product type, needs its own template, so the same tasks are maintained again and again.
The XCM Process Control Framework replaces fixed templates with rules. Each task is defined once, and BRF+ decides for every Change Record which tasks are needed and who must work on them. When the Change Record reaches a status, XCM builds the Process Route for that status automatically.
How it works
- Status – The status net of the Change Record type defines the phases of the process. See Change Record Status net
- Tasks – Each task is created once as a Task ID and reused across statuses and Change Record types. See Process Control - Task Configuration
- Rules – A BRF+ decision table selects the tasks for the current Change Record type, status and business parameters, for example the plant, and defines whether they run in sequence or in parallel.
- Agents – The agents of each task are determined at runtime, mostly from Teams and Responsibilities. See Agent Determination Dynamically
- Process Route – The tasks are created in the standard Process Route, and the agents receive their work items in My Inbox. When the tasks of a status are completed, the Change Record moves on and the cycle starts again for the next status
Related features
| If you want to | See |
| Preview and adjust the process of a single Change Record before or during the workflow | Process Builder |
| Keep the process running when customizing or an agent is missing | Exception Handling in Process Control |
| Check a decision in My Inbox before it is accepted | Validate Decisions in My Inbox |
| Control what happens after a decision | XCM BAdI Usage below |
XCM BAdI Usage
Enhancement Spot /XCM/PR_ES_DECISION_EXIT
BAdI /XCM/PR_EX_DECISION_EXIT
Interface /XCM/PR_IF_DECISION_EXIT
Filter CHANGE_RECORD_TYPE
Description: What happens after a user takes a decision on a work item can be influenced by an own implementation, where the follow-up cannot be expressed through the status net and the decision table alone.
- The BAdI is filtered on the change record type. A separate implementation can be registered for each change record type, and an implementation does not affect the processes of other change record types.
- The method EXECUTE_AFTER_DECISION receives the work item, the decision taken, the change record header with its extension, and the parallel items of the process route.
- The implementation can end the remaining parallel tasks through END_PARALLEL_TASKS, skip selected items through ITEMS_TO_BE_SKIPPPED, and request additional tasks through CREATE_FOLLOW_UP_TASKS together with FOLLOW_UP_TASKS_TO_BE_CREATED.
This allows, for example, all remaining approvals to be closed as soon as one rejection is taken, or an additional review task to be created only for a specific decision.
Signature for reference
METHODS execute_after_decision
IMPORTING !workitem_id TYPE /plmb/pr_item_wii
!task_decision_data TYPE /plmb/s_pr_decision_data
!change_record_header TYPE /iam/s_i_root
!change_record_header_ext TYPE /plmi/s_i_cr_hdr_ext
!parallel_items TYPE /plmb/t_pr_object_id
CHANGING !end_parallel_tasks TYPE boole_d
!items_to_be_skippped TYPE /plmb/t_pr_object_id
!create_follow_up_tasks TYPE boole_d
!follow_up_tasks_to_be_created TYPE /xcm/pr_task_result_list_cr_st .
Note: the parameter ITEMS_TO_BE_SKIPPPED is spelled with three p’s in the interface. Use this spelling in your implementation.
Which BAdI do I need?
The enhancement spot /XCM/PR_ES_DECISION_EXIT contains two BAdIs for decisions taken in My Inbox. This BAdI acts on the follow-up after the decision. It cannot reject the decision itself.
| Requirement | BAdI | Documentation |
| Check a decision before it is accepted, and stop it with an error message | /XCM/PR_EX_VALIDATE_DECISION |
Validate Decisions in My Inbox |
| Control what happens after the decision: end parallel tasks, skip items, create follow-up tasks | /XCM/PR_EX_DECISION_EXIT |
This page |
See Also
IMG Customization
BRF Customization
Process Control - Task Configuration
Validate Decisions in My Inbox
Keywords
Process Route, Process Control, Task IDs, Agent Determination, BRF+, Decision Exit, /XCM/PR_EX_DECISION_EXIT

