cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization chaeck in report based on Table

Former Member
0 Kudos

My client want report to be displayed based on the Authorization. For example when user is entering Input parameters like Plant, Sales org. and executing the report it should check for the Authorization of the user for that plant and Sales org.

the reason being they don't want to allow other division to see the important data of that report. As this report is used by all the division and i can not put check in Role assignment as many of the roles are there with same t-code of report and where plant and sales org is mentioned as * in that roles.

i want to put check based on ABAP coding and write with the help of Table and Field in order to Check the Authorization of Plant and sales org for that particular USER PROFILE.

Bacause changing in the profile will have huge effect on the report functionality as this reoprt is used in ALL over india level and our client Business spread all over iNdia Level.

If anybody know how to do that can help alot.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Of course, not to mention you've to attach the object to the user id and also am assuming that each user has a plant role attached.

You'll have to modify the usage of AUTHORITY-CHECK stmnt acc. to ur scenario, with some checks included.

Rgds,

Raghu.

Former Member
0 Kudos

hi,

Check the foll.:

AUTHORITY-CHECK OBJECT object ID name1 FIELD f1

Explanation of IDs:

object

Field which contains the name of the object for which the authorization is to be checked.

name1 ...

Fields which contain the names of the

f1 ...

Fields which contain the values for which the

AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f.

Create an object say, z_auth with auth fields as plant(WERKS), Sales Org(VKORG) etc..whatever is relevant.

Now, in ur report, U can write..

say, pa_plant is a parameter in ur seln screen.

AUTHORITY-CHECK OBJECT 'ZAUTH'

ID 'WERKS' FIELD pa_plant.

IF sy-subrc NE 0.

  • "No authorization for plant <pa_werks>"

MESSAGE exxx WITH pa_plant.

ENDIF.

I hope this helps.

Plz Reward suitable points, if it helps.

Rgds,

Raghu.