Skip to Content
Technical Articles
Author's profile photo Vijay Sharma

F4 Help for custom fields created using Custom Fields & Logic – InApp Extensibility

As we all know, the recommended way of extending the standard application with custom fields is by using “Custom Fields & Logic” fiori app (In-App Extensibility). In case you don’t , check my blog on how to extend customer master app with custom field or lot of other wonderful blogs available on the topic.

Now, a very basic requirement is to have F4 help for the custom field added… isn’t it? we like help, we need it actually…

So , the question is how we can achieve it for custom field created through CFL (custom fields and logic)?

In this blog, we will see , how this can be achieved. So, Lets begin…

There are multiple ways to achieve this and we can select the best option  based on the scenario. Let’s see what are these options…

Code List 

Let’s see how we can create code list and how it appears on the app.

For this case , I am  going to add custom field “Category”  to the Customer Master Basic data

  • Open CFL fiori app click on “+” to create a new custom field. Fill the details as shown and below and here we are going to select field type as Code List.

  • As we select the code list, we will see the section to create the code list values ( the values which will appear in the field help). Maintain the values as needed and click on “create and edit”
  • GoTo the “UI & Reports” tab and click on “Enable Usage” for Business Partner API.

  • Click on Save and then Publish.

  • Add the field to the Customer master basic data screen (check this blog to check how to do that).

  • On edit , we will see the F4 help available for the field and the values we maintained in code list are available for selection.

Association to Custom Business Object

We can create the F4 help by associating the custom filed with Business Object created using “Custom Business Objects ” fiori app. Let’s see how..

  • Create a custom CBO( or use existing one) which will serve as the F4 help for the custom our custom field. Here I created Custom BO “BP_Category_BO” with fields Category and Description as in the code list scenario.

  • To maintain the values in CBO in On-Premise, we need to create a custom maintenance app and maintain the values as shown below.

  • Next, create another custom field “Category_BO_F4” and this time associate it with BO “BP_CATEGORY_BO”.

  • Now, add the field “Category_BO_F4” to the Customer master app.

  • On edit, F4 help will be available from the associated BO

F4 Help from standard table field

Let’s say the requirement is to show the f4 as values from standard table and not as fixed list or values from custom BO. We will see how this can be achieved…

For this scenario , let’s say we want to add a custom filed for business partner type ( its just for demo and not a real business requirement) and F4 values should be displayed from standard table TB004 (BP Types)

To achieve this, we will not start with creation of custom field in CFL but old classic ways… yes, you heard it right the classic way of table append.. then what about In-App extensibility??… Very valid question… and that will be well taken care.

Let’s see the steps:

Extend Required Standard table BUT000 with custom field .

To add field to BUT000 we will append structure with custom field to extensibility INCLUDE “INCL_EEW_BUT000” .

  • Create Custom append structure ZTESTF4

  • Add custom field “ZBP_TYPE_F4_DEMO” with custom data element “ZBPTYP” of type char4 (similar to standard BP type field in TB004)

  • Field will reflect in BUT000

Enable Custom field for Custom fields and logic

This is where we are are going to address the In-App extensibility part. SAP has provided transaction “SCFD_EUI” to enable the already existing custom fields for Custom Fields and Logic and use them for Fiori apps extension through In-App.

  • GoTo TCODE “SCFD_EUI” and enter tablename as “BUT000” , field as “ZBP*” and execute

  • Next screen shows if the custom field can be enabled for CFL or Not or it need some pre-work before enablement. As we have added field directly under extensibility INCLUDE only , it shows filed “Can Be Enabled”

  • As you see there are multiple rows for the field depending on which all tables it is linked. Enabling one will enable all automatically. Select one row and click on Enable.
  • Fill in the details in the next screen and field type should be Code List as we want F4 help for our field.
  • Click Generate icon in-front of Value help view field.

  • This will generate sample templates for the CDS views which can be used to create CDS views for search help for custom field “ZBP_TYPE_F4_DEMO”. There will be two views which will need to created in defined format , code view and the text view.
  • Code view will have the value field and will be associated to the text view
  • Text view will have the text description for the values in code view.

  • GoTo Eclipse and create Code and Text views using these template code as shown below. Here Table TB004 and TB004T are used to get values of BP Types and BP Type text.

  • Pass above created view “ZBPTYPHELP” in the Value help view field and proceed.

  • We can see all the field rows shows Enabled and field ID is also generated.

  • Next, open the “Custom Fields and Logic” App and we can see our custom filed is available there.

  • Enable the Filed for usage in Business Partner API and Publish it again.

  • Add the field to the Customer master app and in Edit mode we should see the F4 help.

  • F4 Help will show the values from table TB004 and the Text from TB004T

  • Select the value and save and the selected value is updated.

 

With this we have  come to an end. We saw the different ways to add F4 help to the custom fields created using Custom Fields and Logic.

Keep Learning and Keep Sharing!!

Assigned Tags

      28 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mohit Bansal
      Mohit Bansal

      Hi Vijay

      Very nice blog, really appreciated.

       

      Regards

      Mohit Bansal

      Author's profile photo Vijay Sharma
      Vijay Sharma
      Blog Post Author

      Thanks Mohit!

      Author's profile photo Gaurav Karkara
      Gaurav Karkara

      Good one Vijay. Question:

      1. F4 help for standard table field - Is this activity reversible? Can we disable the manually enabled field?

      You mean Business Partner UI here?

      Gaurav

      Author's profile photo Vijay Sharma
      Vijay Sharma
      Blog Post Author

      Thanks Gaurav!

      Yes, we can disable the enabled field.

      We can disable it in custom fields and Logic app for the specific UI/App

      or we could completely disable it for usage in In-App extensions by disabling it in TCODE “SCFD_EUI”. This will remove the custom field from “Custom Fields and Logic” app itself.

       

       

      Author's profile photo Victor Hugo Garcia Solis
      Victor Hugo Garcia Solis

      Very helpful blog, thanks!

      Author's profile photo Jose Ferez
      Jose Ferez

      Hi Vijay i´m trying to add a custom field to an standard   FIORI app using custom field and logic, i could do it now i´m working  on the matchcode i have to consume a custom CDS view for the matchcode .

      Do you know how to achieve that ?

      We are in S/4 HANA On Premise 1909 .

      Thanks !

      Author's profile photo Samannaya Roy
      Samannaya Roy

      try Create Custom Field F4 Help View using CDS for In App Extension | SAP Blogs

      Author's profile photo Timothy Santy
      Timothy Santy

      Hi, thanks for the very helpful blog!

      I've created a field just like this and the search help works fine, but if we manually enter a value in the field (so don't use the search help but just type in the value) we get a CX_SADL_SHORTDUMP. Any ideas?

       

      BR

      Author's profile photo Kristine Fee
      Kristine Fee

      Hi!  I am having the same problem.  Did you figure this out?

      Thanks!

      Kris

      Author's profile photo Aleh Dzmitrenka
      Aleh Dzmitrenka

      Unfortunately, this (F4 Help from standard table field) doesn't work for subscription order (SO). I can see the field in Custom Fields and Logic app and everything seems ok, but when I add my custom field on SO user interface I don't see search help, just as default text field

       

      Author's profile photo Sankara Bhatta
      Sankara Bhatta

      Hi Vijay,

      Thanks for the wonderful blog. I would like to know if we can have more logic built into search helps rather than just code lists and from tables. I mean like search help exits in old SAP. I have a requiremnet where I need to display the search results based on some ABAP logic. for example call another system and fetch the values etc.,

      Is there any way I can achieve this?

      Author's profile photo Sebastiano Marchesini
      Sebastiano Marchesini

      Same question,
      I'm trying only to have more columns for example.

      How did you solve it?

      Author's profile photo Cliff Candelaria
      Cliff Candelaria

      Hi Vijay,

      Thanks for the vlog, I followed through it and managed to add the field in the app.

      However it shows as a simple text box without the f4 search help. The field shows as code list in CFL.

      Thanks.

      Author's profile photo Saumya Das
      Saumya Das

      Hi Vijay,

      Does adding custom fields via CFL adds it at GUI level also?

      Author's profile photo Vijay Sharma
      Vijay Sharma
      Blog Post Author

      Hi Saumya,

      It depends is the option to enable custom fields for GUI is available under UI & Reports tab of custom field. For eg. There is an option to enable custom fields for sales orders GUI and also for PO.

      On enabling the same an additional tab named " Custom Fields" gets added to the GUI and custom fields are displayed on that tab.

       

      Regards

      Vijay

       

      Author's profile photo MILAGROS LETICIA URIBE CARVAJAL
      MILAGROS LETICIA URIBE CARVAJAL

      Is posible create F4 Help from  Z table? for update the values with one SM30?

       

      Thanks

      Author's profile photo Matteo Galeazzi
      Matteo Galeazzi

      Yes, you can follow the very same approach described in "F4 Help from standard table field" chapter.

      You should:

      • create your custom Data Element with custom Domain
      • create a custom Z table for field values and link it to the domain as Value Table
      • create a custom Z text table for value descriptions
      • create custom CDS following the standard template, as described

      Hope it helps,

      Author's profile photo Matteo Galeazzi
      Matteo Galeazzi

      Hi Vijay,

      thank you for this great blog. We successfully used your approach ("F4 Help from standard table field") on either Material Master and Outbound Deliveries.

      Unfortunately we are stuck on enhancing Sales Pricing the same way: the reason is that custom fields must be added to KOMP structure.

      Standard transaction "SCFD_EUI" unfortunately selects fields from Transparent Tables only, so it's not possibile to enable these fields on CF&L.

       

      Do yow know any other way to solve this issue?

      Thank you very much

      Author's profile photo nibedita mohanty
      nibedita mohanty

      Hello Vijay,

      Greetings!

      Very nice blog i must say and quite helpful too . we have achieved f4 values via in app extensibility . Now requirement is to get filtered values on second field based on first field . How to achieve that ? Can you please suggest some ideas ?

      The values selected in first field is drafts saved , however it does not get stored in draft table unless we click on save button . If in any way we can store this value , may be based on that we can fetch the second field values . Kindly guide .

       

      Thank You very Much.

      Author's profile photo Sebastiano Marchesini
      Sebastiano Marchesini

      Did you find a solution?

      Author's profile photo Jean-Guillaume KRAMARZ
      Jean-Guillaume KRAMARZ

      Hello,

      Thanks for this great post! I've been looking for a while how to implement F4 search on custom fields based on standard table.

      I am trying to extend the search view by adding other fields than ID and description but I can't seem to figure out how to implement it.

      I tried adding fields on both CDS view like this:

      @Search.defaultSearchElement: true
      sortl as SortField,

      But I still have only 2 search fields (ID and Description).

      Do you know if it is possible?

      Regards,

      Jean-Guillaume

      Author's profile photo Sebastiano Marchesini
      Sebastiano Marchesini

      Hi Jean,

      I have the same problem.

      It seems to have only two search fields and I don't know how to show the third one.

      Did you find something?

      Author's profile photo Sandeep Srinivas
      Sandeep Srinivas

      Hello Jean,

      Did you find the solution for above requirement?

      Even I'm facing same issue

       

      Regards,

      Sandeep K S

      Author's profile photo Jean-Guillaume KRAMARZ
      Jean-Guillaume KRAMARZ

      Hello,

      Unfortunately I couldn't find how to do it. It seems that using this method you can only have key and description.

      Regards,

      Jean-Guillaume

      Author's profile photo Sandeep Srinivas
      Sandeep Srinivas

      Thanks for the response

      Author's profile photo Ekta Bharti
      Ekta Bharti

      is there any limitation with namespace of custom field and it's F4 help ?

      For one the issue where Custom field with Z and Y name spaces are working fine but in case of custom field with ABAP name space such as - /BAY0/xxx , Only custom field is coming in fiori application , but its assigned F4 search help is not getting picked from backend table. How to resolve this?

      Author's profile photo Samannaya Roy
      Samannaya Roy

      try Create Custom Field F4 Help View using CDS for In App Extension | SAP Blogs

      Author's profile photo anjali thakur
      anjali thakur

      Hi Vijay ,

      I have added the code list based custom field for standard application.

      The custom field is available as F4 in application but user can still assign any value manually

      Can we disable the manual input for the custom field , therefore user will not manually enter the value but will select from the value help