Skip to Content
Technical Articles
Author's profile photo Georg Wilhelm

SAP S/4HANA Key User Extensibility: Custom field with context-dependent value help

Do you want to know how you can enhance the usability of a key  user custom field of type “Value Help based on CDS View” by utilizing the new feature “Value Help Binding”?

If your answer is yes, then this blog post is just  for you.

With this document, we’ll explain the following topic:

  • How to configure your custom field of type “Value Help based on CDS View” in a way that its value help is context-dependent by additional filter values supplied by instance data

Let’s assume we already created a key user custom field “Approver(Demo)” of type “Value Help based on CDS View” on the “Procurement: Purchasing Document” business context and we already made it visible in the purchase order header section of the “Manage Purchase Orders” Fiori app. How to develop such a custom field using the power of Embedded Steampunk can be taken from the blog “SAP S/4HANA Key User Extensibility powered by Embedded Steampunk: Custom Field with ABAP implemented Value Help“ blogpost .

Let‘s also assume that we created another custom field of type “Association to Business Object”on the “Procurement: Purchasing Document” business context associating the “Company Code” business object. The value of this field will later on act as context for the value help of the custom field “Approver(Demo)”.

Note that the standard field “Company Code” already exists, and that the  standard field “Approver” in the purchase order business object already exists. Let’s assume that we handle our approval process a bit differently than usual and therefore introduce these two custom fields. To be able to distinguish the standard field from the custom fields, we add “(Demo)” at the end of the label of the approver custom field and “(demo duplicate)” at the end of the company code custom field.  Their labels are now “Approver(Demo)” and “Company Code( demo duplicate)”.

We start the task of making the value help of the “Approver(Demo)” custom field context-dependent by logging in to  client 100 and opening the app “Manage Purchase Orders”. There, we select one of the purchase orders listed to navigate to the purchase order details screen.

Here, we see the two custom fields on the purchase order detail screen (see screenshot below):

  1. the “Approver(Demo)” field with its attached read-only description field “Approver (Demo) (Desc.)”
  2. the “Company Code( demo duplicate)” field


When we click on the value help icon of the “Approver(Demo)” field, we get the following value help popup:

Please note that the company code filter field is empty and has not been prefilled so far with the current value of the company code field, which is “1710”.
In order to get this filter field prefilled in the value help, we have to define additional bindings for the value help of the custom field “Approver(Demo)”. To do so, we have to edit the custom field within the “Custom Fields” app. The fastest way to navigate to this app is

  1. to switch into the UI adaptation mode by clicking on our avatar on the right upper corner of the screen. Then, select the “Adapt UI” option.
  2. Right-click on the custom field “Approver(Demo)” or any other field in that section, and within the menu that is now popping up, select “Add: Field” (see screenshot below).

A dialog is popping up showing the list of available fields. In this dialog, there is a “+” button on the top right corner that you can use to create new custom fields, or maintain already existing custom fields. Since we want to maintain already existing custom fields,  we click on this button. It directly navigates us to the “Custom Fields” application and opens the “Custom Fields” tab. We‘re now searching for our already existing custom field “Approver (demo)” and by clicking on its entry on the list, we navigate to the details of this custom field.

There, we open the “UIs and reports” tab and we navigate to the list entry “Manage Purchase Order”, which is the entry that represents the exposure of the custom field to our UI “Maintain Purchase Orders”. Within this list entry, we see an active button with a pencil icon that has the tooltip “Maintain Value Help Bindings”, which is what we want to do. Selecting the pencil icon,  the following popup is displayed (see screenshot below):

On this popup, we can now define the binding of the company code value help filter field via a drop-down list. We do so by selecting the company code custom field as data source field, and then we click “OK” and save our changes. In the end, we can publish the custom field.

Restarting the UI, we can open the value help for our “Approver (demo)” again. The company code filter field is no longer empty but has been prefilled with the current value of the company code field which is “1710”. Also, all offered value help entries are automatically filtered by this value.

Now you are done! Congratulations!

For further information refer to the official documentation.

This blog focuses on SAP S/4HANA Cloud. We have some good news: this doesn’t only work in SAP S/4HANA Cloud starting with release 2208, but it also works in your SAP S/4HANA (on premise) system starting with release 2022.

Please note that the feature “Value Help Binding” is currently not available for all types of UIs.
Whether it‘s available on a specific UI or not depends on the technology on which the UI‘s backend service is built. Currently, this feature is supported for OData services built with the newest OData service exposure technologies, which are

  1. Referenced Data Source
  2. Service Definition/Service Binding

Please note that in order to implement the described scenario in SAP S/4HANA Cloud, you need a user in the customizing tenant (client 100). The following business roles have to be assigned:  SAP_BR_PURCHASER, SAP_CORE_BC_EXT_FLD, SAP_CORE_BC_EXT_FLEX.

Feedback, Comments, or Questions

You’re cordially invited to provide them in the comments section below. Also, please follow my profile to get updates when I publish more posts on these topics.
Also feel invited to post and answer questions  here ( and read other posts on the topic (

I want to thankYasmina van Rooij and Karsten Schaser  for their extremely  helpful contributions.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Suman Pandit
      Suman Pandit

      Thanks Georg Wilhelm for this wonderful post.

      We want to achieve similar kind of requirement to have 2 custom fields Project type and Project Category in Plan Customer Project app and, Project type depends upon Project Category. Project Category value in the screen will be used to filter out the value help for Project Type.

      But we are not able to find out any option of 'Value Help Binding' in UI of Plan Customer Project.

      Is there any other way this be achieved?

      Thank you!


      Author's profile photo Georg Wilhelm
      Georg Wilhelm
      Blog Post Author

      Hi Suman,
      thanks for the feedback! I am not sure whether I fully understood your use case...but when I am right this is what I would propose: you create a key user custom field of  type "Code list based on CDS view" where the value help has two key fields ProductCategory and ProjectType...if you find an SAP standard view that has these two fields as key fields you can take that one. If not you can try to create a key user custom CDS view which has these two fields as key fields. If the solution with a custom CDS view does not work there is still one more can create a developer extensibility custom entity and code the value help logic yourself in ABAP ( blog:

      There is one more blog which describes other scenarios of context dependent value help...maybe that is also interesting for you:

      Best regards Georg

      Author's profile photo Suman Pandit
      Suman Pandit

      Ok Thank you Georg ..

      Author's profile photo Knut Rogde
      Knut Rogde

      Hi Georg,

      We are currently adding some custom fields related Bank Account Management (business context Bank Account Master Data - I_BankAccountTp).

      SAP already provides a company code field.

      We are adding a new field "Top Account" which will refer to another account, but should be within the same company code.

      We have followed your procedure on how to add a value help by using a custom CDS view, and it is working fine as long as we also create the "Company code (duplicate)" field and populate this with a value through a BADI (and use this field in the value help binding).

      My question is: Why do we need to create an additional field "Company code (duplicate)" (+ badi to fill it) and use this in the mapping, when SAP already provides a Company Code field. Seems only logical to use the SAP provided "Company Code" field in the value help binding.

      Why doesn't SAP allow the use of the standard "Company Code" field in the value help binding?

      Surely having duplicate fields and badi's that does not really serve a business purpose cannot be considered in line with the clean core principles?



      Author's profile photo Georg Wilhelm
      Georg Wilhelm
      Blog Post Author

      Hi Knut, you discovered a "gap" and you implemented exactly the only currently available way to realize your requirement. Anyway we are already working on a concept that allows SAP standard development to "C1-release" fields in standard CDS views which are not C1-released and are not intended to be C1-released so that you as a customer can then use these "C1-released" fields for the valuehelp mapping and no longer have to create additional custom fields which you fill with data based on some BAdI implementations. But I can not tell you in which release we will deliver this. Best regards Georg