cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Restart issue

SagarSontakke
Active Participant
0 Kudos

Workflow restart.

Hello SRM gurus,

I have below scenario.

PR gets created in R/3 and then SC gets created in SRM system. We have implemented the N step badi.
This n step badi gets called during SC creation and determines the number of approvers and triggers the workflow.

The issue is when PR is created with value 1000 EUR, SC gets created with 3 approvers and these approvers are visible in SC portal. when SC is in approval process, user change the PR value to 200 EUR ( which has 4 approvers), value gets copied into SRM system. Initial workflow is still running with 3 approver. Now my req. is to end the current workflow and retrigger the same workflow with 4 approvers.

1.Is N step badi going to triggered again?
2.Do i have to write the custom report to start the workflow and populate the approvers manually? If I do so are theseapprovers are visisble in SC portal?


Thanks in advance.

Regards,
Sagar Sontakke

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sagar,

Ideally the workflow re-start behaviour is derived from the personlization key BBP_WFL_SECURITY in the users profile.

These are as below:

HIGH - Workflow is never restarted when changes are made.

MEDIUM - Workflow restarted conditionally when changes are made.

LOW - Workflow is always restarted when changes are made.

None - Changes to the object are not allowed.

But when you implement N-step BadI , there securuty settings gets over-written and hence you need to implement BBP_WFL_SECUR_BADI for the security settings. Hence BBP_WFL_APPROV_BADI   & BBP_WFL_SECUR_BADI both goes hand in hand and has to be implemented.

Thanks,

Anshu       

Answers (3)

Answers (3)

SagarSontakke
Active Participant
0 Kudos

Hi All,

Thanks for quick reply.

I am using SRM standard wokflow.( N step badi workflow). Me working on SRM 5.0 system. workflow gets triggered/ restarted  when SC created via SC ITS Portal. Now my issue is for external shopping cart ( where subtype = 'ER' ). Thses shopping cart are created from backed R/3 system. Below is the flow

Plant maintainnace order (R/3)=> Purchase Requisition(R/3) =>SC (SRM) =>Approved => PO gets created in R/3.

My issue is shopping cart workflow is not getting triggered for this scenario. I debuged and found that SAP does not support the workflow triggering option for subtype = 'ER'. I have commented the SAP code where they have put the check on "ER". Now SC workflow's are getting triggered.

@All, Could you please help me to find FM to set the overall status of SC to "Deleted"?

Regards,

Sagar Sontakke.

Former Member
0 Kudos

Try using the FM BBP_PD_SC_STATUS_CHANGE

Former Member
0 Kudos

Try using the FM BBP_PD_SC_STATUS_CHANGE

Former Member
0 Kudos

Hi Sagar,

I'm assuming you are on SRM version 5 and have created a custom workflow for shopping cart(when PR is transferred to SRM to create a cart) and then implemented the logic in the N step BADI for determing approvers ,right?

As mentioned by Anshu,in the std workflow scenario,the security parameter BBP_WFL_SECURITY maintained for the user/role determines if the cart can be changed during the approval process and also if the workflow needs to be restarted after the change.

As Melina mentioned ,since you have created a custom workflow which updates the changes for the cart,the BADI's BBP_WFL_APPROV_BADI  & BBP_WFL_SECUR_BADI might not get triggered during that time if the update you are doing is a background update.But you can put breakpoints to check if these are getting triggered.

(The BADI's BBP_WFL_APPROV_BADI  & BBP_WFL_SECUR_BADI get called everytime a shopping cart is opened).

If the BADI's don't get triggered,you might need to do an enhancement to the workflow to forcefully re-trigger an event(SC opened)which will in turn trigger BADI call.

Hope this helps.

Former Member
0 Kudos

Hi Sagar,

Ok, you developed the WFL to trigger when you transfer a PR to SRM, I am correct?

Because this is not supported on standard functionality and then I suppose you will need to rework your enhancement to make this restart.

Cheers,

Melina