on 06-21-2008 7:15 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.