ā2008 Jun 03 9:02 PM
Hello,
I'm doing transaction call, but I need to know if the user has permission to the transaction. How can I do this?
thank“
ā2008 Jun 03 9:04 PM
hello.
check this as below:
*...Check if the user has authority to run the t/code
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = lv_tcode
EXCEPTIONS
ok = 0
not_ok = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE e003(zv) WITH text-e01 sy-tcode.
ENDIF.
lv_tcode is the transaction you want to call.
call transaction will never check authorizations hence use this FM before call transaction.
hope this helps,
ags.
Edited by: Agasti Kale on Jun 3, 2008 10:04 PM
ā2008 Jun 04 6:59 AM
hey,
u should try nd use the following
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = t_code
EXCEPTIONS
ok = 0
not_ok = 2
OTHERS = 3.
using this u can check on to the authorizations of the user fr running the transactions....
hope it helps .
take care
ā2008 Jun 04 1:11 PM