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

Hi,

Can any one give me brief description on the below ...

1) what do you mean by authority check & how we can create them ?

2) How we can compare authority checks with Lock objects ?

Instead of sending links, just give me example with explanation ...would be really useful for me.

i will surely reward for helpful answers.

jaya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Jaya,

A programmer wants to make an authorization check before bookings for business customers can be changed.

To do this, the programmer should create an authorization fields ( ACTVT and CUSTTYPE ) and assign for each field defined the value to be checked ( 02, B ). Authorization fields are created under Tools--->ABAP Workbench>Development->Other tools>Authorization objects->Fields (transaction SU20).

Programmers should also create an authorization object (here S_TRVL_BKS ) and assign the authorization object to an object class.

Authorization fields are created under Tools-->ABAP Workbench>Development>Other tools?Authorization objects-->Objects (transaction SU21). Authorization objects can also be created in the Object Navigator (transaction SE80).

You program the authorization check using the ABAP statement AUTHORITY-CHECK .

AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'

ID 'ACTVT' FIELD '02'

ID 'CUSTTYPE' FIELD 'B'.

IF SY-SUBRC <> 0.

MESSAGE E...

ENDIF.

The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.

for more details follow this link.

http://help.sap.com/saphelp_46c/helpdata/en/52/6712ac439b11d1896f0000e8322d00/content.htm

regards,

Aneesh.

1 REPLY 1

Former Member
0 Kudos

Hi Jaya,

A programmer wants to make an authorization check before bookings for business customers can be changed.

To do this, the programmer should create an authorization fields ( ACTVT and CUSTTYPE ) and assign for each field defined the value to be checked ( 02, B ). Authorization fields are created under Tools--->ABAP Workbench>Development->Other tools>Authorization objects->Fields (transaction SU20).

Programmers should also create an authorization object (here S_TRVL_BKS ) and assign the authorization object to an object class.

Authorization fields are created under Tools-->ABAP Workbench>Development>Other tools?Authorization objects-->Objects (transaction SU21). Authorization objects can also be created in the Object Navigator (transaction SE80).

You program the authorization check using the ABAP statement AUTHORITY-CHECK .

AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'

ID 'ACTVT' FIELD '02'

ID 'CUSTTYPE' FIELD 'B'.

IF SY-SUBRC <> 0.

MESSAGE E...

ENDIF.

The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.

for more details follow this link.

http://help.sap.com/saphelp_46c/helpdata/en/52/6712ac439b11d1896f0000e8322d00/content.htm

regards,

Aneesh.