cancel
Showing results for 
Search instead for 
Did you mean: 

SC workflow Restart

Former Member
0 Kudos

Dear all,

Working in SRM 7.02 using PCW.

I have a scenerio, Once the SC is ordered it is going for approval.

When the requestor recall the SC and changed the Delivery date or any other information. The approval process starts from the beginning.

But i have case, where the SC that is recalled by the requestor and the he changed the Delivery date only then it should not start from begining but need to be continue the approval process.

How can we achieve this?/

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

ramki_maley
Active Contributor
0 Kudos

Hello,

You can use the BAdI /SAPSRM/BD_WF_PROCESS_RESTART.

Ramki.

Former Member
0 Kudos

Dear Ramki,

Thanks for the input.

In the BAdi  BAdI /SAPSRM/BD_WF_PROCESS_RESTART using the method validate_restart.if i set the field ev_restart = space , if they change only delivery date. Then it will not restart and the approval will not start from beginning.(i.e if the first approval already approved, then it will not go again to first approval for approve)

Kindly confirm me.

ramki_maley
Active Contributor
0 Kudos

Hello,

My apologies. I did not fully understand your requirement  before my previous response. In case of a recall by requester, the BAdI is not applicable.

Regards,

Ramki.

vinita_kasliwal
Active Contributor
0 Kudos

HI Tami

You can use this   /SAPSRM/BD_WF_PROCESS_RESTART  to override the standard system behavior for process restarts.

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.

For logic you can check if the requestor is the same as the one doing the changes if yes then do not restart The FM /SAPSRM/BD_WF_PROCESS_RESTART only will bring already saved data. So here what you should do is to compare the data stored already on the database with the data that is on the buffer (changed data) using the same guid for comparison.

Thus you need always to compare data to take it. You can use the 'BBP_PD_SC_GETDETAIL' for example.Refer below links it should resolve your issue .

http://scn.sap.com/thread/2152507

http://scn.sap.com/message/9485402#9485402

Hope that helps ..

Regards

Vinita

l

Former Member
0 Kudos

Dear Vinita,

Sorry for late reply.

I have implemented the above Badi and make the EV_RESTART = SPACE.

When the first approver approves the document waiting for 2nd approver to approve, at that time SC creator EDIT the SC, the revistion workitem send to SC creator and the SC creator open the workitem and change the value and order the SC.

Now as per the BAdi implementation the workflow should not restart. The workitem should go to 2nd approver once he approved then it should be completed.

But in my case, again the workflow is restarted and send to approver 1 for approval .


Answers (0)