Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization object for work center

divya_nayudu
Participant
0 Kudos

Hi,

I have created a report which takes work center as the parameter. I want to create an authorization object check to ensure that the user executing the report passes the work center that he is assigned to.

I thought of using the existing authorization object C_AFVG_APL, with code shown below:

AUTHORITY-CHECK OBJECT 'C_AFVG_APL' ID 'PS_ACTVT' FIELD '03'.

My query here is: I will assign this Auth obj to a role, which will be assigned to the user. But how will that validate the user and his corresponding work center? Are we to pass values of work center in the auth object/ role assignment for every user?

May be I am totally missing the fact here, but i am trying to understand how to use authorization object to check if user executing report belongs to correct work center.

Many thanks,

D

1 ACCEPTED SOLUTION

divya_nayudu
Participant

I have managed to create multiple roles for set of users based on their corresponding work center, and that has solved the issue. 🙂

Thanks all.

3 REPLIES 3

former_member194965
Active Participant

Hi,

Check workcenter field in C_AFVG_APL object. If it exists means try to add in below your code

AUTHORITY-CHECK OBJECT 'C_AFVG_APL' ID 'PS_ACTVT' FIELD '03'.

'ID'<WORKCENTER> FIELD P_ARBPL

OR

Create new Authorization object with field work center and add in your report.

Ask basis people to maintain this authorization object in user's role(PFCG) and add concern WORK CENTERS in role level.And this role will maintain in SU01.

When you execute the report your parameter P_ARBPL check with authorization object field and that field check with role entries in PFCG.

Thank & Regards

Ananthachari

0 Kudos

Thanks a lot for your inputs Ananthachari.

That is my understanding as well, that we need to assign set of Work centers at role level. But I am just a bit confused still. Giving an example to explain my query:

user1 is having 2 work centers under him (w1,w2) and user2 is having 5 (w3,w4,w5).

If I add work center list (of total 7 work centers) at role level, the user1 will get authorization to pass w3,w4,w5 work centers in the report as well.

Please let me know if I am missing any point here.

Truly appreciate your help.

Thanks.

divya_nayudu
Participant

I have managed to create multiple roles for set of users based on their corresponding work center, and that has solved the issue. 🙂

Thanks all.