2008 Apr 14 10:19 AM
Hi All,
I have a report which displays information based on cost center.
Now I have to restrict so that the user will be able to view the data from their cost center only.
We are maintaining cost center based on authorization object.
Here my requirement is to pick up the responsible cost center for the users.
Please help me to find out this.
Thanks,
Arun
2008 Apr 14 10:23 AM
Hi
U need to get all Cost Center in according to selection-screen and then do a check of your authorization object by AUTHORITY-CHECK statament.
If the control fails you need to not to show the cost center.
Max
Hi All,
I have a report which displays information based on cost center.
Now I have to restrict so that the user will be able to view the data from their cost center only.
We are maintaining cost center based on authorization object.
Here my requirement is to pick up the responsible cost center for the users.
Please help me to find out this.
Thanks,
Arun
2008 Apr 14 10:23 AM
Hi
U need to get all Cost Center in according to selection-screen and then do a check of your authorization object by AUTHORITY-CHECK statament.
If the control fails you need to not to show the cost center.
Max
2008 Apr 14 10:25 AM
Hi Max,
is there is anyway to get cost center details from tables.
Thanks,
Arun
2008 Apr 14 12:59 PM
Hi
No! There isn't.
U can check the cost center only after selecting it from database, u can't do it while selecting it.
SELECT * FROM <TABLE> WHERE ....
AUTHORITY-CHECK OBJECT <OBJECT>
ID <FIELD> FIELD <TABLE-FIELD>.
IF SY-SUBRC = 0.
WRITE <TABLE-FIELD>.
ENDIF.Max