cancel
Showing results for 
Search instead for 
Did you mean: 

Process Controlled WF, approval process not restart after change

Former Member
0 Kudos

Hi,

I created a process schema for PO and everything is working correctly.

However, when the PO is in approval state, then the value of the PO is changed, it does not restart the approval process.

The approver is retrieves by Product Category.

Even when the product category is changed, it will not retrieve the new list of approvers.

May I know what am I missing?

Isn't changing the value will automatically restart the workflow by default?

Thanks

Jack

Accepted Solutions (0)

Answers (1)

Answers (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

BADI Implementation is required for restart.

IMG document:

The BAdI is called after a document has been changed and saved. Use method VALIDATE_RESTART of the BAdI interface /SAPSRM/IF_EX_WF_PROC_RESTART to define whether a process restart is to take place (EV_RESTART = ABAP_TRUE) or not. The input parameters of this method contain the document type and GUID, the process schema of the running approval process, the expected process schema for the revised document, and the default setting.

Regards,

Masa

Former Member
0 Kudos

Hi Masa,

So, there isn't any standard behaviour for restarting the approval process?

I'm figuring out on how to use this VALIDATE_RESTART.

Unfortunately, it only return me the GUID of the PO.

How do I control/check if certain fields are changed, then only restart the approval process?

Thanks

Jack

Former Member
0 Kudos

Hi,

I found out that this BADI is called even when the Approve button is clicked on.

Any idea how to find out how to control the BADI process according to the event?

Thanks

Jack

bhakti2
Active Participant
0 Kudos

hi

did u find any solution ?

we have exactly same situation

thnx

b

Former Member
0 Kudos

Hi,

you can get the event status by implementing the below code.

DATA lV_Decision type /SAPSRM/WF_DECISION.

CALL METHOD /sapsrm/cl_wf_apv_facade=>get_current_decision

EXPORTING

iv_document_guid = is_document-document_guid

IMPORTING

ev_decision = lv_Decision

Saravanan