2013 May 01 10:52 AM
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.
2013 May 02 7:09 AM
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.
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.
2013 May 01 11:06 AM
2013 May 01 11:09 AM
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
2013 May 01 11:24 AM
I don't think Authorisation Field value is stored in any table.
check
TOBJ ---> Authorization Objects
TDDAT ---> Authorization classes
2013 May 02 7:09 AM
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.
2013 May 02 8:38 AM
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.
2013 May 02 7:39 AM
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
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |