Technical Articles
Custom Fields in S/4HANA: Key User versus Developer Extensibility
With SAP S/4HANA releases 2208 (public cloud) and 2022 (on-premise and private cloud), it is now possible to create custom fields with developer tools (ADT) for additional use cases, so that customer now have the option to create custom fields either in the Custom Fields key user app, or with developer tools (ADT).
In this blog post, I would like to share some recommendations and comments on the different options for creating custom fields.
Our recommendation is to select the option for creating custom fields in the following sequence, this means the subsequent option should be chosen only if the previous option is not possible.
1. Use the Custom Fields app (key user extensibility tool).
- available for SAP S/4HANA Cloud and SAP S/4HANA
- prerequisite is the enablement of the SAP application for key user extensibility
- for SAP S/4HANA (on-premise/private cloud), legacy fields can be enabled so that they can be used with the Custom Fields app, see transaction SCFD_EUI
2. Use ABAP Development Tools (ADT) with ABAP language version ABAP for Cloud Development (developer extensibility)
- available for SAP S/4HANA Cloud (2208) and SAP S/4HANA (2022)
- prerequisite is the enablement of the SAP application for cloud development. In versions 2208/2022, there is no application adoption for creation of custom fields for ABAP language version for ABAP for Cloud Development. This means this option can be used in future releases only, in SAP S/4HANA Cloud, public edition starting with first scenarios in 2302 (labs preview)
3. Use ADT or SAPGUI tools with ABAP language version Standard (classic extensibility), e.g. if the corresponding SAP application is not enabled for the key user extensibility or developer extensibility.
- available for SAP S/4HANA (on-premise/private cloud)
- Custom fields can be added to CDS views (extend view) and for table/structure appends with developer tools
- Adding custom fields to the transactional logic of an application depends on the SAP application. We recommend that you read the extensibility documentation that is provided for the application.
- Adding custom fields to OData services that were built with technologies before RAP, depends on the implementation details of the OData service. See for example, the blog: How to redefine RDS based OData services? | SAP Blogs
Releated Links:
- Custom Fields app: Documentation for public cloud: https://help.sap.com/docs/SAP_S4HANA_CLOUD/0f69f8fb28ac4bf48d2b57b9637e81fa/ce819b8557194ae0aa180ba4ac6a04de.html?version=2208.500
- Custom Fields app: Documentation for on-premise / private cloud: Custom Fields | SAP Help Portal
- Blog: https://blogs.sap.com/2020/02/01/adding-field-in-standard-fiori-apps-of-s-4hana-with-custom-fields-and-logic/
- Documentation: Enabling Custom Database Fields for Usage in SAP Fiori Applications | SAP Help Portal
- RAP Developer Extensibility Documentation for public cloud: https://help.sap.com/docs/SAP_S4HANA_CLOUD/e5522a8a7b174979913c99268bc03f1a/95d0ab272a6745618f18590453a7cf0c.html?version=LATEST
- RAP Developer Extensibility Documentation for on-premise / private cloud: Enabling Data Model Extensions | SAP Help Portal
Hi Thomas,
Thanks for sharing insights on Developer extensibility and sharing the list of blogs.
Thank you,
Syam
Hi Thomas,
Thank you for sharing. Regarding approach 2, are there any more information for it?
Thank you
Yes, please check the link to the documentation "RAP Developer Extensibility Documentation" in the blog post.
thank you for the blog. it is very helpful. I have a generic question - when we add a field to say 'cost center master data' and use data source extension to GL line item - would this field be updated in ACDOCA table in the backend?
Hi Sunil,
data source extensions are used to retrieve additional fields from the standard application into a data source (odata service or cds view) or in the latest version also to define transient fields with an ABAP calculation.
These fields are always read-only, so there is no update into the respective backend tables.
Regards,
Daniel
okay understand. thanks for clarifying. So in essence the custom fields added will be reflected only in the UIs and Reports that show up at the time of adding the fields once the usage is enabled. Correct?
You need to differentiate between custom fields and data source extensions.
Custom are additional fields added to the data base, along the application stack and into the UIs reports. This is done in the Custom Fields Tab of the Custom Fields app. These fields are transactionally enabled if the application is. This means if the field is editable on the UI, the field value is saved in the DB together with the object. And yes, if this is your question, custom fields do only show up on the respective UI or report if they are enabled for it in the custom fields app.
In the data source extension tab you can add additional standard fields to a service or cds view. These fields are read-only.
Thanks Daniel.
So, in my scenario we are looking to add custom fields to Cost Center Master Data. Based on what you are stating, the custom fields added to Cost Center Master data where the user will enter values (either as selection from multiple options or a free text). These fields get added to the DB (am assuming it gets added to the Finance tables ACDOCA - Finance line item table, Cost Center Reports use information from ACDOCA, and Cost Center line item and totals tables i.e. COEP, COSS, COSP). This will help us extract various useful reports. Is that a fair assumption?
thanks
Sunil
👍
thank you for your assistance
Hello Thomas, if I were to translate the custom fields in regional language(chinese or mandarin),
a. is it possible?
b. If possible, would it be an user extension or developer extension?
c. Can it be done via fiori(user ext)?
d. How about historical postings(made with EN as language) - can these be retrospectively translated in chinese or mandarin?
Thanks in advance !
Yes, translation of key user fields created in the Custom Fields key user app is possible in the same app. You can do this immediately when creating the field or later.