Last reviewed · Rinexis SAP security team
PFCG is the SAP Role Maintenance transaction (Profile Generator). A PFCG role bundles a menu of transactions, apps and reports with the authorization objects and values they need, then generates an authorization profile that is assigned to users. Roles come in three types: single, composite and derived.
What a PFCG role contains
A role is maintained across a set of tabs in PFCG. Each tab controls a different part of what the user receives:
| Tab | What it holds |
|---|---|
| Description | Role text, long description and, for derived roles, the role it is derived from |
| Menu | Transactions, reports, URLs and, in S/4HANA, Fiori launchpad catalogs and spaces |
| Authorizations | Authorization objects, field values and org levels; the generated profile |
| User | Assigned users with validity dates, and the user comparison |
| Personalization | Role-specific personalization data for certain applications |
Transactions added to the menu are written into S_TCODE and, through SU24 proposals, pull in the authorization objects each transaction checks. Everything ends up in the AGR_* tables, with the authorization values in AGR_1251.
Single, composite and derived roles
| Type | What it is | Typical use |
|---|---|---|
| Single role | Holds a menu and its own authorization data and generates a profile | The building block for one task or job function |
| Composite role | A container of single roles; it has no authorization data or profile of its own | Bundling the single roles for a job so it can be assigned in one step |
| Derived role | A single role that inherits menu and authorization values from a master (parent) role; only org level values differ | The same job across company codes, plants or sales organisations |
- Composite roles contain single and derived roles only; a composite role cannot contain another composite role.
- In a derived role the menu cannot be changed. Authorization changes are made in the master and passed on to the derived roles, which keeps them identical apart from org levels.
- Assigning a composite role assigns its single roles to the user, so user comparison and SoD analysis always work on the single roles underneath.
Organizational levels
Organizational levels are authorization fields such as company code (BUKRS), plant (WERKS) or sales organisation (VKORG) that PFCG maintains once for the whole role instead of object by object. Set the value in the Org. levels dialog and every object containing that field inherits it.
Org levels are what make derived roles work: the master role carries the functional access, and each derived role sets its own org level values. Customer-specific fields can be promoted to org levels with report PFCG_ORGFIELD_CREATE, which is worth doing before mass derivation, not after.
A * in an org level gives access across every organisational unit. It is a common audit finding in roles that were meant to be restricted.
Profile generation and user comparison
Authorization data in a role has no effect until a profile is generated. PFCG generates a profile (names begin with T- by default) and links it to the role in AGR_1016. The traffic lights on the Authorizations and User tabs show whether the profile is current and whether users have received it.
- Maintain the menu, then open the authorization data and fill in open fields and org levels.
- Generate the profile. Status changes from changed to generated.
- Run the user comparison so the generated profile is added to or removed from the user master records of assigned users.
User comparison can be run from the role, for all roles with PFUD, or as a scheduled job with report PFCG_TIME_DEPENDENCY, which also removes profiles when assignment validity has ended. If the job is not scheduled, users can keep access after their role assignment has expired.
When a role's menu changes, the authorization data must be merged in expert mode (read old status and merge with new data). Objects added manually, and values changed from the SU24 defaults, are kept and flagged with their maintenance status.
Role naming conventions
SAP has no mandatory naming scheme beyond the customer namespace (roles not starting with SAP_; most teams use Z or Y). A workable convention encodes the role type, the process area and, for derived roles, the org value, so that a role list sorts into readable families.
- Prefix by type, for example a letter for single, composite and derived roles.
- Process area next (
FI,MM,SD), then the task or job. - Derived roles carry the org value at the end, such as the company code.
- Never assign or modify delivered
SAP_*roles directly; copy them into the customer namespace.
Role design principles
- Design single roles around tasks, not people. A role should do one business activity cleanly, so it can be combined without creating conflicts.
- Keep each single role free of SoD conflicts. Intra-role conflicts are inherited by every user of the role.
- Keep critical transactions and Basis access in separate, small roles with named owners.
- Maintain SU24 for custom transactions before adding them to roles, so authorization data is proposed consistently instead of added manually.
- Avoid manual profiles and direct
SAP_ALL-style assignments; everything a user holds should come from a role. - Check SoD at role design time and again before transport, not only after users are assigned.
Frequently asked questions
What is the difference between a composite role and a derived role?
A composite role is a container that groups several single roles for assignment and has no authorizations of its own. A derived role is a single role that inherits its menu and authorization values from a master role and differs only in its organizational level values.
What does user comparison do in PFCG?
User comparison updates the user master records so that each assigned user receives the role's current generated profile, and removes it when the assignment is deleted or expired. It can be run from the role, for many roles with PFUD, or as a background job with PFCG_TIME_DEPENDENCY.
Why does a user not get access after a role is changed?
Usually the profile was not regenerated after the change, or the user comparison has not run. Check that the Authorizations tab shows a generated profile and that the User tab shows the comparison as complete, then have the user log on again.
Can a composite role contain another composite role?
No. A composite role can contain only single roles and derived roles. To combine two composite roles for a user, assign both to the user or build a new composite role from their underlying single roles.
What is an organizational level in an SAP role?
An organizational level is an authorization field, such as company code or plant, that PFCG maintains once for the whole role. Its value is applied to every authorization object in the role that contains that field, and derived roles use different org level values from their master.
When a role carries both sides of an SoD risk, Sodly flags it by user and by role so it can be split into single-transaction versions and rebuilt in PFCG. Re-running the analysis on the rebuilt roles confirms the conflict is gone.
Our consultants use the same approach in authorization design and role redesign engagements, from task-based single roles to master and derived role families.