In-App Extension /Key User Extension
In this blog we will see In-App Extensibility Concept. Also detailed explanation on use of Custom Fields And Logic Fiori application for Fiori Extensions.
Types of Extensibilities –
- In App Extensibility/Key User Extension/Low Code-No Code
- Developer Extensibility- (Embedded Steampunk)
- Side By Side Extensibility – (Business Technology Platform)
Sometimes you may see of 4th type, which is nothing but our classical extension, and if use case is not fulfilled using above three types, we must follow classical way extensions. Like – Classical Badi’s, user Exits, Customer Exits, BTE etc.
Exploring In-App Extension (What & Why) –
The term In-app means that extensions are implemented within the S/4HANA Cloud tenant itself.
In-app extensibility is generally used to apply minor changes and extensions, to increase user productivity or implement adaptations of the application logic without changing the major parameters of the respective business processes.
The new generation of standard SAP FIORI apps can easily be modified in layout and small extensions. This is called FIORI in app extensibility.
Why In-App Extension –
- To achieve clean core principle.
Clean Core – Clean core is nothing but when SAP release with new upgrade versions custom Extensions should have minimum impacts.
- Approach towards SAP S4 HANA cloud development.
In every new version, SAP is releasing thousands of cloud APIs which are available as replacement of classical extension.
Cloud APIs can be check by below two ways –
- Using Transaction Code SCFD_REGISTRY
- API Business Hub
Table below shows 2 prominent common examples for old and new enhancements:
|Sales order||User exit MV45AFZZ||BAdIs in enhancement spot ES_SD_SLS_EXTEND|
|(For example, sales header modification or sales document check before a save)|
|Purchase order||BAdI ME_PROCESS_PO_CUST||BAdIs in enhancement spot ES_MMPUR_PROCESS_PO_CLOUD|
|(For example, purchase order header modification or final purchase order check before a save)|
|Classical Approach||In-App Extension|
|Append Structure||Custom Fields in Fiori Application CFL (Use Case – Extend any standard Fiori Application with Custom Field)|
|Extend CDS||Data Source Extension (Use case – Fiori App with standard field)|
|Classical Badi||Cloud Badi|
|Domains with Fixed values||Custom Code List|
|SM30/Table Maintenance/Check table||Custom Business Object|
|CDS View Creation||Custom CDS Views|
|Structure, Tables, Methods, Data||Custom Libraries|
|SE78 Image, Logo Upload||Manage Logos|
|SO10 texts||Manage Texts|
|Std Forms (Adobe)||Maintain Form Templates|
|Create Email template using SE80||Maintain Email Templates|
Different Fiori Tools for In-App Extensibility
- Custom fields and Logic
- Custom Reusable Elements
- Custom Business Object
- Custom CDS Views
- Configure Software Packages
- Register Extensions For Transport
- Maintain Form Templates
- Manage Texts
- Maintain Email Templates
- Manage Logos
Custom Fields & Logic
Three tabs are available in this Fiori Application.
- Custom Fields
- Data Source Extension
- Custom Logic
Custom Fields –
Custom Field is used to extend tables based on corresponding business context. And then same field can be extended to different APIs for extending the Fiori Application with custom field.
How to check Business Context of table –
- Transaction SCFD_EUI
- Function Module – CFD_EUI_SHOW_LIST
Steps to create Custom Fields in table & respective different APIs –
Step 1- Check the business context of table in which custom field needs to be added
E.g., For MARA table Business Context – PRODUCT
In Registry Transaction Code SCFD_REGISTRY Check the business context name based on Context description.
Step 2 Go to Fiori Application Custom Fields and Logic (First Tab – Custom Fields)
Step 3 – Click on + icon to create new custom Field & Fill the details as shown below.
Step 4 – Click on checkbox enable usage, if field needs be added in respective API
Step 5 – Publish the custom Field. And then it will be added respective table & different APIs
Step 6 – Extend the custom Field in respective Fiori Application using Adapt UI or different Fiori extension option available in Fiori.
Data Source Extension
To know whether a CDS supports Data Source Extension can be found out using the transaction code SCFD_REGISTRY.
Let us consider the example of C_PHYSINVTRYPROPOSAL.
Under the Extensible CDS View tab we check whether the CDS view is available. We select the CDS view and click on Display icon for detailed information.
If the checkbox CDS View supports Data Source Extensions is ticked, then it supports Data Source Extension.
Steps to add fields using Data Source Extension.
Step 1: Enter the business context of the CDS view (Business Context of CDS can be checked using SCFD_REGISTRY), along with all the required entries and click Create.
Note: The naming convention of any Data Source Extensions fields will start from ZZ1_.
Step 2: Select the required field in the Field Selection list. It appears under Selected Fields.
We can provide a Custom Text to the field selected by checking Custom Text checkbox. We can now overwrite the name as per the requirement.
If the value help is available for the field at the domain level, we can check the Value Help checkbox to enable F4 help.
Step 4: Once all the required things are added and enabled, hit Save button. This will make sure that the fields are saved before it gets published.
Step 5: After saving, click on the Publish button. After publishing, a new field will be added in the main CDS view.
In the image attached below we can see 2 added fields with the name starting from ZZ1_. Those are the fields added using Data Source Extension.
Limitations of Data Source Extension –
- It is not possible to apply extra annotations to define field position (UI annotations) on Fiori Application
- Fuzzy search is not possible in case of data source extension.
Custom Logic –
This is third tab in Custom Field and Logic Application which is used to implement cloud Badis for custom logic.
Steps to implement cloud Badi –
Step 1 First check the cloud Badi from Business API Hub.
Step 2 Go to SCFD_REGSITRY Transaction code and check the business context in Badi registration tab.
Step 3 Go to custom Field and Logic application and open third tab Custom Logic and Click on + button to create new.
Enter below details to create new custom implementation.
Step 4 – Add custom logic in draft section as shown below.
Note – Only whitelisted APIs are applicable for data fetch.
Step 5 Publish the data source logic and test from respective Fiori application.
One more interesting way to check released/Whitelisted APIs –
Go to system Name right click New->ABAP Repository Tree
Now click on released objects (Also can filter based on type e.g., type:ddls will give all released CDS views.
Get all released API as shown below, where we can check based on In-App or Cloud Dev APIs.
Reference Links –
Ui Adaptation – https://www.saptechnicalguru.com/fiori-in-app-extensibility/
Thanks for detailed document :-).. I'll bookmark it
Thanks a lot Pratham Kapoor
Very informative blog. Thanks Vikas.
Great thanks. Rahul Ranjan
Nice Blog. Go To guide for Key user extensibility..
Thanks. Ravish Ranka
Well Explained Vikas. Section Replacements/Use Cases is very useful.
Thanks a lot. Kamal Jain