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: 

Autority Check - SD

Former Member
0 Kudos

Hi,

I need check autority for the transaction:

VA01 / VA02

VA41 / VA42

VA21 / VA22

VLN01N

For that i use the code :

AUTHORITY-CHECK OBJECT 'ZAGENCE'

ID 'AGENCE' FIELD xxxx. ('xvbak-vkbur. i don't know...)

ID 'ACTVT' FIELD '01'.

IF sy-subrc ne 0.

MESSAGE...

ENDIF.

When an user want save in this transaction, he check the autority (su01 profile) and if he has not the autority they are an error message.

I need to know where i can implemented thid code for these transactions?

Thank you for your help and your reply.

Spawnrad

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can have roles defined by the Security Team for this Standard Transaction. You may need authority checks only in custom developments.

Hope it helps

Thanks,

Jayant

4 REPLIES 4

Former Member
0 Kudos

Hi ,

If u are calling the transactions from ur program u can place the code in the INITIALIZATION part of ur code.

Eg:

INITIALIZATION.

AUTHORITY-CHECK OBJECT 'S_TCODE' " for t-codes

ID 'TCD'

FIELD 'ZIT_AM_POTEXT'.

IF sy-subrc NE 0.

MESSAGE e001 WITH text-e10 'ZIT_AM_POTEXT'.

EXIT.

ENDIF.

Hope this helps.

Former Member
0 Kudos

I need an user-exit for this transaction when i save the document to check the autority.

0 Kudos

Hi ,

No need to write an authorization code , u can ask ur security team to add these t-codes in user roles .

Thanks ,

Sitaraman

Former Member
0 Kudos

You can have roles defined by the Security Team for this Standard Transaction. You may need authority checks only in custom developments.

Hope it helps

Thanks,

Jayant