When a user performs his daily tasks in the SAP CRM system, we may want to control what he may see, do, execute in the system based on ofcourse his PFCG authorization role(s) , but another factor might also be his assignment in the organizational model. Therefore on a regular basis I can assume that we would like to build in certain checks and based on the outcome of this check, for example show another screen configuration, disable editing of a certain field, or just hide some assignment blocks on an overview page...just making up some examples ...
When implementing SAP CRM at our customers, we normally setup an organizational model consisting out of:
- organizational units (O object)
- Positions (S object)
- Users (US object)
- Central Persons (CP object)
- Business Partner (BP object)
In the demo system I am using I briefly looked at the organization model using the transaction code PPOSA_CRM (display organization model).
Remark: most people probably use PPOMA_CRM which is basically the “maintenance” transaction code for the organizational model.
If we take a look at the screenshot below, we see most of these elements come back:
Ehm –just as a side remark: when changing/viewing the org model, I always do this via the SAPGUI. Although you can also do this using the WEBUI, I really hate the screens and user friendliness of these views. I think SAP might still try to do a better job at org model maintenance using the CRM WEBUI.
Now let’s look at the User “Michael Moore” who is assigned to the position S 5005226 (Michael Moore) and indirect assigned to the organizational unit O 50000709 (Purchasing West).
If technically (and I am not a technical guy – just a functional SAP consultant) you would need to write ABAP coding to find back the position assigned to a User, you may want to make use of a great CLASS I only recently learnt about: CL_CRM_PPM_UM_TOOLKIT
If I look at the details of this class CL_CRM_PPM_UM_TOOLKIT using transaction code SE24 I see the following methods:
In this post I will just briefly show the method “GET_ASSIGNMENTS_OF_USER”
Using the Test-button or F8-button in this class I see the following:
When executing the method “GET_ASSIGNMENTS_OF_USER” :
The UserID is the one which you could see in the earlier screenshot taken of the organizational model!
Viewing the details of the output:
- you could also find back this information in table HRP1001. But that takes a bit of effort...
- Directly use function module RH_STRUC_GET