cancel
Showing results for 
Search instead for 
Did you mean: 

Authorisation Object

Former Member
0 Kudos

Hi.

I have a Z report which modify a Z table. I have requirement where I want to restrict user from updating data for plants other than his plant.Is any one have code for authorisation object which will help me to sort out this issue?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI osk,

**I have requirement where I want to restrict user from updating data for plants other than his plant

U need to Create an authorization object from Transaction SU21.

Ther you can give the authorirization fields.

**Is any one have code for authorisation object which will help me to sort out this issue?

<b>Just check out this thread for the sample code.</b>

Hope this will help you, incase of any concerns just let us know.

Cheers

Sunny

Rewrd points, if found helpful

Former Member
0 Kudos

Hi

Create the Authorisation object and assign to the profile of the valid user.

Assigning to the profile is the work of the basis.

Use the object in your program

Syntax

AUTHORITY-CHECK OBJECT 'XXXXXX'

ID 'ALLOWED' FIELD 'X'.

IF sy-subrc = 0.

He allowed to execute the Report

ELSE.

Not allowed

ENDIF.

XXXXXX----


Name of the Authorization object

Authorisation Object Creation

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).

Award some points if it helps you

Regards,

Manoj B Gupta

ferry_lianto
Active Contributor
0 Kudos

Hi Osk,

Please chcek this links on how to setup authorization object.

http://help.sap.com/saphelp_nw04s/helpdata/en/52/671285439b11d1896f0000e8322d00/content.htm

http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm

Also check this link as well for sample code. Please go to Authorization Utillities section.

http://www.guidancetech.com/people/holland/sap/abap/

Hope this will help.

Regards,

Ferry Lianto

vinod_gunaware2
Active Contributor
0 Kudos

VIEW_AUTHORITY_CHECK

call function 'AUTHORITY_CHECK_TCODE'

exporting

tcode = 'SE13'

exceptions

ok = 1

not_ok = 2

others = 3.

regards

vinod