Custom fields, data source, and logic, in short, the "Custom Fields" application in Fiori.
Hello Everyone,
This blog provides comprehensive information about the "Custom Fields" or "Custom Fields and Logic" applications available in the SAP S/4HANA Fiori platform. The blog extensively covers topics such as the creation, usage, functionalities in the GUI, transport, import-export, and authorizations of custom fields. Additionally, it includes details on data source usage areas, functionalities in the GUI, import-export, and logic process. The blog addresses the errors encountered during these processes and necessary authorizations.
To utilize the "Custom Fields and Logic" app for creating custom fields, data sources, or logic, the following catalogs and groups need to be added to the role in the "PFCG":
SAP_BASIS_BC_EXT:
SAP_BASIS_BCG_EXT:
SAP_BASIS_TCR_T :
After assigning the necessary authorizations, the application will appear on the "App Finder" page. Additionally, the application needs to be added to the group to ensure it is accessible to users who have been granted the required permissions.
The following OData services need to be activated. Controls for this purpose are provided on the page after accessing the "/IWFND/MAINT_SERVICE" transaction
code.
If the service is not active, it can be activated using the “ICF Node” button. If there is an error in the service or it needs to be edited, assistance can be obtained from the buttons located above.
The following services need to be enabled. Service edits are made using the transaction code “SICF”.
component |
Technical Name |
Path to ICF Node |
SAP UI5 Component |
SAP UI5 Application |
NW_APS_EXT_CFL |
/sap/bc/ui5_ui5/sap/nw_aps_ext_cfl |
nw.core.extcfl |
NW_APS_EXT_LIB* |
/sap/bc/ui5_ui5/sap/nw_aps_ext_lib |
||
NW_APS_LIB* |
/sap/bc/ui5_ui5/sap/nw_aps_lib |
/UIF/SAP_RTA_PLUGIN:
With this application:
In this tab:
- Create a new field,
- Edit field,
- View detailed information for the field,
- Define business scenariosField assignment to UI or reports,
- Check API and IDOC services,
- Enable for Mail and Form templates.
Note: To run extensibility scenarios end-to-end, the user must have the “ SAP_UI_FLEX_KEY_USER ” role.
After entering the business context, type and identifiers, click the " Create and edit " button.
With this tab, contexts are added based on the scenario.
For example, when a field is created as a service header and extended to an activity scenario, a new field specific to the activity will automatically be created.
OData APIs are activated with the “ OData APIs ” tab.
SOAP APIs are activated with the “ SOAP APIs ” tab.
BAPIs are displayed with the “BAPIs” tab.
The forms activated with the “ Form Templates ” tab.
Click the “Show Configurable Areas” button and select the area to which the field will be added.
Click the “Show Available Fields” button. The field is selected from the open block and added with the “+” button. Then, use the “Show Field Properties” button to adjust properties.
-To change the position of the field, simply drag and drop it to the desired location within the form,
-To make it mandatory, toggle the corresponding option in the field properties,
-To change the text displayed for the field, you can edit the "Label" property in the field properties.
All custom fields within the contexts can be displayed using the “SCFD_REGISTRY” transaction code. For instance, click on the service header.
Enter “ CRMS4S_SERV_H_INCL_EEW_PS ”.
All published fields appear within this structure.
Changes to the data of the fields can be checked using the “SCFD_CHANGE_LOG” transaction code.
The consistency of objects is checked by selecting the following properties using the “SCFD_CHECK_EXT_OBJ” transaction code.
Error, checks etc. results look like the following.
Custom fields display and checking are provided with the “SCFD_FIELDVIEWER” transaction code. It includes the following properties and more.
Export in XML format using the transaction code “SCFD_MD_DOWNLOAD”. Select the desired fields and export them with the "Export Metadata" button.
Example export :
Custom fields can be createdorting the XML format file using the transaction code “SCFD_MD_UPLOAD”.
Display archive information for the fields using the transaction code “SCFD_RECOVERY”
Inactive fields can be activated using the “SCFD_EUI” transaction code. If there is an error, its details can be displayed.
Details regarding the extensibility of the field can be accessed with the “SCFD_SEARCH” transaction code.
The Configure Software Packages application is used to include the created custom field in the request. The following steps are required for this application:
The "APS_EXT_ATO_PK_CFG_SRV" oData service is added and the user is assigned the "SAP_NW_APS_EXT_ATO_PK_CFG_APP" role. The following services are enabled with the SICF transaction code.
The package is added.
The request is selected.
After selecting the field, click the "Reassign to Package" button. The field is added to the request.
Click on the data element from the SE11 transaction code.
Click on the domain.
Open the table in the value table.
The table contains texts of field.
Data Sources Export/Import Usage Areas:
In SAP Fiori applications, data sources are utilized through various methods. These include OData services, CDS views, SAP Gateway, BAPIs, SAP HANA Calculation Views, RAP, and various backend APIs. These methods enable flexible, powerful, and user-friendly data access solutions in Fiori applications.
OData (Open Data Protocol) is a widely used protocol for data exchange between SAP Fiori applications and data sources. OData services provide access to the data source and support CRUD (Create, Read, Update, Delete) operations.
CDS is an SAP technology used to define data models on SAP HANA. CDS views define the database-based business logic and relationships. These views can be exposed as OData services and used by Fiori applications.
SAP Gateway acts as a middleware to access data in SAP systems. BAPIs are standardized interfaces to business functions in SAP ERP systems.
SAP HANA Calculation Views are used to model data and business logic on SAP HANA. These views can be directly used or exposed as OData services for Fiori applications.
RAP is a model used in modern ABAP development to facilitate the creation and management of OData services. RAP enables integration between Fiori applications and data sources.
Various SAP systems (e.g., SuccessFactors, Ariba, Concur) provide APIs to access data and business processes. These APIs can be REST or SOAP-based, and Fiori applications can use them to access data sources.
A new data source is created using the “Data Source Extensions” tab in the “Custom Fields and Logic” app.
The fields desired to be included in the data source are added from the "Available Fields" breakdown. The field name can be changed using the "Custom Text" checkbox. Search help is added with the “Value Help” checkbox. It is activated by clicking the “Publish” button.
NOTE1: Adding additional standard fields might enable end users to access restricted data in the extended data source, without having the required authorization.
NOTE2: Depending on the field path and the nature of the selected fields, data retrieval might become slower after a data source extension has been added.
NOTE3: Fiori must be restarted after adding a new field to the data source.
Data sources are displayed, and detailed access is provided with the “SCFD_DE_COCKPIT” transaction code. It includes the following properties and more.
The data source template with XML extension is imported with the “ SCFD_DE_MD_UPLOAD ” transaction code. To download the data source template, it can be with the “ Export Metadata ” button in the “ SCFD_DE_COCKPIT ” transaction code.
Example XML :
After importing, the data source is created by clicking the "Import" button.
Imported XML :
With the logic, field-specific rules, error messages, controls, etc. can be defined. These are typically implemented using ABAP. For example, you might select "Service document check before save" to define a check that should be performed before saving a service document.
Standard fields are present in the "serviceheader" and "serviceitems" entities, while custom fields are found in the "serviceheader_extension" and "serviceitems_extension" entities.
If the "BOLUM" field is initial, an error message is displayed
There is a message of error type “ CRM_S4_ORDER_MISC ”.
When encountering the issue of the application not opening when clicked, you can check for error details using the browser's developer tools (F12). If it's determined that the error is due to a missing alias in the OData services, you can follow these steps:
Access the transaction code “/IWFND/MAINT_SERVICE” to manage OData services.
Select the relevant service from the list. At the bottom right of the screen, there should be a button to add a system nickname. Click on this button and provide the necessary alias or nickname for the system. Save the changes. By adding the system nickname, you are providing a reference for the OData service, which should resolve the error and allow the application to open properly when clicked.
To resolve the issue of missing buttons, follow these steps:
Navigate to SIMG > ABAP Platform > Application Server > System Administration > Configuration: Applications in Software Component UI FOR BASIS APPLICATIONS >Set up the Adaptation Transport Organizer and complete the Adaptation Transport Organizer setup with default data on the following page.
It has been determined that the reason for the above error is that the virus scanning adaptations are active but not active. Since there is no need for virus scanning, active virus scans have been disabled on the page that appears with the " VSCANPROFILE" transaction code.
The virus scan is executed with the profile empty and virus scanning turned off.