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

Authorisation check

Former Member
0 Likes
685

Hi experts

Can any one explain how authorisation check performs and how can we code and implement

1 ACCEPTED SOLUTION
Read only

rodrigo_paisante3
Active Contributor
0 Likes
629

Hi,

Authorization object is a way to verify if the user have permitted activities to the object.

You can create a code simple using the Pattern button, like this:


AUTHORITY-CHECK OBJECT '/ECRS/WL'
         ID '/ECRS/RPC' FIELD '__________'
         ID '/ECRS/POI' FIELD '__________'
         ID 'ACTVT' FIELD '__________'.

3 REPLIES 3
Read only

rodrigo_paisante3
Active Contributor
0 Likes
630

Hi,

Authorization object is a way to verify if the user have permitted activities to the object.

You can create a code simple using the Pattern button, like this:


AUTHORITY-CHECK OBJECT '/ECRS/WL'
         ID '/ECRS/RPC' FIELD '__________'
         ID '/ECRS/POI' FIELD '__________'
         ID 'ACTVT' FIELD '__________'.

Read only

Former Member
0 Likes
629

The authorization check checks the authorization of the user for the authorization Object and it returns the sy-subrc.

based on the sy-subrc value you have to make the corresponding coding.

Eg,

AUTHORITY-CHECK OBJECT var_authobject

ID 'TCD' FIELD 'VA01'

ID 'ACTVT' FIELD '*'.

IF sy-subrc NE 0.

MESSAGE 'You are not authorized to view this' type 'E'.

endif.

you can create your own authorization object using the transaction SU21

Read only

Former Member
0 Likes
629

Hi,

You can create or see the all the authorization objects in transaction SU21.

You cna speicfy the fileds and as well as permitted activites for this authorization objects.

Please see any of the standard objects.

Definition

Enables you to restrict user access to sales activities within specified sales areas, sales groups, and sales offices.

Defined fields

The authorization object contains seven fields:

Activity - Determines which sales activity-related tasks a user may carry out in the specified sales areas, sales group, and sales office. Assign the activities as follows:

Task Activity

Create or generate 01

Change 02

Display 03

Distribution channel - Specifies the distribution channel of the sales area.

Division - Specifies the division of the sales area.

Sales activity type - Specifies the types of sales activity which the user is allowed to process.

Sales group - Specifies the sales group to which the user belongs.

Sales office - Specifies the sales office to which the user is assigned.

Sales organization - Specifies the sales organization of the sales area.

Note

A user who is defined as the responsible employee in the partner screen of a sales activity may process the sales activity even though he or she is not authorized with this authorization object. Conversely, if you do not define any authorization objects for users, only those users who are defined in sales activities as partners are authorized to process sales activities.

If a user does not enter some of the organizational data in a sales activity (for example, the sales office), then the corresponding field in the authorization for the user must be left blank.

Example

User A is assigned to both a sales group and a sales office and is allowed to carry out all sales activity-related tasks in one sales area only. User A has the following authorizations:

Activity = *

Distribution channel = 01

Division = 01

Sales activity = *

Sales group = US1

Sales office = 1000

Sales organization = US01

User B is assigned to the same sales group and sales office and is allowed to display sales activities in all sales areas to which sales organization US01 is assigned. User B has the following authorizations:

Activity = 03

Distribution channel = *

Division = *

Sales activity type = *

Sales group = US1

Sales office = 1000

Sales organization = US01

Reward points if useful

Regards,

Sasi