Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Authority Check

Former Member
0 Likes
547

hello gurus,

My requirement is, In Production Staging area, The operator executes the custom transaction on the RF gun. The program checks the user’s authorizations to execute the program. It does so by using function module AUTHORITY_CHECK_TCODE (Authority check for the transactions).

I am new to this Authority check, Can anyone help me how to do this..

I am doing this coding in Module pool programming,

code is,

DATA : TCODE TYPE TSTC-TCODE.

CALL FUNCTION 'AUTHORITY_CHECK_TCODE'

EXPORTING

tcode = tcode

  • EXCEPTIONS

  • OK = 1

  • NOT_OK = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

i done this in include program of main.. but the error that i am getting is this " STATEMENT IS NOT ACCESSIBLE".

Plz Help me..

Points assured..

Thanks,

Vikram

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
486

Hi,

if u get this error any where press the change button in error display part then it will direct u to one line.just before that line place START-OF-SELECTION statement ur problem will be solved.this is for letting the statements after form...endform,module...endmodule,...accessible.

rgds,

bharat.

hello gurus,

My requirement is, In Production Staging area, The operator executes the custom transaction on the RF gun. The program checks the user’s authorizations to execute the program. It does so by using function module AUTHORITY_CHECK_TCODE (Authority check for the transactions).

I am new to this Authority check, Can anyone help me how to do this..

I am doing this coding in Module pool programming,

code is,

DATA : TCODE TYPE TSTC-TCODE.

CALL FUNCTION 'AUTHORITY_CHECK_TCODE'

EXPORTING

tcode = tcode

  • EXCEPTIONS

  • OK = 1

  • NOT_OK = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

i done this in include program of main.. but the error that i am getting is this " STATEMENT IS NOT ACCESSIBLE".

Plz Help me..

Points assured..

Thanks,

Vikram

2 REPLIES 2
Read only

Former Member
0 Likes
487

Hi,

if u get this error any where press the change button in error display part then it will direct u to one line.just before that line place START-OF-SELECTION statement ur problem will be solved.this is for letting the statements after form...endform,module...endmodule,...accessible.

rgds,

bharat.

Read only

Former Member
0 Likes
486

Hi,

Since its a module pool.create a new module in in PBO and put ur code in that module

Another option is add LOAD-OF-PROGRAM. in main program(after ur includes) and put ur code there

Thanks Arjun

Edited by: Arjun Puthuruthy on Mar 25, 2008 11:39 AM