cancel
Showing results for 
Search instead for 
Did you mean: 

n-step process driven workflow in SRM7

Former Member
0 Kudos

I am trying to develop a custom n-step workflow in SRM7. To begin with I thought I would copy the standard Spending Limit n-step set up, get it working and then adapt the code. When I set up my process schema with SAP standard evaluation ID 0EV_SC_SL2 ("n-Level Output Limit Approval Process") and Resp. Resolver name RR_SPENDING_LIMIT_APPROVER in debugging the flow is this:

1. CREATE_PROCESS_LEVEL_CONFIG code executes, builds table with 2 approvers

2. CREATE_PROCESS_LEVEL_CONFIG code executes again, builds (same) table with 2 approvers

3. Method PREV_APPROVAL_LIMIT executes, exits with CATCH since previous approver not found

4. Method PREV_APPROVAL_LIMIT executes, finds the previous approver and returns his approval limit, which is not sufficient to approve the cart.

5. Method PREV_APPROVAL_LIMIT executes, finds the previous approver and returns his approval limit, which is sufficient to approve the cart

6. We get an approval with 2 approvers.

However, when I replace the Resp. Resolver name with my own Z resolver which points to the CREATE_PROCESS_LEVEL_CONFIG code I have copied from the equivalent RR_SPENDING_LIMIT_APPROVER code the flow is this:

1. CREATE_PROCESS_LEVEL_CONFIG code executes, builds table with 2 approvers

2. CREATE_PROCESS_LEVEL_CONFIG code executes again, builds (same) table with 2 approvers

3. Method PREV_APPROVAL_LIMIT executes, exits with CATCH since previous approver not found

...so far so good, exactly like SAP standard, but then...

4. CREATE_PROCESS_LEVEL_CONFIG code executes again, builds (same) table with 2 approvers

5. Method PREV_APPROVAL_LIMIT executes, exits with CATCH since previous approver not found

6. Points 4 & 5 repeat over and over in a loop.

So the method PREV_APPROVAL_LIMIT never succeeds in finding a previous approver since the process seems to start from the beginning again each time none is found.

So my question is this - what is it with my Z Resp. Resolver name that makes the system return to the process level config method each time the previous approver cannot be found when SAP standard does not produce this behaviour?

<< Moderator message - Please do not offer points >>

Thanks and Best regards,

Martin

Edited by: Rob Burbank on Oct 21, 2010 4:44 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Martin,

I am also working on the similar kind of requirement, but I have changed the evarl id as '0EV_SC_SL2' and res resolver as RR_SPENDING_LIMIT_APPROVER, the system is not triggering the process level. can u help me on this.

Former Member
0 Kudos

Hi Podile,

If this is still a problem for you I have a document detailing how to set the standard process level workflow up.

Rgds,

Martin

Former Member
0 Kudos

Hi all,

I am trying to build a dynamic workflow (similar to what I did with n-step BADI in SRM5), I think I need to use the 'CREATE_PROCESS_LEVEL_CONFIG' but not sure what I beed to do really - a bit new to BRF...

I have a bespoke 'engine' for determining the recipients and their sequence / level, which I can retrieve by way of an FM, but I do not know then what to do with the returned table..

Any ideas ?

Martin can you let me know how I can get hold of acopy of your document please ?

Steve Ball

Former Member
0 Kudos

Hi,

You can find the sample code from enhancement implementation /SAPSRM/BD_WF_PROCESS_SC.. the CS_PROCESS_LEVEL PARAMETER will hold the process level guid then the enhacement implementation /SAPSRM/BD_WF_AGENTS_SC and badi implementation /SAPSRM/BD_WF_SC_RR_SL will trigger the get the process guid id.. hope this will help you...

Saravanan

Former Member
0 Kudos

I found the problem - I was missing an implementation of class /SAPSRM/CL_IM_WF_RR_ADHOC. I created this in the IMG section for BAdIs, Business Workflow - Process-Controlled Workflow - Define Agents, applied the correct filter and it worked.