Sub topic 12
Troubleshooting and Known Limitations
This chapter assumes you have worked through the earlier chapters. You should know the Custom Fields and Logic app, business contexts, field publication, BAdI implementations with released objects, and the transport of extensions. Here you learn how to diagnose the problems that come up most often and which limits you should plan around.
A systematic way to troubleshoot
Most key user extension problems fall into one of four groups. Sorting the problem first saves time, because each group has its own place to look.
- The field or logic does not exist where you expect it. This is usually a publication, business context or authorization issue.
- The field exists but shows no data. This is usually a UI adaptation, a data flow or a missing field propagation issue.
- The logic does not run, or it raises an error. This is usually an activation, syntax or released-object issue.
- The extension works in the development system but not in the target system. This is usually a transport or lifecycle issue.
The field does not appear in the app or the UI
Check roles and authorizations first
If you cannot open the Custom Fields and Logic app, or you cannot create fields, the cause is almost always missing authorizations. The key user needs a business role that includes the extensibility catalog, and the user must be allowed to act as a key user in the system. Compare your role assignment with the one a working colleague has. Do this before you look at anything else, because an authorization gap can look like a missing field.
Check the business context
A custom field belongs to one or more business contexts. The context decides which standard objects and UIs can carry the field. If a field does not show up on a sales order item, check that you picked a context that covers sales order items and not only the header. Business contexts cannot be guessed from the UI name alone. Open the field in the app and read the list of assigned contexts, then compare it with the object you are working on.
Check the status
A custom field that is saved but not published is not yet available to end users. The app shows the status of each field. Look for these states:
| Status | Meaning | What to do |
|---|---|---|
| Draft or in preparation | The field is saved but not yet released for use | Publish the field |
| Published | The field is created in the system and usable | Check UI adaptation next |
| Error | Publication failed | Open the error details and fix the cause, then publish again |
Publication can take a short time because the system generates the underlying structures. If you check immediately, you may see the old state. Refresh the app before you conclude that something failed.
The field exists but the UI does not show it
Publishing a field creates it in the data model. It does not place the field on every screen. To make it visible you must usually add it to the UI through the adaptation tools, such as the UI adaptation mode in the Fiori launchpad. If you published the field and still do not see it, check these points:
- You are in the right app. A field added to one sales order app does not appear in another app that uses a different UI.
- The adaptation was saved and, if needed, activated for the correct users. Some adaptations apply to a user only until they are made available to all users.
- The browser cache is old. Reload the app with a cleared cache before you continue the search.
- The field is hidden by a user setting such as a personalized column list. Open the table settings and enable the column.
The field shows but stays empty
An empty field is not always a defect. Check the following.
- Was the field created after the data was entered? Existing documents do not receive a value automatically. The field stays empty for old data unless you fill it by a program or an update.
- Is the field passed on to follow-on documents? Some fields are copied from one document to the next, for example from a sales order to a billing document. This only happens when the field is available in both objects and the context supports the propagation. If your business case needs the value downstream, verify that the target object accepts the field.
- Does the data reach the report? A report or analytical query only shows the field if it is exposed in the underlying data source. A field in a UI does not automatically appear in a CDS-based report. Check whether the field is released for the relevant analytical use and whether the report uses a view that the field was added to.
- Is the field used in a form? Forms need the field to be part of the form data source. The field must be enabled for form use before the form can read it.
Problems with custom logic
Custom logic in BAdI implementations has stricter rules than ordinary ABAP. The editor checks your code against a restricted language scope and a list of released objects.
Syntax and activation errors
When you save and activate an implementation, the system checks the code. Typical error messages point to one of these causes:
- You used a statement or object that is not allowed. The key user ABAP scope is a subset of ABAP. Calls to function modules, direct access to database tables and many system statements are not allowed.
- You referenced an object that is not released. Only released objects, such as the CDS view
I_Product, can be read. If a table or view you need is not on the released list, you cannot use it from key user logic. - A variable type is wrong. Use types taken from released objects. In the example below the type of the target variable comes from the released view.
" Read data through a released CDS view, as allowed in key user custom logic.
DATA lv_product TYPE matnr VALUE 'TG11'.
DATA lv_product_type TYPE I_Product-ProductType.
SELECT SINGLE ProductType
FROM I_Product
WHERE Product = @lv_product
INTO @lv_product_type.
IF sy-subrc <> 0.
" No product found: handle the case here, for example by raising a message.
ENDIF.Note the escaped host variables with the @ sign. ABAP SQL in the strict mode requires them, and a missing @ produces a syntax error.
The logic is active but nothing happens
If the code activates but the effect is missing, check these causes in order.
- The implementation is not active. Confirm the status in the app, and activate it again if needed.
- The BAdI is not called in your scenario. A BAdI hooks into one point of a process. If your test goes through a different path, such as an API instead of the UI, the BAdI may not be called, or it may be called with different data.
- Your condition never becomes true. Add a temporary message to confirm that the code is reached. Remove it again after the test.
- Another implementation takes precedence. Some BAdIs allow only one implementation per context. Check whether another team has already created one, because only one can be active.
Runtime errors in released logic
Logic runs inside the standard process, so an unhandled error can block business users. Guard every database read with a check of sy-subrc, handle empty results, and avoid long loops over large data sets. A slow BAdI slows down every transaction that calls it. Keep the logic short and test with realistic data volumes.
Problems after transport
An extension that works in development but not in quality or production is almost always a transport or ordering issue. Check these causes:
- The field was transported, but the logic that uses it arrived earlier or was left out. The logic then fails because the field does not exist in the target system. Transport the field first and the dependent logic afterwards, or together in the correct order.
- The target system has a different business context setup or a different set of released objects, for example because of a different release level. Compare release versions between the systems.
- The UI adaptation was not part of the transport. Layout changes may be stored separately, so confirm that they were collected.
- The transport request is not released or has an import error. Read the import log in the target system.
Fields are best treated as long-lived objects. Once a field is used in productive data, changes are limited, so plan names and data types before the first transport.
Known limitations
Key user extensibility is designed for safe, small extensions. It trades freedom for upgrade stability. Plan around these limits.
| Area | Limitation | Practical consequence |
|---|---|---|
| Field types | Only a defined set of types is available, such as text, number, date, amount and indicator | Complex structures need a custom business object or a different extension option |
| Changing fields | The data type of a field in use cannot be changed freely, and deletion is restricted | Choose the type carefully and prefer a new field over a risky change |
| Business contexts | A field is available only in the contexts you assign | Standard objects without a matching context cannot carry the field |
| ABAP language | Restricted syntax and released objects only | Logic that needs unreleased tables or function modules must use another approach |
| Reach of logic | Logic runs only at published BAdI extension points | You cannot change a standard process at any arbitrary point |
| Performance | Logic and extra fields run inside the standard process | Heavy logic and many fields can slow transactions |
| Field names | The `YY1_` prefix and generated suffix are fixed | You cannot rename a field to match your own naming rules |
The naming limit is visible in every field list. Custom fields created by key users carry the YY1_ prefix, so you can tell them apart from standard fields in field lists, reports and API responses.
Custom field ID pattern: YY1_<FieldName>_<suffix>
Example: YY1_CostCenterNote_PRD
The YY1_ prefix marks key user extensions. The suffix is generated by the system from the business context.When a requirement does not fit these limits, do not look for a workaround that bends the rules. Move to the next extensibility option, such as developer extensibility or side-by-side extensions, which were compared in the first chapter. Using the right option keeps the core clean.
A short diagnostic checklist
Use this list in order when a user reports a problem.
- Can the key user open the app and create fields? If not, check roles.
- Is the field published and free of errors? If not, fix the status.
- Does the field appear in a report or API? If yes, only the UI is missing.
- Is the field visible in the UI adaptation and the correct app?
- Does old data explain the empty value?
- Is the implementation active, and does the BAdI run in this scenario?
- Were the field, logic and UI changes all transported, in the right order?
Exercise
A key user published the custom field YY1CostCenterNotePRD for sales orders. The field appears in the OData API response but not in the sales order Fiori app. What is the most likely cause, and what do you do?
Show answer
The data model is fine, because the field appears in the API response. The missing step is the UI adaptation. Open the sales order app in adaptation mode, add the field to the screen, save the change, and make it available to the users. Also check the browser cache and personalized column settings.
Exercise
A BAdI implementation reads I_Product and activates without errors, but a test in the quality system shows no effect, although it worked in development. Name three things you check.
Show answer
First, check that the implementation was transported and is active in the quality system. Second, check that any custom field the logic uses was transported before or together with the logic. Third, check that the BAdI is called in the test scenario, and compare release levels and released objects between the two systems.
Exercise
A team needs a nested data structure with many related records for each sales order. Why is a custom field a poor fit, and what do you consider instead?
Show answer
Custom fields hold single values of a limited set of types and are added to existing objects. They cannot model related record structures. Consider a custom business object with custom CDS views, or a side-by-side extension if the requirement goes beyond key user scope.