Sub topic 6
From app to authorization: SU24 defaults and service access
This chapter assumes you know what an authorization object, field and activity are, how a PFCG role generates a profile, and what a business catalog contains. It covers how an app on the launchpad is tied to the authorization objects it needs, and how you use that link when you build or analyze a role.
The problem this solves
A business catalog makes an app visible. It does not let the app work. When a user opens an app, the system runs two kinds of checks:
- Start authorizations, which decide whether the user may start the app and call its backend services.
- Application authorizations, which decide what the user may do with data inside the app, for example display or change a document for one company code.
Someone has to say which authorization objects belong to which app. If every role administrator worked this out by hand, roles would be inconsistent and often too broad. SAP solves this with default values stored per app. Those defaults are maintained in transaction SU22 (SAP's own values) and SU24 (your customer values).
Where the defaults are stored
An app is identified by its authorization default entry. The entry lists:
- The authorization objects the app checks.
- For each object, whether the check is active.
- A proposal for each field, such as
ACTVT = 03, or an empty field that you must fill.
The tables behind this are USOBT_C and USOBX_C for customer values, and USOBT and USOBX for SAP values. You do not edit them directly. You maintain them with SU24.
The check indicator on each object controls what PFCG does with it:
| Check indicator | Meaning | Effect in PFCG |
|---|---|---|
| Check | The object is checked in the app and is proposed with its values | Added to the role, usually with values |
| Check/Maintain | The object is checked in the app and has a proposal | Added to the role and open for editing |
| Do Not Check | The object is not checked for this app | Not added to the role |
| Not Maintained | No decision recorded | Not added until someone decides |
Treat the "Do Not Check" setting with care. It does not remove the check from the code. It only stops PFCG from proposing the object, so a user could fail with a missing authorization at runtime.
Two layers: start and service authorizations
For an SAP Fiori app, the start authorization is not an ordinary authorization object in the first place. It is the combination of the catalog assignment and the service authorizations.
An OData service used by an app has its own authorization data. The proposal for this uses the objects S_SERVICE (start authorization for external services, with the service name and type in the SRV_NAME and SRV_TYPE fields) and, for the gateway, S_SCP_*-style entries are not needed in ordinary cases. The practical point is simple: when you add a catalog to a role, PFCG adds S_SERVICE entries for the services the apps call. If those entries are missing, the app opens but its data calls fail with an authorization error.
A typical Fiori app involves these layers:
- The launchpad tile and target mapping, which come from the catalog.
- The OData or other service the app calls, which needs a service authorization.
- The application objects checked inside the backend code, such as
F_BKPF_BUKorV_VBAK_VKO.
All three must be in place. The catalog supplies the first. The role's generated profile supplies the second and third.
What PFCG does with the defaults
When you add a business catalog to a role (in the Fiori Launchpad content via the role's menu or, for business roles, through the catalog assignment), PFCG reads the SU24 entries for every app in the catalog. It then builds the authorization tab as follows:
- It collects all objects marked as Check or Check/Maintain.
- It merges the proposed field values for objects that occur in several apps.
- It marks fields without a proposal as open (shown as a red traffic light).
- It shows the status of each object: standard, changed, maintained, or manually added.
Open fields are where your design work happens. A typical case is BUKRS in F_BKPF_BUK. SAP cannot know which company codes your user may see, so the field stays open until you enter values or an organizational level.
The status of the generated data matters when SAP delivers new defaults. If you have not changed an object, an update (menu entry "Read old status and merge new data") brings in SAP's changes. If you have changed it, PFCG flags the object for review instead of overwriting it.
Reading the defaults for an app
You can check what an app needs before you build anything. In SU24 you search by application type and name. For a Fiori app you use the type for the launchpad app descriptor (the entry is named after the catalog-independent app ID, for example F0842-style IDs for standard apps) and then read the list of objects.
For one object in the list, look at three things:
- The check indicator, which tells you whether PFCG will propose it.
- The field proposals, which show the default activity, for example
03for display. - Any open fields, which you must fill in the role.
Reading the defaults first helps you see whether an app is display-only or can change data. Many apps with a "Manage" name propose ACTVT with values such as 01, 02 and 06. If your job profile requires display only, you reduce the activities in the role.
Customizing defaults: when and how
Sometimes the SAP proposal does not fit. You might want an object that SAP does not propose, or you might want to switch off an object that your landscape does not need. You change the defaults in SU24 for your own entries:
- Open SU24 and select the app.
- Change the check indicator or the field values.
- Save the entry in a transport request.
Keep these changes few. Each one has a cost: you must compare your values with SAP's after every upgrade, using the SU25 steps for adjusting after an upgrade. A better pattern in most cases is to leave SU24 alone and adjust the object in the role. The role change affects one role. The SU24 change affects every role that contains the app.
Service access in practice
Consider a custom role that contains a catalog with an app for managing sales orders. After you generate the profile, check the following in the authorization tab:
S_SERVICEentries for the OData service names the app calls.V_VBAK_VKOwith the sales organization field set to your values.V_VBAK_AATfor the sales document type, if the app proposes it.ACTVTvalues that match what the role should permit.
A quick look at the generated profile list, not only at the object tree, helps here. If the profile is not generated or the role is not merged, the entries exist in the role but not for the user. The status light on the authorization tab shows this.
Typical mistakes
- Assigning a catalog and assuming the user can work with the app. The app may open and then fail on its data calls.
- Leaving open fields empty and generating anyway. PFCG warns you, but a role with open fields gives the user no authorization for that object.
- Filling a field with
*to stop the error. This grants every value and often breaks segregation of duties. - Changing SU24 for a single role's needs. Use role-level changes instead.
- Forgetting that a code check can exist with the SU24 entry set to "Do Not Check". The user then fails at runtime, and SU53 shows an object that the role does not contain.
Link to later chapters
The defaults you read here feed the next chapter on business roles, where catalogs and authorizations come together. They also give you the starting point for the troubleshooting chapter: when SU53 shows a failed object, you can look up that object in SU24 to find which app should have proposed it.
Exercise
A user opens a custom "Manage Sales Orders" app from a tile in their role. The app starts, but saving a change fails with an authorization error for V_VBAK_VKO. You find that the object is missing from the role. List the steps you would take to decide whether to fix SU24 or the role, and name the risk of fixing SU24.
Show answer
First, open SU24 for the app and check the indicator of V_VBAK_VKO. If it is "Do Not Check" or "Not Maintained" while the backend code does check the object, the default is incomplete. For a single role, add the object manually in the role's authorization tab, fill VKORG and ACTVT, and generate the profile. Change SU24 only if every role with this app needs the object. The risk is that the change applies to all roles that contain the app, so you can widen access in roles you did not intend to touch, and you must reconcile your values with SAP's after each upgrade.
Exercise
In the authorization tab, F_BKPF_BUK shows an open BUKRS field. Why does PFCG leave it open, and why is entering * a poor fix?
Show answer
SAP cannot know which company codes your organization lets the user see, so the default has no value for the field. Entering * grants every company code, which breaks the restriction that the role was meant to enforce and can create segregation-of-duties conflicts. The better fix is to enter specific company codes or use an organizational level so that the values can be maintained once and reused.