12-23-2008 9:14 AM
Hi all,
i'm a developer and i would like to do an authorization control for cost center with standard hierarchy. For example, my hierarchy is like this :
. DCL (Cost center group)
. DC1 (Cost center group)
- 750680-000 (Cost center)
- 750680-001 (Cost center)
. ACL (Cost center group)
. ACL1 (Cost center group)
. AD1 (Cost center group)
- 560190-000 (Cost center)
- 560190-001 (Cost center)
Imagine a SAP user with authorization CO-OM Responsibility Area : HIACLPDCL. Well my need is simple, i want to check if a user have authorization to work with cost center 750680 (yes, of course) or 560190 (no he can't).
Thanks for your help.
12-23-2008 1:06 PM
Use object K_CCA. it's a general object for working with cost-centers and can be assigned a resparea using the co hierarchy.
to do a check on this object:
AUTHORITY-CHECK OBJECT 'K_CCA' ID 'RESPAREA' FIELD '*'
ID 'KSTAR' FIELD '*'
ID 'CO_ACTION' FIELD '1006'.
this example - courtesy of SAP, i took from include LKAROF06.
12-23-2008 1:33 PM
Hi Mylene, thanks for your answer.
I don't understand one thing : i would like to check authorization for cost center in transaction ME21N and ME22N. If i look at the authorization objects run by these transactions (by using transaction SU24), normally the 'K_CCA' object must be checked and it's not the case and i don't know why. Many people on SDN make a user-exit to check authorization. I'm lost
12-23-2008 1:51 PM
you are correct. ME21N/22N do not check on that object,s o you will have to do it in a user exit. just go on with what you started, this is correct in every aspect of the thing. i don't know why SAP isn't doing it in SAP-standard ...
12-23-2008 2:35 PM
Ok thanks i will check cost center in user-exit. I want to use standard hierarchy, do you know that ?
12-23-2008 5:56 PM