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

Autority Check - SD

Former Member
0 Likes
948

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
Read only

Former Member
0 Likes
891

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

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

4 REPLIES 4
Read only

Former Member
0 Likes
891

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.

Read only

Former Member
0 Likes
891

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

Read only

0 Likes
891

Hi ,

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

Thanks ,

Sitaraman

Read only

Former Member
0 Likes
892

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