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

Authorization field value

arindam_samanta
Participant
0 Likes
4,465

Hi Experts,

Basis team has created one authorization object and created one authorization field for warehouse number. They will assign value to that field.

My question is:

Is there any table to get the authorization field value for that object? or How could I get the value for this authorization field value?

Because I should use that value in my select statement.

Any possible solution will be gratefully accepted.

Thanks & Regards,

Arindam Samanta.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,338

Hi Arindam,

If you want to check user authorization then you can directly use the 'Authorization-Check' statement. But if you need to specifically write a query probably UST12 (try UST* tables) should be of your help.

Please check the table and revert if this works out for your requirement.

Regards,

Deepak.

6 REPLIES 6
Read only

Former Member
Read only

former_member188827
Active Contributor
0 Likes
2,338

use "Authority-Check" statement in your program to check if user is authorized for the warehouse entered. if sy-subrc = 0, it means he is authorized and you can proceed with select statement otherwise display an error message.

Regards

Read only

Former Member
2,338

I don't think Authorisation Field value is stored in any table.

check

TOBJ ---> Authorization Objects

TDDAT ---> Authorization classes

Read only

Former Member
0 Likes
2,339

Hi Arindam,

If you want to check user authorization then you can directly use the 'Authorization-Check' statement. But if you need to specifically write a query probably UST12 (try UST* tables) should be of your help.

Please check the table and revert if this works out for your requirement.

Regards,

Deepak.

Read only

0 Likes
2,338

Hi Deepak,

Thanks for your reply. I checked UST12 table. There is another table: TOBJVORDAT, which also stores the authorization field values.

Regards,

Arindam Samanta.

Read only

Former Member
0 Likes
2,338

Hi Arindam,

You shall get the warehouse number using SELECT query from it's master or transaction table and pass it to the AUTHORITY-CHECK statement.

Example:

SELECT SINGLE pernr
        INTO   l_pernr
        FROM   pa0105
        WHERE  uname EQ sy-uname AND
               usrty EQ '0001'   AND
               begda LE sy-datum AND
               endda GE sy-datum.

AUTHORITY-CHECK OBJECT 'ZAUTH_HRT' ID 'PERNR' FIELD l_pernr.
IF sy-subrc <> 0.
   MESSAGE 'No authorization' TYPE 'E'.
ELSE.
   MESSAGE 'Congrats! You are authorized' TYPE 'I'.
ENDIF.

Hence, it will automatically check the values in l_pernr with the values in Authorization field.

You can check the values passed to authorization field using the T.code - PFCG

With Regards,

Gurulakshmi