cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase order is editable while in Approval (Flexible Workflow, Public Cloud)

amr__tawfik
Discoverer
0 Kudos
1,603

In Public cloud, We have activated the flexible workflow for Purchase orders and Purchase requestions but after the creation of the document, Users can edit the PO or the PR and Workflow is re-triggered. We want to disable this functionality.

According to the documentation of the MANAGE PURCHASE ORDER App, in the version of 2021 or before, it wasn't editable but after that version, this statement was removed.


2021 Version
SAP Fiori Apps Reference Library (ondemand.com)

2308 Version

Manage Purchase Orders | SAP Help Portal


We have checked if there is a BADI to do so but we couldn't find any BADI related to this functionality.
So is there a solution for this case?!!!!!!

Accepted Solutions (1)

Accepted Solutions (1)

amr__tawfik
Discoverer
0 Kudos

There is a BADI called Modify Purchase Order Header (MM_PUR_S4_PO_MODIFY_HEADER) that could be used to have a specific message Error or Warning based on the status of the PO. Please check the following code for example

IF PurchaseOrder-PURCHASINGPROCESSINGSTATUS = '03'.

DATA: ls_message_03 LIKE LINE OF messages.
ls_message_03-messagetype = 'E'.
ls_message_03-messagevariable1 = 'is In Approval(03). You cannot Edit.'.
ls_message_03-messageid = 'MEPO'.
ls_message_03-messagenumber = '173'.
APPEND ls_message_03 TO messages.<br>
ENDIF.


First, Please make sure that Key user Extensibility is ON in Extensibility Settings App and there is a Namespace defined. Then you can use Custom Logic App to implement the BADI then Export Software collection App to Export it to Test/Production Tenant and then import collection App to import the requests.

You can use Custom Logic Tracing to trace the implemented BADIs (Custom Logics) when used in APPs and it will show you all the parameters values while testing/using the BADI through APPs.

It will give the same error above in the Advanced App (ME22N) or Manage Purchase Order App.

//////////////////////////////////////////////

Please note that in Rejection Status (08), Manage Purchase Order still see the status as In Release (03) and give an Error while you can do the change from the Advanced App (ME22N) and will retrigger the workflow again. A ticket is open to SAP and waiting for Response.

////////////////////////////////////////

Answers (0)