Sub topic 13
Designing and maintaining custom roles
This chapter assumes you know what a business catalog, a business role and an authorization object are, and that you can open PFCG and the Fiori launchpad. It covers how to build your own roles on top of SAP content and keep them maintainable.
Start from a template, then copy
SAP delivers business role templates, such as the ones for accounts payable or sales processing. Do not edit them. SAP overwrites them on upgrade, so your changes would be lost. Copy the template into the customer namespace (names starting with Z or Y) and change the copy.
The same rule applies to business catalogs. Copy a catalog only when you need to remove or add apps. Otherwise reference the SAP catalog directly, so that SAP's updates reach your role.
Design principles
- One role per job function. A role such as
ZBR_AP_ACCOUNTANTis easier to review than a role that mixes several jobs. - Keep catalogs small and focused. A catalog should group apps that belong to one task area.
- Separate content from restriction. Keep the app set in the catalog and set organizational values in the role. The same role can then serve several company codes.
- Use a naming convention. Prefix by type and area, for example
ZBC_for catalogs andZBR_for roles, so that you can find them with a search.
| Object | Example name | What changes it |
|---|---|---|
| Business catalog | `ZBC_AP_PROCESSING` | Apps added or removed |
| Business role | `ZBR_AP_ACCOUNTANT` | Catalogs, spaces, restrictions |
| Restriction values | Company code `1010` | Organizational changes |
The lifecycle of a role
A custom role moves through a repeatable cycle. Changes are made in a development system, tested, and transported to production. Do not change roles directly in production.
- Copy and adjust. Copy the template, then remove apps that the job does not need.
- Test. Assign the role to a test user whose only role is the new one. A user with many roles hides missing authorizations, because another role may supply them.
- Transport. Move the role and its catalogs together in one transport request.
- Review. Revisit the role on a schedule, for example once a year, and after each upgrade.
Maintaining roles after upgrades
SAP changes the content of its catalogs and the SU24 default values between releases. After an upgrade, check the following:
- In PFCG, look at the authorization data of each custom role. PFCG shows when the SU24 defaults of an included app have changed, and you adjust and regenerate the profile.
- Compare your copied catalogs with the current SAP originals. A copied catalog does not receive new apps automatically.
- Re-run your test cases with the test user.
If you only need to add one app, prefer a small extra catalog assigned to the role over a full copy. Then the SAP catalog keeps receiving updates.
Documentation and ownership
Give each role an owner from the business side, who confirms that the role still matches the job. Write a short description in the role itself that states the job function and the restrictions. Record why each manual authorization change was made. Without this, reviewers cannot tell a deliberate change from a mistake.
Exercise
Your company wants a role for accounts payable clerks, and SAP delivers a template that is close, except that it contains one app the clerks must not use. What do you do, and why?
Show answer
Copy the SAP template into a custom role (Z namespace). Copy the business catalog that contains the unwanted app, remove the app from the copy, and use the copied catalog in your role. Never edit the SAP original, because upgrades overwrite it. Test with a user who has only this role, then transport the role and catalog together.
Exercise
After an upgrade, a copied catalog in one of your roles does not contain a new app that SAP added to the original catalog. Why does this happen, and how can you avoid it for the next role?
Show answer
A copy is independent of the original, so it does not receive SAP updates. Compare the copy with the SAP original after each upgrade. For future roles, reference the SAP catalog and add extra apps through a small separate custom catalog instead of copying the whole catalog.