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: 

Authorization check for a program (Not SAP standard) from SA38(End user )

Former Member
0 Kudos

Hi All,

I have a requirement which involved in restricting the user to execute the program using SA38.Please suggest me.

I went to SU20 but could not find the right way how to do?

Thanks in advance

4 REPLIES 4

Former Member
0 Kudos

1) check authority object for field for whcich u want to check authority is present or not

for this use transaction su20 /su21

2)if it is not u create object by using su21.

3)after that in programm use fm AUTHORITY-CHECK OBJECT .

ex---AUTHORITY-CHECK OBJECT 'V_LIKP_VST'

ID 'VSTEL' FIELD t_sel-vstel

ID 'ACTVT' FIELD '01'

ID 'ACTVT' FIELD '02'

ID 'ACTVT' FIELD '03'

ID 'ACTVT' FIELD '04'

ID 'ACTVT' FIELD '18'

ID 'ACTVT' FIELD '24'

ID 'ACTVT' FIELD '25'

ID 'ACTVT' FIELD '85'.

IF sy-subrc <> 0.

t_authority-vstel = t_sel-vstel.

APPEND t_authority.

CLEAR t_authority.

Former Member
0 Kudos

In INITIALIZATION.

Check for System variable SY-TCODE eq 'SA38'.

If sy-subrc NE 0.

*Error msg

Endif.

athavanraja
Active Contributor
0 Kudos

s_tcode object only assing the required transaction.

example Z*, SA38, etc.

Regards

Raja

Former Member
0 Kudos

Hello Naveen,

Did u look at attaching an authorisation object in the atribute of the program itself. This will stop him from executing the program from SE38.