Showing results for 
Search instead for 
Did you mean: 

In Purchase requisition (ME51N), how to change approver on workflow while saving it

0 Kudos

Hi Guys,

I know there is user exit  EXIT_SAPLEBNF_001 where we can change the approver for the workflow, but  this user exit triggers only if the user goes to ‘RELEASE STRATEGY’ (RS) tab. What if the user does not go to this tab and straight press SAVE button. I tested, in this case the approver is not changed.

My requirement is to change the approver to the manager of the user, creating the PR.

Most of the time user does not go to RELEASE STRATEGY (RS) tab and they simply press SAVE to create the PR.

Any suggestion, how I can change the approver without going to RS tab.

Thanks a lot.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Sorry boys and girls,

all answers are wrong, or at least misleading.

The user-exit will be processed also during the rule resolution of the workflow tasks, which Manoj didn't came across yet, because that one's being processed by WF-BATCH, so a break-point wouldn't stop there easily.

@Manoj: Just go ahead and keep using the "9" at the release code customizing and the workitem will go through, by using your user-exit. With the admin-options on  a workitem-level you may also execute the button "Execute agent rules" and then you'll see your exit being executed, if you'd set a break-point there.

With the very best wishes


Active Contributor
0 Kudos

Create your own workflow template (copy the standard one) and call your own rule (I think 138 will work or create a rule calling RH_GET_LEADER function module) for the approver.

Active Contributor
0 Kudos


  Also  check for   other  BADI or user eixt, which is trigger at SAVE

Active Contributor
0 Kudos

Hello Manoj

You can write the approver ID in one of the custom fields in table EBAN when user press SAVE. Look for user exit or enhancement implementation.

Function module ME_REL_GET_RESPONSIBLE determines the approver. You can look for a implicit enhancement within this FM if you are using the SAP standard WF. Here you can read the custom field in EBAN to fetch the approver ID and skip the existing logic.