Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10498

Re: Authorization field value

$
0
0

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


Viewing all articles
Browse latest Browse all 10498

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>