‎2008 Apr 16 2:22 PM
Hi experts
Can any one explain how authorisation check performs and how can we code and implement
‎2008 Apr 16 2:30 PM
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 '__________'.
‎2008 Apr 16 2:30 PM
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 '__________'.
‎2008 Apr 16 2:37 PM
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
‎2008 Apr 16 2:39 PM
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