cancel
Showing results for 
Search instead for 
Did you mean: 

N-Step Approval BADI Vs. New N-Step Workflow

Former Member
0 Kudos

Hi SRM Gurus,

I would just like your feedback with regards to Shopping Cart N-Step Approval workflow.

I noticed that in the Shopping Cart N-Step Approval BADi, you have to map in the code each possible approver in every case possible which would take more time doing. I found this more tedious.

Instead of using the N-Step BADI, I copied the 2-step workflow and created my own and added a 3rd step to the approval process. What I needed was a dynamic determination of approvers in the first two steps and a fixed approver for the 3rd step. So far it's working fine so I'm just wondering why SAP "promotes" the BADI more instead of defining a new workflow which is, I think, easier and more flexible.

What are your thoughts? Am I missing out on something important?

Regards,

Marvin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marvin,

You are right. In your case N was fixed and it was 3 and hence it was easier to copy the standard 2-step and extend it to 3.

But in case N is determined at run-time and not fixed - for ex: based on SC data we decide whether it needs 10 steps or 15 steps or 20 steps (I have seen some customers having up to 15 levels), then it is very difficult to develop our own workflow for these cases.

This is the advantage of N-step workflow. As this N-step BADI workflow is standard we also get support from SAP.

Rgds,

Prasanna

Former Member
0 Kudos

Thanks for this. Another question though, how do you display the names of the actual approver in the Approval Preview? Since I created my own approval step, in the approval preview, it only displays "To be approved by" but no name. However, the task arrives correctly to the assigned approver in the workflow template.

Is there a different workflow or configuration to fill this out?

Regards,

Marvin

Former Member
0 Kudos

You need to populate the field AGENT in the BBP_WFL_APPROV_BADI.

The field USER gives you the actual user or the position or the orgunit who is responsible for that workitem. To get the name of the user who will execute it, should be populated into the AGENT field of the approval_table in the BADI.

Cheers

Swetha,

Former Member
0 Kudos

What if I didn;t use the BADi and simply defined a new approval step in the workflow? The name of the approver isn;t showing

Former Member
0 Kudos

Hello again,

You should follow the note "391674 - How to build adhoc agents in customer workflows " in case we are building our own workflow.

In SRM we use Java applet to display the approvers and hence we will have to use this technique of Adhoc agents as described in note. Otherwise though the workflow, workitem everything will be ok, the preview will not reflect it.

Rgds,

Prasanna

Former Member
0 Kudos

Thanks Prasanna! I think this would solve this. I read the note already. It seems I have to do further ABAP coding do determine my own agents in the CREATE method.

Is there an easier way that doesn;t require ABAP programming?

Regards,

Marvin

Former Member
0 Kudos

Hi Marvin,

Unfirtuntaely no. We have to create a custom business object copying the standard objec AAGENT or ABSMANAGER and change the logic in method CREATE. This is the only way.

We cannot use the normal agent assignment like Org/User/Position/Rule/Role etc as the approval preview will not work without adhoc agents.

Hope this helps.

Rgds,

Prasanna

Answers (0)