Sub topic 4
Working in the Custom Fields and Logic App
This chapter assumes you can navigate the SAP Fiori launchpad. It also assumes you know the basic business objects in SAP S/4HANA, such as sales orders and products, and that you have the key user role from the previous chapter. The chapter covers what the app contains, how its parts connect, and the errors you will meet most often.
What the app is
The Custom Fields and Logic app is the central workplace for key user extensibility. In the Fiori launchpad it appears as a tile named "Custom Fields and Logic". From here you create custom fields, write custom logic, and see which of your extensions are active.
The app does not change standard SAP code. It stores your extension as metadata and generated objects that sit beside the standard objects. This is why your extensions survive upgrades.
The main areas of the app
The app opens on a list of tabs. Each tab handles one kind of extension.
| Tab | What you do there |
|---|---|
| Custom Fields | Create, edit, publish and delete custom fields |
| Custom Logic | Implement BAdIs with released ABAP |
| Custom CDS Views | Define reporting views on released objects |
| Custom Business Objects | Create small, new data models with their own tables |
| Extensibility Inventory | Review which extensions exist and in which state |
Later chapters cover Custom Logic, Custom CDS Views and Custom Business Objects in detail. This chapter focuses on how the app is organized and how its Custom Fields tab behaves.
How the Custom Fields tab works
The Custom Fields tab shows a table of every custom field in the system. The columns are the field label, the field ID, the business context, the type, and the status. Use the filter bar to narrow the list by business context or status.
The field ID follows a fixed pattern. Fields you create receive the YY1_ prefix, and the system adds a suffix based on the business context.
Custom field ID pattern: YY1_<FieldName>_<suffix>
Example: YY1_CostCenterNote_PRDThe YY1_ prefix marks key user extensions. The suffix is generated by the system from the business context. You will see this ID in field lists, reports and API responses, so it helps to recognize it.
Field status and the extension lifecycle
A custom field passes through states. The status column tells you which one applies.
In the Draft state, only you see the change, and no one can use the field in a business UI yet. After you publish, the system generates the technical objects and adds the field to the business context. Publishing can take a short time, because the system has to update dependent objects.
Connecting the app to its context
Every custom field belongs to exactly one business context, such as Sales Order Header or Product. The context decides where the field can appear, and it also decides which standard object stores the data. Pick the context before you create the field. Changing it later is not possible, so you would have to create a new field.
The app guides you through this choice. After you press the create button, a dialog asks for the context first, then the label, type and length. The next chapter explains how to choose a context.
Common errors
These problems occur often in practice.
- The tile is missing. The key user role is not assigned, or the catalog is not part of your business role. Ask your administrator to check the assignment.
- A field is saved but not visible in the UI. The field is still in Draft, or you have not added it to the screen with the UI adaptation tools. Publishing alone does not place it on a screen.
- The publish action fails. A dependent object is locked or another publication is running. Wait for the running job, then try again.
- A field name is rejected. Names allow only letters and digits in the generated ID. Remove special characters and spaces from the technical name.
- A deleted field still appears in an old report. The report refers to the old field. Update or rebuild the report.
A short working routine
- Open the app and select the Custom Fields tab.
- Filter by business context to see whether a similar field exists already.
- Create the field only if no existing one fits.
- Publish the field and wait for the status to change.
- Check the field ID in the table, since you need it for logic and API calls later.
Searching first prevents duplicates. Duplicate fields are one of the most common causes of messy extension inventories.
Exercise
A colleague created a custom field and says it is saved, but nobody can see it on the sales order screen. Name two causes you would check in the Custom Fields and Logic app.
Show answer
First, check the status column. If the field is still in Draft, it has not been published, so no UI can use it. Second, if it is published, check whether it was added to the screen. Publishing creates the field, but it appears on a UI only after someone adds it with the UI adaptation tools.
Exercise
What does the YY1_ prefix in a field ID tell you?
Show answer
It marks the field as a key user extension, so you can tell it apart from standard fields in field lists, reports and API responses.