Skip to Content
Technical Articles
Author's profile photo Rohit Khan

Key User Extensibility on SAP S/4HANA Cloud – Adding Custom Fields

Key User Extensibility on SAP S/4HANA Cloud and SAP S/4HANA – Adding Custom Fields – Part 3

 

Blog updated for
SAP S/4HANA Cloud 2302
SAP S/4HANA On-Premise 2202

Image 1: SAP S/4HANA Extensions

Target Audience – Business Experts, Key Users, Developers

Image 2: Flexibility Services

As a Key User, Business Expert, you would like to add a new field to the existing SAP Fiori Applications. For this demo, let’s pick up the app “Create Internal Project” and add a new field to the UI. More details of this app can be found in the Fiori Apps Reference Library. Please note this app is available only in SAP S/4HANA Cloud. However, the process steps described in the blog are also applicable for SAP S/4HANA On-Premise

We need to add a new custom field to this SAP Fiori UI app and publish it. Let us pick a standard app – Create Internal Projects and add a new custom field to it. Please note that you can add fields only if the app is extension enabled.

 

Image 3: Standard app extension

Click through this app. What we will do here as a Key User is – add a new section called ‘Project Sponsor Email’ and then add a new custom field called ‘Project Sponsor Email’. Let’s see how to achieve this

Image 4: Adding a new section/group

Let’s go back to the Tile Custom Fields. Click on it

Image 5: Standard Key User tool app – Custom Fields

Once you are in, you will notice three tabs – Custom Fields, Data Source Extensions, and Custom Logic. For this blog, we will work with the first tab – Custom Fields. Under this tab, if some custom fields are already created you will notice them in the list and the Business Context to which they are related to

Image 6: Adding a new field

To start the creation of a new field, click on the icon. Once you click on this icon, the system will open a pop-up to provide new custom field properties

 

Select the Business ContextLabel for your custom field, Identifier, ToolTip, and Type for the custom field

Custom%20Field%20creation

Image 7: Adding the field properties

Custom Field creation

Now let’s understand what all these Field Properties mean to you as a Key User

Business Context – defines the business cases for which the new custom fields will be used. It primarily means that any new field which is created and assigned to a Business Context can be used for UI’s, Reports, Form Templates, Business Scenarios, etc., are restricted to that Business Context only. Also, it is important to note that there is always a limited set of new custom fields

Label – is the field label that will appear on the UI

Identifier – Identifier identifies the newly created custom filed. In S/4HANA Cloud Extensibility every new field is identified by an identifier and it adopts a certain namespace provided by the framework. For example – In the screenshot above –

YY1_: is for objects created in the test system and that will be transported to the production system. This namespace is only applicable for S/4HANA Cloud and not for On-Premise

Once you click – Create and Edit, it is time to add more information about this custom field and enable its link

Image 7: Adding a new field

The first tab on this page is – General Information. Based on the type of field type chosen in the Field Properties, the details section will change. For example – Here for the field type – Email, the default length proposed by the system is 30. You can change the same

Move on to the tab – UI and Reports and enable the field usage of your custom field for Create and Plan Internal Projects. Click on the field – Enable Usage

Image 8: Enabling the field usage

 

Details about this tab –

Search Relevance – If you want to make the content of your field searchable then you may select this checkbox in the Search Relevance column. This would make your field searchable in free-text searches

Details about other tabs –

Email Templates – You can also add your field to the corresponding email templates, and thus make them visible in your personal email template

Form Templates – As a Key user can also enable the usage of the custom fields in the custom form templates or pre-delivered form templates (…which are extensible). Form Template is nothing but SAP Pre-delivered templates that are used for Output/Print Management. For example, output form for Invoice, Credit Memo, etc. (This is not covered in this blog. More information here à Maintain Form Templates)

Business Scenarios – In a scenario where you as a Key User wants to enable the field for more than one business scenarios

Now click on the blue Save button to save the changes

Now it’s time to Publish these changes so that this new custom field is now available in the field list for this App

Click on the blue Publish   button and the system will start publishing the field. It will take a little time before this field is published and is available to you as a Key User

Once Published it will turn into green

Image 9: Field is published and is now available for use in the standard app

Let’s continue with the next steps. In this step, we will add this new custom field to the standard Fiori App

Let’s go back to the app and open the App in the Adaption Mode

Click on the user icon → Adapt UI

Image 10: Adding the newly created custom field

This would open the app in UI Adaption mode. Now click on the blank area and from the context menu choose the option – Create Group

Next hover the cursor on the group and choose the option – Add: Field from the context menu.

Image 11: Adding the newly created custom field

 

Search for the custom field. Select the field click Ok. The custom field will now be added to the new group

Image 12: Adding the new custom field

Note that, in addition to the custom field, you may see more fields in the list. They may be other custom fields or the standard fields that have not been used in the UI but are provided by the backend

Image 13: Custom field is included

 

Next click on Publish link from the top bar and this change will be locked in a transport request.

Image 14: Save and publish the changes

Once done, click on Save & Exit from the top bar. Just refresh your page once. Your new custom field is now included in the UI.

You may now go ahead and enter some value for this custom field and save it. The value will be automatically stored in the backend.

It is important to note here that this group has been included here for this app (Create Internal Project) while creation of the new internal project. To have this group available for other related apps (based on your choice) like Plan Customer project, you need to include this in that app as well in the same fashion

 

Congratulations you have just finished Key User Extensibility – Adding custom fields to the standard SAP Fiori apps.

Rohit Khan, S/4HANA Regional Implementation Group

Click the below link to visit Part 4 of this blog series

Part 4: Key User Extensibility on SAP S/4HANA Cloud – Adding Custom Business Logic as a Key User

 

Link to part 1 and part 2 of this blog series:

Part 1: Introduction to S/4HANA Cloud Key-User Extensibility

Part 2: Key User Extensibility on SAP S/4HANA Cloud – UI Adaptions for Key User

 

 

Assigned Tags

      18 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Gerard Magorrian
      Gerard Magorrian

      Nice blog Rohit

      Author's profile photo Rohit Khan
      Rohit Khan
      Blog Post Author

      Thanks Gerard! 🙂

       

      Author's profile photo Pawan Kalyan K
      Pawan Kalyan K

      Thanks Rohit Khan for the nice blog.

      I would like to know how can we add match code help for the custom field created through this app.

      All the underlying CDS Views are having this custom field . Underlying consumption view is not Meta Data Enhanced. So , I am not able add anything there.

      Do I have to use MPC_EXT class for this? IF Yes, do you have any reference?

      Can you please guide us on this?

      Author's profile photo Rohit Khan
      Rohit Khan
      Blog Post Author

      Hello Pawan. Glad you liked the blog.

      For adding match code to the custom field, what you can do is -

      1. Create a CBO that will have the predefined values
      2. Then create a new Custom field and choose its type as - Association to Business Object.

      This way when you will add the new custom field in your UI, it will have the values in F4.

      Hope this helps!

      Regards

      Rohit

      Author's profile photo Pawan Kalyan K
      Pawan Kalyan K

      Thanks a lot Rohit Khan for guiding us in the right way.

      But if we would like to provide a match code help with 6-7 Fields. Is that possible with CBO? and if we wanted to show any custom table as value help , how can we achieve this? Because our business has everything set up in the table .They just would like to see that table data as Match Code. Through custom CBO, again we need to maintain entries .

       

      Can you please let us know the SAP's way of achieving these things.

      Author's profile photo Rohit Khan
      Rohit Khan
      Blog Post Author

      Hi Pawan,

       

      For now, at least in S4HC, there is no such option to show a custom table as value help. CBO is the valid option for both S4HC and S4H. However, as you are on S4H, you have full development access and you can build such a solution with the help of an ABAPer.

      Happy to help, if you have any more queries. 🙂

      Cheers

      Rohit

      Author's profile photo Olivier Souksamran
      Olivier Souksamran

      Dear Rohit Khan

      Don't you have any documentation in order to achieve this "with the help of an ABAPer" please ?

      I just can't find any how-to in order to add a data element as a reference to a UI custom field, so the matchcode automatically pops up.

      Any help would be appreciated.

      Regards,

      Olivier

      Author's profile photo Rohit Khan
      Rohit Khan
      Blog Post Author

      Hello Olivier Souksamran ,

      Are you looking for adding a custom table as matchcode to the custom field added to the UI through - Custom Fields and Logic app'? Unfortunately, this feature is not supported. However, to a custom field we can associate a CBO by choosing the type = Association to Business Object.

      Regards

      Rohit

      Author's profile photo Olivier Souksamran
      Olivier Souksamran

      Dear Rohit Khan

      Please refer to my answer : https://answers.sap.com/answers/784921/view.html

      SCFD_EUI (SAP Note 2672370 - How to Enable Custom Fields for Usage in SAP Fiori Applicationsenables this functionnality for S4 on prem systems.

      Hope this helps.

      Olivier

      Author's profile photo Rohit Khan
      Rohit Khan
      Blog Post Author

      Hi Olivier, Thanks for sharing this important note. Surely it will be of help to many for extensions on S/4HANA OP. Great find!

      Regards

      Rohit

      Author's profile photo Pawan Kalyan K
      Pawan Kalyan K

      Hello Rohit Khan

      I have created custom fields using Custom Fields and Logic App and have added the same in Manage Purchase Contract App. All things have moved correctly to Quality systems. Everything is fine. Now we have created one more custom field and have added this new field to Manage Purchase Contract. But Post moving this Transport, Changes are not reflecting in UI of Quality. We have repeated addition of this new field again using Key User – UI Adaptation and transported this to Quality. But still no luck . We also tried to clear all caches... Still the new field is not there.  Can you please suggest me what might have gone wrong?

       

      Thank You Very Much…!!!

      Author's profile photo piyush Bansal
      piyush Bansal

      Hi Rohit,

      Excellent blog. Thank you for sharing the knowledge.

      I have a question here.

      I am trying to add a custom field through the custom fields App but its not showing in the backend tables in S/4.

      Can you help me out here?

      Let me know if you need any more information

      Regards,

      Piyush

      Author's profile photo Rohit Khan
      Rohit Khan
      Blog Post Author

      Hi Piyush,

      I think we discussed it over the email. Hopefully, you are okay now.

      Regards - Rohit

      Author's profile photo Vijay Chintarlapalli
      Vijay Chintarlapalli

      Rohit Khan: very informative blog is there any way to change the description of the TAB from Custom Fields to Requirement specific ?

      Thanks,

      Vijay

      Author's profile photo Rohit Khan
      Rohit Khan
      Blog Post Author

      Hi Vijay, I am assuming you are talking about the tab description within the app? If Yes - then you can through Adapt UI.

      Cheers - Rohit

      Author's profile photo Vijay Chintarlapalli
      Vijay Chintarlapalli

      Rohit Khan , I am talking about the SAP GUI apps not the SAP Fiori Ui5 Apps.

      Thanks,

      Vijay

      Author's profile photo Rohit Khan
      Rohit Khan
      Blog Post Author

      Nope Vijay. That is not possible in S4HC.

      Cheers

      Rohit

      Author's profile photo Steven Shi
      Steven Shi

      Hi Rohit,

      Thank you for this great blog. I'm a new starter for S/4 HANA.

      I'd like to ask if this internal project can only be applied to 1 company? I mean if we can migrate this project from one to anther company like an importable extension?

      Thanks,

      Steven