cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PR Approval workflow

Former Member
0 Likes
4,961

Hi all,

Before explaining my problem let me tell this. My client has not implemented HR and they are not ready to maintain the org. structure (since it takes hug time).

My problem:

when ever a PR is created it has to go for a approval process, because of the above to two reasons, i asked my client to create a ztable with these fields INITIATOR, Release strategy, release_code1....release_code8, user_id1....user_id8, this table is maintained by passing the userid who are authorized to create the PR and the corresponding release strategy by which the userid for the corresponding release code will also be maintained.

At this point, if the PR is created, based upon the user login id and based upon the release strategy I am finding the approver, and sending the workitem and everything is going fine.

For example if there are 4 approvers and first three has already approved the PR and it is pending with the 4th approver (userid--xx). At this time if anyone of the approvers goes to ME54n and releases the PR the system allows to do it since they are authorized to approve the PR.

I don’t know how to check the login id with the corresponding release strategy to the corresponding approver which is maintained in the ztable.

Please help!!!

Regards

Balaji E.

View Entire Topic
former_member184112
Active Contributor
0 Likes

Hi Bala,

Ok fine i understand your Problem.

We have one option in Release Strategies for Grouping PR

SPRO>MM>Purchasing>PR>Rel Procedure-->Proc.With Classification

Here you will have 4 options Setups:

  • Go to Set Up Procedure With Classification *

Here Double Click on RELEASE CODES

Ex: Group: PR, Code: 02 , <b>Workflow:</b> Space/1/9 ( Choose 9 - Role resultion Via User Exit) Description: XYZ..

F3 -- >

Double Click on Release Strategies: enter Entries..

F3 --->

Double Click on Workflow: Enter UserIDs...

Here You need MM Consultant's Help for Release Strategies.

Use this User Exit : Enhancement M06B0001

Need ABAP Coding as per your requirement in Include ZXM06U12.

Thanks and Regards,

Prabhakar Dharmala

Thanks and Regards,

Prabhakar Dharmala

Former Member
0 Likes

Hi Prabhakar,

Thank you for your help. I am having one more doubt.

When i tried to edit that include program it is giving me an error, can you please tell me how to rectify that.

The error is "Program names ZX... are reserved for includes of exit function groups"

Regards

Balaji E.

KjetilKilhavn
Active Contributor
0 Likes

Did you implement the enhancement Prabhakar mentioned (M06B0001)? I can't recall right now if it is transaction SMOD or CMOD for creating implementations, but one displays their definitions and the other lets you create implementations.

You should create an implementation for the enhancement, then you can go into the editor directly from that transaction the first time. However, the message you mention (I thought it came as a warning and not as an error) will probably be issued anyway when you are creating the include.

Perhaps you get an error message if you try to create ZXM06U12 from SE38 directly? Maybe SAP assumes you are trying to create a program, while ZXM06U12 must be an include.

Former Member
0 Likes

Go to smod, give enhancement name as M06B0001, display, then click on tab components, double click on function module : EXIT_SAPLEBNF_001,form there go in side include, if it is not created create it. You may get a warning, just pres enter and warning will go.

Thanks,

Shweta

Former Member
0 Likes

Hi Kjetil,

I found how to to write the coding, but one more problem, since i am not familier with this exits i dont know how to link the tcode me54n and me55 to this exit and how can i check for the condition and to pop-up the message. It will be better if i get a sample code or steps that i have to follow exactly.

Thanks & Regards

Balaji E.

KjetilKilhavn
Active Contributor
0 Likes

You activate your enhancement implementation, then your code in the exit will be called There is no linking required.

The pop-up? What pop-up? Haven't seen 'pop-up' mentioned before in this thread.

Perhaps it would be easier for you to get sample code or step-by-step instructions, but it is not easier for me. Additionally, you learn less from it, so all things considered I am not going to change my strategy in that area.

Former Member
0 Likes

I have a sample code for this particular exit, but this exit is used jus t for role resolution that is to determine the agents for workflow.

You can give me you email id, i will send the code sample.

Former Member
0 Likes

Hi Shweta Verma,

Thanks for your help. Please send it to this id balaji.elangovan@wipro.com.

Please guid me how to proceed in this issue.

Regards

Balaji E.

Former Member
0 Likes

I have send the code.

Shweta

Former Member
0 Likes

Hi Shweta,

Thanks a lot for the coding. i am having a doubt again.

If the approver, approves the PR throught the workflow path i can find he is authorized or not to release the PR by checking his user id and the corresponding record in the ztable what i have created. But if the approver goes to ME54n or ME55 and try to release the PR how can i handle this situation.

i want to know weather for this suituation the user exit will help? if that is the case how can i link this exit with the transaction code.

Please help me!!!

Regards

Balaji E.

former_member184112
Active Contributor
0 Likes

Hi Balaji,

If there is no workflow then user has to go ME54N to release it in Manual.

Your workflow has to send workitem then Approver has to release from Inbox.

This is the use of your workflow without doing manual.

So, your workitem has to receive in Approvers inbox, from there Approvers will release it.

So, Think about it how it is possible in your case.

Thanks and Regards,

Prabhakar Dharmala

Former Member
0 Likes

Hi Prabhakar,

Let me explain the scenario clearly:

Let us take I am creating the PR, and it goes for four level of approval (A1, A2, A3, A4), first two has already approved the PR, thought the workflow path, before A3 release the PR if A4 goes to the transaction and try to release the PR for A3 and A4 at that point I have to show error message.

Now in our system if allow A4 to release the PR for both A3 and A4, since he has the same authorization what all the four have.

This is the reason why I have chosen the idea of logon id. This happens when the approver goes throught the transaction ME54n or ME55. I can control this by checking the logon id with the ztable what i have created.

Now tell me how to proceed for this scenario.

Regards

Balaji E.

former_member184112
Active Contributor
0 Likes

Hi Bala,

Then You have to use Status Changes Event configuration in BSVW transaction.

I will explain you about this.Try this in <b>Customer Settings</b>

Status Object Type Identifies the application object being status managed.

Status profiles (Schema) are used to link statuses to status object types.

For custom defined statuses, appropriate status profile has to be created.

Statuses can be set by system or user. Both can create events.

Each Status is an indicator that it is active or inactive.

Relationships are predefined for system-set statuses.

Thanks and Regards,

Prabhakar Dharmala

Former Member
0 Likes

Find some user exit for me54 or badi for me54 which triggers before pr is released. Compare the user over there and raise an error. But this depends on user exit or badi.

former_member184112
Active Contributor
0 Likes

Hi Bala,

As Swetha said, you do like that also.

For ME54N we have one User Exit <b>MEREQ001</b>Customers' Own Data in Purchase Requisition. Here you can pass Message if A4 goes to the transaction and try to release the PR for A3 and A4 at that point I have to show error message.

Thanks and Regards,

Prabhakar Dharmala

Former Member
0 Likes

> I have send the code.

>

> Shweta

Hi Shweta,

I'm new in this PR workflow as well. Appreciate it if you could also send the code to me for my reference, it will really help. Thanks.

Message was edited by:

azwan ariffin

Former Member
0 Likes

Hi Azwan

The forum guidelines ask you not to add your email address in the threads, please delete and you may add to your profile.