Sub topic 3
Released Objects and Custom Logic for Key Users
Assume you know basic Fiori navigation and SAP business objects. Familiarity with ABAP or SQL helps, but you do not need to be a developer.
Released Objects and ABAP Restrictions
A released object is an SAP API, CDS view, or business object that SAP supports for extension use. Key-user logic must use released objects so upgrades can preserve the contract.
Key-user ABAP is restricted. You normally cannot modify standard programs, access arbitrary database tables, or call unreleased classes and APIs. Use the Custom Logic app and its available BAdI enhancement spots. Host variables in ABAP SQL use @.
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.
" Handle a product that was not found.
ENDIF.Adding Custom Logic Through BAdIs
A BAdI, or Business Add-In, is a defined extension point in standard SAP processing. In the Custom Logic app, choose a BAdI, implement the required method, and write logic within the supplied parameters and restrictions. Test both the expected case and missing or invalid data.
The BAdI determines when the logic runs. It may validate data, derive a value, or react to a business event. It does not give unrestricted access to the system.
Custom CDS Views and Business Objects
A custom CDS view combines released data sources for reporting or reuse. A custom business object stores business-specific data with fields and associations. Both are designed through key-user tools and can support analytical, UI, or integration scenarios.
Choose a CDS view when the main need is to read and model existing data. Choose a custom business object when the system must own new records and their lifecycle.
Transporting and Maintaining Extensions
Use the available transport mechanism to move fields, logic, CDS views, and business objects from a development or customizing system into test and production. Check dependencies, such as a field required by a view or logic implementation. Keep a record of the extension's purpose, owner, business context, and consuming apps.
Troubleshooting and Known Limitations
If a field is missing, verify its business context, publication status, app support, and authorizations. If logic does not run, check the BAdI filter, implementation status, and test data. A transport can fail when dependent objects are absent or when target-system configuration differs.
Key-user tools expose only selected scenarios. Some UI fields, processes, APIs, and database objects cannot be extended this way. Escalate those cases to developer extensibility or a side-by-side extension.
Exercise
You need to calculate a value using data from a custom database table. Can key-user custom logic read it directly?
Show answer
No. Use a supported, released object or choose a developer or side-by-side extension.