Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization for cost center with standard hierarchy

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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 ...

0 Kudos

Ok thanks i will check cost center in user-exit. I want to use standard hierarchy, do you know that ?

0 Kudos

you said so before so take K_CCA - it should do ...

good luck!