‎2006 Sep 12 1:20 PM
Hello All,
How can I check ::
1.Check if the user is authorized to call transaction code say : VF03
2.Check if the user is authorized to access documents created for the given sales organization and division.
Cheers,
‎2006 Sep 12 1:23 PM
1.
call function 'AUTHORITY_CHECK_TCODE'
exporting
tcode = 'YSCC'
exceptions
ok = 0
not_ok = 2.
if sy-subrc eq 2.
message e077(s#) with 'YSCC'. " No authorization to transaction
else.
call transaction 'YSCC'.
endif.
2.check SU22, here u will find out list iof objects per tcode.
Regards
Prabhu
‎2006 Sep 12 1:23 PM
1.
call function 'AUTHORITY_CHECK_TCODE'
exporting
tcode = 'YSCC'
exceptions
ok = 0
not_ok = 2.
if sy-subrc eq 2.
message e077(s#) with 'YSCC'. " No authorization to transaction
else.
call transaction 'YSCC'.
endif.
2.check SU22, here u will find out list iof objects per tcode.
Regards
Prabhu
‎2006 Sep 12 1:24 PM
Hi
AUTHORITY-CHECK 'S_TCODE'
ID TCD FIELD 'V F03'.
IF SY-SUBRC <> 0.
-
> NO AUTH.
ENDIF.
AUTHORITY-CHECK 'V_VBRK_VKO'
ID VKORG FIELD <VKORG>
ID ACTVT FIELD '03'.
IF SY-SUBRC <> 0.
-
> NO AUTH.
ENDIF.
Max
‎2006 Sep 12 1:24 PM
Hi sachin,
1. Fm = AUTHORITY_CHECK_TCODE
(it will run for the current user)
regards,
amit m.