Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

check authorized tcodes for different users using 'authority_check_tcode'

Hi,

i am checking authorized tcodes for different users in ECC5.0 by following code it working fine.(if user authorized for that particular transaction it is giving the message ok, user not authorized it is giving not_ok). <b>But the same code is not working in ECC6.0 any one please help me.</b>

REPORT YTEST_PRAVEEN6.

parameter : p_uname type sy-uname.

parameter : p_tcode type sy-tcode.

move p_uname to sy-uname.

CALL FUNCTION 'AUTHORITY_CHECK_TCODE'

EXPORTING

TCODE = p_tcode

EXCEPTIONS

OK = 1

NOT_OK = 2

OTHERS = 3

.

IF SY-SUBRC EQ 1.

WRITE : / 'OK'.

ELSEIF SY-SUBRC EQ 2.

WRITE : / 'NOT_OK'.

ELSE.

WRITE : / 'OTHERS'.

ENDIF.

Usefull answer will rewarded

Thnaks

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question