Application Development 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: 

Authority Check

Former Member
0 Kudos

Hii ...

I have a small problem ...

how can i check wether a particular user is authorized to execute a transaction or not ...

the issue is .. i have created a Module pool program ... now i need to have a authority check to execute the transaction..

thanks and regards

chandu reddy

1 ACCEPTED SOLUTION

Former Member
0 Kudos
5 REPLIES 5

Former Member
0 Kudos

Hello,

Use the authority-check command.


PARAMETERS carr TYPE spfli-carrid. 

AT SELECTION-SCREEN. 
  AUTHORITY-CHECK OBJECT 'S_CARRID' 
    ID 'CARRID' FIELD carr 
    ID 'ACTVT'  FIELD '03'. 

  IF sy-subrc <> 0. 
    MESSAGE 'No authorization' TYPE 'E'. 
  ENDIF. 

If the user has the authority object associated to his profile, the resul of sy-subrc will be 0.

Regards.

Former Member
0 Kudos

Create the transaction in SE93 as a dialog transaction for that module pool program / screen.

To start the program, the (normal) user would need the authority for that transaction (object S_TCODE).

I think if you search for "transaction to start a module pool program" then you would probably also have found some hits....

Cheers,

Julius

Former Member
0 Kudos

Former Member
0 Kudos

Hey Hiiiii guys ....

Thanks for all ur responses ....issue got resolved ....

thanks and regards

chandu reddy

0 Kudos

BTW: If you are coding an authority-check statement into your program (as mentioned by David) for object S_TCODE (as mentioned by me - at transaction start), I recommend that you do this by calling function module 'AUTHORITY_CHECK_TCODE' as you might want more than 1 transaction to be able to use this program, but no other.

Cheers,

Julius