Sub topic 3
Roles and authorizations for key users
This chapter explains which roles and authorizations a key user needs to create extensions in SAP S/4HANA, and how to design those roles safely. It assumes you can navigate the SAP Fiori launchpad and know the difference between key user, developer and side-by-side extensibility from the overview chapter. You don't need to write ABAP.
Why authorization matters for extensions
A key user extension changes how a live system behaves. A new custom field shows up in screens, reports and APIs. Custom logic runs inside standard business processes such as posting a sales order. An extension created by the wrong person, or in the wrong system, can slow down a process or expose data.
SAP therefore treats extensibility as a privilege, not a default. Having a normal business role does not let you open the extensibility apps. The rights have to be assigned on purpose. This protects the clean core, because only people who are trusted to extend the system can change its behavior.
There are two separate questions:
- Who may create and change extensions?
- Who may use the result, for example see or edit a custom field?
The first is controlled by the extensibility roles described here. The second is controlled by the ordinary business roles of each user, which are described later in this chapter.
The building blocks: users, roles, catalogs and apps
SAP S/4HANA uses the same role model for key user tools as for every other Fiori app. Four terms matter:
- A business user is a person with a logon in the system.
- A business role is a bundle of access rights that you assign to business users. Examples are "Administrator" or "Sales Manager".
- A business catalog is a group of apps and the authorizations they need. Business roles are built from catalogs.
- An app is a launchpad tile, such as Custom Fields.
The key user extensibility apps are bundled in the business catalog Extensibility (technical ID SAP_CORE_BC_EXT). You don't assign the catalog to a user directly. You assign a business role that contains it.
Business user -> Business role -> Business catalog -> Apps + authorizations
(person) (e.g. custom) SAP_CORE_BC_EXT (Custom Fields and Logic, ...)SAP delivers business role templates that already include this catalog. Names and contents differ slightly between releases and between on-premise and cloud editions, so check the role templates in your own system. The usual approach is to copy a template into your own namespace (names starting with Z or Y) and then trim or extend it.
What the Extensibility catalog gives a user
The catalog opens the key user apps and grants the technical authorizations they need behind the scenes. Typical apps include:
| App | What the user can do |
|---|---|
| Custom Fields (part of Custom Fields and Logic) | Create, publish and edit custom fields, and manage the business contexts they belong to |
| Custom Logic | Write and activate BAdI implementations in the restricted ABAP editor |
| Custom CDS Views | Define custom data models for reporting on released objects |
| Custom Business Objects | Create small, self-contained data models with their own persistence |
| Extensibility-related transport and export apps | Collect extensions and prepare them for other systems |
Not every app is available in every release or deployment. Treat the table as the intended scope of the catalog, and confirm the exact app list in the role maintenance of your system.
What a key user can't do
The extensibility roles don't give a key user general ABAP development rights. In particular, the user does not get:
- access to the classic ABAP development tools for changing standard objects
- the right to call unreleased function modules or classes from custom logic
- the right to modify standard database tables
The ABAP language restrictions are covered in a later chapter. The point here is that the role and the language restrictions work together. A user with the extensibility role can write logic, but only inside the allowed boundary.
Typical role setup
Most projects separate three groups of people.
| Group | Needs | Example task |
|---|---|---|
| Key users (extension creators) | Business role with the Extensibility catalog | Add a custom field to the sales order and publish it |
| Business users (consumers) | Their normal business roles, plus access to the extended objects | Enter a value in the new field |
| Administrators | User and role maintenance, plus transport rights | Assign roles, release transports |
A key user is often also a power user in the business area. A sales key user might hold a sales role and a custom role that carries the Extensibility catalog. Combining roles is normal. Authorizations from all assigned roles add up.
Giving key users the role: a worked example
Suppose your company wants a key user, Maria, to add custom fields to sales documents. Here is a sensible sequence. Screen names can vary by release, so use this as a pattern.
- The administrator opens the app for maintaining business roles and copies a role template that contains the Extensibility catalog. The copy is named
Z_BR_KEY_USER_SALES. - In the copy, the administrator checks which catalogs are included and removes any that Maria does not need. Fewer catalogs means less risk.
- The administrator opens the app for maintaining business users, finds Maria, and assigns the new role.
- Maria logs on again. A new logon refreshes her authorizations and launchpad content.
- Maria opens the launchpad and looks for the Custom Fields and Logic tile. If it appears, the role works.
If the tile is missing, the cause is almost always one of three things: the role isn't assigned, the user hasn't logged on again, or the catalog isn't included in the copied role.
Restrictions by business context
Every custom field belongs to a business context, for example sales documents or products. You will meet this concept in detail in a later chapter. For roles, one point matters: a user who may use the Custom Fields app can usually work only with contexts that are available in that system and that the user's authorizations cover. If a context is missing from the selection, check two things. First, whether the context is released for key user extensibility in your release. Second, whether your role carries the authorizations that belong to the underlying business area.
Don't assume that access to the app means access to every business object. Test with a real key user, not only with an administrator who has broad rights.
Authorizations for using extended objects
Creating a field and being allowed to see it are two different things. After publication, a custom field appears in the standard apps that use its business context. Whether a given business user sees or can edit it depends on:
- whether the user has access to the app that shows the field
- whether the app or the underlying object has its own authorization checks
- whether the field has been added to the screen layout, report or form that the user opens
A custom field does not bring its own authorization. It inherits the checks of the business object it belongs to. A user who may change a sales order can normally change the custom field on that sales order. If a field holds sensitive data, such as a margin or a personal note, you can't protect it with a field-level role alone. Restrict the app or object, hide the field from the relevant layouts, or avoid exposing it through APIs. Plan this before you publish.
Separation of duties and system landscape
In a typical landscape you have a development system, a quality system and a production system. Extensions should be created in the development system and moved to the others by transport. For roles, that means:
- Give the extensibility role to key users in the development system.
- In production, keep it with a very small group, or leave it out entirely if your process allows. Changes made directly in production can't be tested first.
- Keep transport release rights separate from creation rights where your company policy requires a four-eyes principle. One person creates the field, a different person releases the transport.
The transport mechanism itself is covered in a later chapter. Here it is enough to know that the right to create an extension and the right to move it are two separate authorizations.
Common errors and how to read them
| Symptom | Likely cause | What to check |
|---|---|---|
| The Custom Fields and Logic tile doesn't appear | The role isn't assigned, or the catalog is missing from it | Role assignment, the catalog in the role, and a fresh logon |
| The app opens but a business context is missing | The context isn't available in your release or system, or the role covers too little | The list of released contexts and the user's authorizations |
| A field was created but nobody sees it | The field is not published, or not added to the UI, report or form | The publication status, then the layout of the target app |
| A user sees "not authorized" when saving custom logic | The role lacks the logic or activation authorization | The catalog contents and the authorization trace for the user |
| A key user can change production but should not | The role is assigned in the wrong system | Role assignments per system, not per person |
When you need to find out which authorization is missing, ask the affected user to repeat the action and then read the authorization trace or the authorization failure log in your system. Don't give broad rights as a quick fix. Start from the failed check and add only what it names.
Checklist for role design
- Copy delivered role templates instead of editing them, so upgrades don't overwrite your changes.
- Assign the Extensibility catalog only to named key users.
- Test the role with a real key user, not with an administrator.
- Decide separately who may publish, and who may release transports.
- Review data sensitivity before publishing a field.
- Recheck assignments regularly.
Exercise
A key user can see the Custom Fields and Logic tile in the development system, but not in the quality system, even though the same business role name is assigned in both. Name two things you would check and explain why the first check matters.
Show answer
Check that the role is actually assigned to the user in the quality system, and that the user has logged on again since the assignment. Role assignments are maintained per system, so having the role in development says nothing about quality. Also check that the role in the quality system contains the Extensibility catalog (SAPCOREBC_EXT), because roles with the same name can differ if the roles were created separately or if a transport did not bring them over. The first check matters because it is the most common cause and takes seconds. Fixing it avoids adding rights that the user does not need.
Exercise
A custom field that holds an internal margin value was published on the sales order. The role of a sales assistant doesn't include the Extensibility catalog. Can the assistant see the field? What would you change to protect the value?
Show answer
Yes, probably. The Extensibility catalog only controls who may create extensions. It does not control who sees the result. A custom field inherits the authorization checks of the sales order, so any user who can display the sales order, and any API that returns it, may show the field. To protect the value, hide the field from the layouts the assistant uses, restrict access to the relevant app or object, or avoid publishing the field to APIs. Decide this before publication.