Last reviewed · Rinexis SAP security team
A derived role in SAP is a single role that inherits its menu and authorization values from a master (parent) role in PFCG and differs only in its organizational level values, such as company code or plant. It lets one functional role design be reused across many organizational units while staying identical in what users can do.
How master and derived roles relate
PFCG roles covers the three role types. This article goes deeper on the master and derived pattern. A derived role is created like any single role in PFCG; on the Description tab you enter the master role in the derive-from field. From then on the derived role is linked to its parent, and the link is stored in table AGR_DEFINE, field PARENT_AGR.
| Part of the role | Source | Can it differ in the derived role? |
|---|---|---|
| Menu (transactions, reports, apps) | Master role | No. The menu is read-only in the derived role |
S_TCODE and other non-org authorization values | Master role | Only temporarily: manual changes are overwritten the next time the master pushes its values |
Organizational level values (BUKRS, WERKS, VKORG and so on) | Derived role | Yes. This is the whole point of derivation |
| Generated profile | Derived role | Yes. Each derived role generates its own profile |
| User assignment | Derived role | Yes. Users are assigned to derived roles, not usually to the master |
Inheritance has one level. A master is a single role, and a derived role cannot serve as the master for another derived role. Composite roles take no part in derivation at all, although derived roles are often bundled into composite roles.
Maintaining org levels per derived role
Each derived role carries its own org level values, set in the Org. levels dialog of the Authorizations tab. When the master pushes its authorization data, PFCG keeps the derived role's org levels and overwrites everything else, so the org levels must be maintained in each derived role and nowhere else.
- Leave org levels in the master empty and assign no users to it, so it is obvious which values belong to which child.
- Never use
*in a derived role's org level unless the role is meant to cover every unit. A stray*silently turns a company-code role into a global one. - Check org levels after every master push. Fields that are not org levels are not protected, so a value tailored in one derived role is lost when the master changes.
For large role families, on current releases mass maintenance transaction PFCGMASSVAL can set org level and field values across many roles at once; test it in a development client first and review the change log before transporting.
Pushing changes from the master
All functional changes start in the master. Add a transaction to the master menu, maintain and generate its authorizations, then pass the result to the derived roles.
- Change the menu of the master and save. Adjust the derived roles so they take over the new menu.
- Open the master's authorization data, merge the changes, fill new open fields and generate the profile.
- Use the function to generate derived roles from the master's authorization maintenance. PFCG copies the master's authorization values into every derived role, keeps each child's org levels and generates their profiles.
- Open any derived role that now shows open org level fields (a new transaction can bring an org level the child has never had) and fill them.
- Run user comparison, for example with
PFUD, so assigned users receive the regenerated profiles.
Transport the master together with its derived roles. A derived role that arrives in the target system without its master, or with an older master, can end up with a menu and authorization data that do not match the design.
When to use derived roles
Derivation pays off when the same job is done in many organizational units and access must be restricted to each unit. Typical splits are:
- Finance roles per company code (
BUKRS), such as accounts payable clerk for each legal entity. - Logistics roles per plant (
WERKS) or purchasing organization (EKORG). - Sales roles per sales organization (
VKORG), distribution channel and division.
Derivation is the wrong tool when the units need different transactions. If one plant needs a transaction the others must not have, that is a different job, so build a separate master or a separate single role rather than forcing the difference into a derived role.
Limits and org field promotion
The design rule is strict: only org levels vary. You cannot add a transaction to a derived role, and changes to non-org fields do not survive the next push from the master. A common problem is a field that must vary by unit but is not an org level, such as authorization group (BEGRU) or cost center in a controlling object.
Such a field can be promoted to an org level with report PFCG_ORGFIELD_CREATE, after which PFCG maintains it once per role and protects it during derivation. It changes how every role containing that field is maintained, so treat it as a design decision and run it in development first.
After promotion, existing roles must be updated so the new org level is filled consistently (report PFCG_ORGFIELD_ROLES), and the promotion can be reversed with PFCG_ORGFIELD_DELETE. Plan it before mass derivation, not after hundreds of derived roles exist.
Naming and SoD implications
Name derived roles so each one shows its master and its org value: the master's name plus a suffix such as the company code or plant. A role list then sorts into families, and a reviewer can see at a glance that the derived role ending in 1000 should only grant company code 1000.
For segregation of duties, derived roles cut both ways. A conflict inside the master is copied into every derived role, so fix intra-role conflicts in the master once. Across roles, a user who creates vendors in company code 1000 and pays vendors in company code 2000 holds both functions, but not for the same entity.
Whether that counts as a conflict depends on the ruleset. An action-level ruleset that ignores org values will flag it. In SAP GRC Access Control, organizational rules let the analysis treat conflicts as relevant only when both sides apply to the same org value, which reduces false positives but must be maintained like any other rule. See the SoD matrix for how org-aware rules are defined.
Frequently asked questions
What is the difference between a master role and a derived role in SAP?
The master (parent) role holds the menu and the authorization values. A derived (child) role inherits both from the master and keeps only its own organizational level values, such as company code or plant. Users are normally assigned to derived roles, not to the master.
Can I add a transaction to a derived role?
No. The menu of a derived role is taken from the master and cannot be changed in the derived role. Add the transaction to the master role, generate its authorizations and pass the changes to all derived roles, or build a separate role if only one unit needs it.
Why did my changes in a derived role disappear?
Authorization values in a derived role, other than organizational levels, are overwritten whenever the master role passes its authorization data to its derived roles. Make the change in the master, or promote the field to an organizational level if it must genuinely differ per derived role.
Which table shows the master role of a derived role?
Table AGR_DEFINE stores each role's definition, and its field PARENT_AGR holds the master role for derived roles. Selecting AGR_DEFINE by PARENT_AGR lists every derived role that belongs to a given master.
Do derived roles create SoD conflicts?
A conflict inside the master role is copied into every derived role, so it is multiplied, not created. Users holding derived roles for different organizational units may also be flagged, and whether that is a real conflict depends on whether the ruleset considers organizational values.
Sodly analyzes users and roles, including derived roles, against your ruleset and reports conflicts by user and by role, rated Critical to Low and grouped by process area. A conflict designed into a master shows up across its derived roles, so the role-level view points you to the one role design to fix.
Our consultants design and rebuild master and derived role families as part of authorization design and role redesign engagements, from org level strategy to naming and SoD checks before transport.