SAP Knowledge Base Article - Public

3736482 - Workflow restart BADI MMPUR_PO_WORKFLOW_RESTART fiori app vs me22n

Symptom

In SAP standard it is possible to control the conditions under which a workflow restart is triggered via the the configuration node 'Manage Conditions to Restart Flexible Workflow for Purchase Orders' (SSCUI 103345) 
Where additional business conditions are to be considered it is possible to implement additional control using the BADI MMPUR_PO_WORKFLOW_RESTART. 
When implementing BADI MMPUR_PO_WORKFLOW_RESTART it is observed that a different restart behavior occurs between Fiori apps 'manage purchase order' and webgui apps 'Change Purchase Order' (ME22N)

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Configure flexible workflow restart conditions (for example, header text, item text, tax code) should not restart the workflow.
  2. In a Fiori app (for example, Manage Purchase Orders), change only a field such as a header text on a released purchase order and save. 'Observe that the workflow does not restart'.
  3. In APP 'change purchase order' (ME22N) make the same change on a released purchase order and save. 'Observe that the workflow restarts'.

Cause

  • Different technical handling between the odata fiori and the ABAP core. 
  • When a PO change is made, at the BADI call, the 'purchaseorderitem' table is always filled with all items in a fiori call, but from ME22n the 'purchaseorderitem' table is only filled with the item being changed. 
    If a header only change is made, the 'purchaseorderitem' table will be empty in ME22n and it will contain all items from a fiori change.   

Resolution

  1. When implementing your custom logic consider this technical difference if both apps are used 

See Also

Keywords

flexible workflow, purchase order, me22n, me23n, fiori, manage purchase orders, workflow restart, header text, tax code, badi, mm_pur_s4_po_wfl_restart, if_mmpur_po_workflow_restart, odata, core abap, public cloud,
YEKPO[], CL_MMPUR_PO_WORKFLOW, MM06EF0S_STRATEGIE_ERMITTELN , KBA , MM-PUR-PO-2CL , Purchase Orders (Public Cloud) , MM-FIO-PUR-PO-2CL , Fiori UI for Purchase Orders (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions