Symptom
When using flexible workflow for Purchase Requisitions and Purchase Orders, all items sent for approval
have the same priority 'Medium' by default. This priority is visible in the 'My Inbox' APP of the approving manager.
You would like to set different work item priorities based on your own custom logic for Procurement documents.
For this purpose you are using the BADI MMPUR_WFL_CONTEXT_ENHANCE.
Environment
SAP S/4Hana Cloud - All versions
Reproducing the Issue
1) Open the Custom fields APP
2) Choose Custom Logic
3) Create a new entry
- Business Context Procurement: Flexible Workflow
- Enhancement of Flexible Workflow Properties
Example implementation:
IF businessobject EQ 'PurchaseRequisition'.
* Include custom logic for PR
workflowsteppriority = if_mmpur_proc_wf_context_enh=>co_workitem_priority-low.
ELSEIF businessobject EQ 'PurchaseOrder'.
* Include custom logic for PO
workflowsteppriority = if_mmpur_proc_wf_context_enh=>co_workitem_priority-High.
ENDIF.
4) Create a Purchase Requisition relevant for flexible workflow
5) Create a Purchase Order relevant for flexible workflow
6) Open My Inbox
** For Purchase Requisitions you are able to set the work item priority but for Purchase Orders the work item priorities cannot be set.
Cause
Missing functionality
Resolution
The BADI MMPUR_WFL_CONTEXT_ENHANCE is only fully enabled for Purchase Requisitions.
Setting a work item priority for Purchase Orders via the BADI is not yet enabled.
Keywords
KBA , MM-FIO-PUR-PO-WFL , Purchase Order Workflow , Problem