Application Development and Automation 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: 
Read only

Authority-check issue

satish_kumar127
Participant
0 Likes
1,398

Hi guys,

I've created a authorization object for a tcode and created a role for a particular user to access the same. the object is assigned to a user in all clients.

issue is it's working fine in Development where as in quality getting sy-subrc = 12  for the same user though his ID is assigned for that object

in quality too.  Did i miss something? Kindly share your suggestions .

   Thanks in Advance

Regards

satish

Hi guys,

I've created a authorization object for a tcode and created a role for a particular user to access the same. the object is assigned to a user in all clients.

issue is it's working fine in Development where as in quality getting sy-subrc = 12  for the same user though his ID is assigned for that object

in quality too.  Did i miss something? Kindly share your suggestions .

   Thanks in Advance

Regards

satish

7 REPLIES 7
Read only

Former Member
0 Likes
1,362

Hi Satish,

can you please share the code you use for the authority check?

Even though subrc 12 tells that the user does not have the authority object, please also check that you have values defined and configured.

Regards

Markus

Read only

0 Likes
1,362

Hi Markus,

the following is my code for authority-check ,

IF sy-tcode = 'F-47' or sy-tcode = 'FBA6'.

  AUTHORITY-CHECK OBJECT 'Z_PRCTR'

    ID 'ACTVT' FIELD '01'

    ID 'ACTVT' FIELD '02'

    ID 'ACTVT' FIELD '03'

    ID 'PRCTR' FIELD xbseg-prctr.

   IF sy-subrc <> 0.

     MESSAGE 'You Are not Authorized For Profit Centre' TYPE 'E'.

   ENDIF.

ENDIF.


Thanks & Regards


satish

Read only

0 Likes
1,362

Hi Satish,

you say the user has been assigned in the authority object to all clients. Do you mean all clients or all the boxes in the landscape. If it all clients, it's certainly worth to check if the same is assigned in Quality.

Regards,

Sampat

Read only

0 Likes
1,362

I agree, according to the subrc 12 you should definitely check if the user has the authority object as well as both IDs...

Read only

Former Member
0 Likes
1,362

Hi

How have you made the user comparison for your role?

Read only

0 Likes
1,362

Please compare the roles in development and quality system.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,362

You can use transaction SUIM to do some analysis and there is also authorization trace available in ST01 (I think). And, naturally, when something works in one system but not in the other then there is a difference somewhere.

Kindly do some research before posting on SCN.