Skip to Content
Technical Articles
Author's profile photo Masaaki Arai

Adding Field in standard Fiori apps of S/4HANA with Custom Fields and Logic

Purpose of this blog

This blog is about how to add a field in standard Fiori apps and other objects by using “Custom Fields” menu in Key User Extensibility Tools “Custom Fields and Logic”. It also intends to explain how internal objects are enhanced internally when adding a field with Custom Fields and Logic, e.g. how a field is added to a table. The tool is not only for new fields but it can add the fields already in the source table to objects like standard Fiori apps.

Custom Fields and Logic has 3 functions, Custom Fields, Data Source Extensions and Custom Logic, but this blog focuses only on Custom Fields.

Highlight of this blog:

  • Introduction of Extensibility Registry to find the target object.
  • Explain how a field is added in the relevant objects (table, CDS view, etc..) internally.

Note: this blog is mainly for S/4HANA Any-Premise and S/4HANA Cloud Extended, but I believe it should also help using the tool in S/4HANA Cloud Essentials.

It is also possible to add fields already in the table to apps using CFL. See the blog for further detail.

See the section of the blog to understand more about how to add the fields to the VDM (standard CDS View) for the standard Fiori apps. If the object you want to add is not in Extensibility Registry, it is possible to add fields to VDMs with Extend View. See the blog for further detail.

For adding fields in Universal Journal, see SAP Note 2453614 FAQ: Universal Journal Extensibility.

 

Topics:

 

Why is the tool “Custom Fields” very important?

This tool is so important for S/4HANA implementation as it is typical requirement to add fields to standard apps and objects, and this tool help reducing the efforts to add fields drastically by automate the tasks needed to add fields.

In ECC, for adding a field in a screen, firstly it has to be added in the source table using append structure with the transaction SE11, and secondary, they also have to be added in the Dynpro screen with the transaction SE51, and finally, the ABAP logics have to be added to send/receive the values of the added fields between screen and the tables using User/Customer Exit (Transaction SMOD/CMOD) or BADI (Transaction SE18/19).

However, thanks to “Custom Fields”, those tasks are automated! It takes only about several minutes to add fields to the apps and objects. In other words, when fields have to be added in S/4HANA implementation, it is expected to review if this tool could be used. It is also the case even when the screen is SAPGUI Dynpro. It is against best practice to ignore this tool and add the fields manually as it had done in ECC. Therefore, more than technical or Fiori experts, functional experts are expected to understand this tool. Don’t worry, it is not difficult. You can enjoy reducing the efforts with this magic!

In addition, this tool should contribute to making more standard Fiori apps available by adding the important custom fields in the standard Fiori apps. One of the main reasons why a standard Fiori apps cannot be used by business users is important custom Fields for them are missed in the standard Fiori apps. Thanks to Custom Fields, it could be overcome!

Background Info: S/4HANA Extensibility and Key User Extensibility tools

Key User Extensibility tools are the tools to create or enhance the objects without custom coding, and Custom Fields and Logic (CFL) is one of the main tools in Key User Extensibility Tools. Custom Field is a menu in this tool.

In S/4HANA context, S/4HANA Extensibility means creation and enhancement of the apps and objects (note: it does not mean only enhancement). It consists of In-App Extensibility and Side-by-Side Extensibility. In-App Extensibility means creation of the object IN S/4HANA and Side-by-Side Extensibility means development or enhancement OUTSIDE OF S/4HANA, mainly with SAP Cloud Platform. In-App Extensibility consists of Key User Extensibility and Classic Extensibility. Classic Extensibility means traditional custom development like custom program and Function Module. In S/4HANA, the way to create custom object with tools are provided in addition to classical ways, which is called Key User Extensibility tools. In S/4HANA Cloud (SaaS), Classic Extensibility is not available and Key User Extensibility is the only way for In-App Extensibility.

Please note that Key User tools are not only the tools for extensibility, but there are some other tools  in S/4HANA like “Manage Date Function”, I personally want to call it Key User tools. There are some other “In-App tools”. See the blog regarding “In-App tools” for analytics. In addition, conceptually, enhancement of S/4HANA using other SAP or third party tools can be included in Side-by-Side Extensibility, e.g. create analytical apps with SAP BusinessObjects or Microsoft Power BI.

Technical overview

Custom Fields in CFL

You can use Custom Fields and Logic by assigning the role in which technical catalog SAP_BASIS_TCR_T is included.

Custom Fields and Logic has 3 menus (Functions),

Custom Field: Create custom fields to the table and add it to applications and objects, or add fields already been in the source table to applications and objects.

Data Source Extension: Add fields to a data source from the source view or the CDS View already associated to the source.

Custom Logic: Add logics to fill/display the value of the custom fields.

See SAP Help in detail.

Focus of this blog is on Custom Fields.

Business Context and the target objects

In Custom Fields in CFL, a field is added to “Business Context”. “Business Context” is a business object in S/4HANA like Material, Business Partner, Product or Billing Document, Journal Entry Item. After that, the fields in the Business Context is added to Fiori apps which uses this business context, e.g. a field is created in the Business Context PRODUCT can be added to Manage Product Master Data (F1602).

There are 2 ways to find the Business Context and the target objects: 1) Extensibility Registry and 2) Detail of each Business Context in Custom Field in CFL (Transaction SCFD_EUI). See the blog in detail.

1. Extensibility Registry

You can find which Business Contexts are in S/4HANA and which objects can be enhanced in Extensibility Registry (Transaction SCFD_REGISTRY). If you want to add a field to business object or apps in S/4HANA, it is expected to check if it is possible with CFL in Extensibility Registry before adding it manually. In other word, if the objects you want to add a field are not in Extensibility Registry, there are no other ways but to add it manually. In case something is not available here, a customer can request it via https://www.sap.com/about/customer-involvement/influence-adopt.html.

 

Business Context tab:

Click a entry (PRODUCT_PLANT) and the detail info is displayed.

Relevant for structural enhancement: The business context is relevant for field extensibility.

Relevant for logic enhancement: The business context is relevant for BADI registration

Persistence Include: This “ddic include” is a part of the database tables that are extended by the Custom Field. It must also be used in the structures that transport the field contents in the ABAP. The “persistence include” is extended by an append, when a new custom field is published.

Transient include: This include is part of the binding structure of an OData service. It contains additional fields (e.g. for descriptions and field control) that are not persisted.

Change indicator include: This include is extended when the application uses change flags to indicate that field content should be transferred (e.g. in a BAPI).

Field Suffix: To prevent name conflict, the custom fields get business context dependent name suffixes.

Quota definition: Here the application defines how many fields with how many bytes a customer may define in this business context.

 

Relationships between the Business Context and the source tables might be explained in some SAP Notes like SAP Note 2590603. This Note is about the relationship between MARC and PRODUCT_PLANT. Or, you could find it with the SELECT statement like below.

SELECT distinct tabname FROM dd02l
WHERE tabname IN ( SELECT DISTINCT tabname FROM dd03l WHERE precfield = ‘PLNT_INCL_EEW_PS’ )
AND tabclass = ‘TRANSP’
AND APPLCLASS <> ”

Please replace “PLNT_INCL_EEW_PS” with the persistent structure name of the Business Context which you want to add the field. You can run the SELECT statement with transaction DBACOCKPIT > Diagnostics > SQL Editor.

 

Extensible CDS View tab:

Detail of I_PRODUCTPLANT

 

Extensible OData Model tab:

MD_C_PRODUCT_MAINTAIN_MDL

Support of Custom Fields tab:

Impl. Type: The implementation type shows how the OData service is implemented ( RDS: Referenced Data Source, SADL: Mapped via SADL, ‘ ‘: Manual implementation ).

Basic Search support: Shows if the OData service supports basic search for custom fields.

Filtering supported: Shows if the OData service supports filtering for custom fields.

CDS View Name: Must be filled for SADL and RDS implemented OData services. If you extend the OData service then the CDS view is extended automatically.

 

Function Module (BAPI) tab:

The FM for the business context PRODUCT_PLANT is CMD_MIG_PROD_MAINTAIN.

Some of the BAPIs are used as the source of Migration Object in Migration Cockpit. Below are the BAPIs used in Migration Object on S/4HANA1909.

Migration Template Function Module Wrapper Function Module
SIF_SALES_ORDER BAPI_SALESORDER_CREATEFROMDAT2
SIF_MAT_CONSUMP BAPI_MATERIAL_SAVEREPLICA
SIF_GL_BALANCES

BAPI_ACC_DOCUMENT_CHECK

BAPI_ACC_DOCUMENT_POST

DMC_MIG_ACC_DOCUMENT_POST
SIF_SD_CONTRACT BAPI_CONTRACT_CREATEFROMDATA

 

Other than above, the following target objects can be checked in Extensibility Registry.

BADI tab: The listed BADIs are used in Custom Logic.

Data Transfer tab: Data transfers define the transport of the content of a custom field from a source business context to a target business context. The application has to call method

cl_cfd_data_transfer_factory=>get_data_transfer_runtime( )->transfer_data in addition to the registration. (the sample source is in Extensibility Registry)

Business Scenario tab: A business scenario is a collection of data transfers. Every involved business context must be connected to the other business contexts via a data transfer. No gaps are allowed.

SAP GUI Context

SOAP Service

IDoc

Association Target

 

The relationship of the tabs between Extensibility Registry and “Custom Field” tool is Not 1:1.

BADI is not in “Custom Fields” (but in “Custom Logic”), and Association Target is the selection list of the association to business object when selecting “association to business object”.

2. Detail of each Business Context in Custom Field of CFL

The target objects for a Business Context can be checked in each tab of “Custom Fields”.

Target objects for Business Context ”Sales: Sales Document”:

UIs and Reports tab:

In UIs and Reports tab, Data Source includes

  • CDS View (starting with C_ or I_ ) ,
  • OData created with transaction SEGW (ending with _SRV in normal),
  • Description of the OData, which is the Entity Types included in the OData, not the description of the OData itself.
  • SAPGUI screen

Email Templates:

Email Templates are only implicitly listed in the Extensibility Registry. Only the CDS Views on which the Templates are based on, can be found.

Form Templates:

Form are only implicitly listed in the Extensibility Registry. Only they CDS Views on which the Templates are based on, can be found

Business Scenarios:

OData API:

SOAP API:

BAPI:

Preparation for Custom Fields and Logic

For using Key User tools including CFL, it is necessary to activate Key User Extensibility. See the SAP Note 2283716 and 2807979 (for on-Premise).

Next, create the role in which the Fiori Catalog “SAP_BASIS_BC_EXT” is included in the menu with the transaction PFCG (in S/4HANA on-Premise). In this catalog, some Key User tools like Custom Fields and Logic are included.

Make the statuses of all authorization objects green in the authorization profile generated in Authorizations tab, and assign the role to your user.

 

After Logging in Fiori launchpad, you can find the catalog “Extensibility” is added. In the menu “App Finder”, add CFL in “Extensibility” catalog to “My Home”.

 

Now you can launch this tool from Fiori launchpad “My home” group.

Add a field to Business Context and apps

Add a field to a Business Context

Steps to add a field to a Business Context

Launching CFL in Fiori launchpad.

Select a Business Context and enter the info for the field to be added.

Push “Create” icon in top-right.

In the following case, enter as below and push “Create and Edit” in bottom-right.

Business Context: Master Data: Sales Document Item

Label: Cust Fld 90

Identifier: ZZ1_C90

Tooltip: Cust Fld 90

Type: Association with Business Object *

Business Object: CUST90 *

  • When selecting “Association to Business Object”, List for Value help can be associated to the created field. In the case above, CUST90 has already been created supposed to be associated to this field beforehand using Custom Business Object. Other than the Custom Business Objects, Views in “Association Target” tab of Extensibility Registry are prepared by default.
  • The following types are provided.

When selection Code list, Code list can be created, and internally the CDS View for the value help is generated and associated to the field.

General Information tab

BAPIs tab (the BAPI is enabled when the field is added).

  • In the screen above, the column Data Source is added with the personalization button (top-right).

 

Push “Publish” in the bottom-right of the screen.

Status is changed to “Publishing”.

Several minutes later, it is changed to “Published”.

Internally, the field is added to the source table(s) with persistent structure

(if the table of the selected business context is Compatibility View, e, the field is added to relevant CDS Views used as the Compatibility View with Extend View, e.g. business context product plant and Compatibility View MARC).

 

Fields to be added to the table:

The fields can be added in the table of the initial screen of CFL with Personalization button (top-right).

Associated Business Objects, Origin (whether created with CFL or already in the table), Created By, Created On, Changed On and Original Language are added below.

 

Custom Fields and Logic can be launched from Runtime Adaptation of the corresponding UI. This way the correct Business Context and Target Object are already pre-selected.

 

How is a field added technically

In the table VBAK, the field is added via the persistent structure of this business context SDSALESDOCITEM_INCL_EEW_PS.

Function Module: The field ZZ1_C90 is added in the following Function Modules

BAPI_CUSTOMERCONTRACT_CHANGE

BAPI_CUSTOMERINQUIRY_CHANGE

BAPI_SALESORDER_CHANGE

BAPI_CUSTOMERQUOTATION_CHANGE

BAPI_CONTRACT_CREATEFROMDATA

BAPI_INQUIRY_CREATEFROMDATA2

BAPI_SALESORDER_CREATEFROMDAT2

BAPI_QUOTATION_CREATEFROMDATA2

 

How is the field added to the BAPIs:

BAPI_SALESORDER_CHANGE

BAPE_SDSALESDOCITEM is BAPI Ext structure for EXTENSIONIN in the FM BAPI_SALESORDER_CHANGE. SDSALESDOCITEM_INCL_EEW_PS is the persistent structure for the business context SD_SALESDOCITEM (Sales Document). This structure has the field ZZ1_C90_SDI is added.

 

Extensibility Registry (Transaction SCFD_REGISTRY)

Open FM BAPI_SALESORDER_CHANGE and double click BAPI Ext structure BAPE_SDSALESDOCITEM.

Double click the structure SDSALESDOCITEM_INCL_EEW_PS.

The field ZZ1_C90_SDI is there.

See the SAP help to understand how to use EXTENSIONIN to enhance BAPI.

EXTENSIONIN in FM BAPI_SALESORDER_CHANGE.

Click Associated Type BAPIPAREX.

BAPIAREX

When you use the BAPIPAREX structure, the field values have to be converted to a special format via the methods of class CL_CFD_BAPI_MAPPING, e.g. the case for Condition Contract.

How to add the field to the FMs which are not in the Extensibility Registry

It depends on the FM how to add the field to the FMs which is not in the Extensibility Registry.

Examples:

  • Field added in MARA to BAPI_MATERIAL_SAVEDATA

Add the field to BAPI_TE_MARA and BAPI_TE_MARAX and use it in Extensionin of BAPI_MATERIAL_SAVEDATA. See wiki in detail.

 

  • Field added in PO tables (EKKO/EKPO, etc) to BAPI_PO_CREATE1.

It is possible to map the new fields in principle in the BAPI using the BAdI ME_BAPI_PO_CUST-> EXTENSIONIN.

MEPOHEADER and MEPOITEM are in the signature of that method so it is possible to map the fields.

See the wiki in reference.

Add a field to apps

Steps to add a field to the relevant objects

Firstly, the custom field has to be added to the data sources. After that, it can be added by manual operation, or added automatically. For using the custom field in KPI app in the views by default, new KPI app has to be created by coping original one. “Adapt UI” is used to add in Object Page. In Fiori Design Studio, the field is added automatically.

 

The fields can be added to the data sources in UIs and Reports tab.

In UIs and Reports tab under Custom Fields tab, set to display Data Source column from Personalization icon.

Data sources are displayed.

 

Push “Enable Usage” for the following 3 data sources in this case.

  • C_SALESCONTRACTITMFLFMTQ (Analytics – Sales Contract Fulfillment Rate)
  • SD_F2583_SLSITMPRPSL_SRV 0001 (Manage Sales Item Proposals)
  • C_SALESQUOTATIONITEMQRY (Sales Quotations – Flexible Analysis)

 

After Saving, push “Publish” in bottom bottom-right.

  • The data source starting with I_ or C_ are VDM (CDS View), and others (most of which end with _SRV XXXX) are OData created with Gateway Service Builder (Transaction SEGW).

 

The “Publishing” is started and will be finished several seconds later. (the status is changed to “Published”.

How is a field added technically

How to add fields in the UI depends on Fiori app type.

For KPI app, the new app must be created (copy) to add the fields in the initial screen, but if you do not have to add in the initial screen but it is enough to make it possible to add the field manually after launching the app, you do not have to copy and create new one.

For Fiori Design Studio app or Webdynpro Grid, the field is added automatically.

For Fiori Elements Object page, you can use “Adapt UI” in Fiori launchpad.

For other Fiori Elements app or Freestyle app, if the source is CDS View, you may be able to add with UI annotations by using it with Metadata Extension(for the CDS Views in which metadata extension is set to be allowed with “Metadata.allowExtensions”. But in some other cases, e.g. the source is OData Project (T-cd SEGW), it might be more complex.

 

Check the internal objects in which the field is added.

KPI app: CDS View C_SALESCONTRACTITMFLFMTQ / Sales Contract Fulfillment Rates (F1905).

CDS View C_SALESCONTRACTITMFLFMTQ is used in Sales Contract Fulfillment Rates(F1905).

Open the CDS Views (Data source). The field is added with the Extend View.

Like Append Structure, by using Extend View, the field in the source can be added to the standard VDM without changing the view name.

In the Extend View, the field ZZ1_C90_SDI is added to C_SALESCONTRACTITMFLFMTQ.

In I_SalesContractItemFlfmtCube, the source of C_SALESCONTRACTITMFLFMTQ, the field and the associated view is added with the Extend View.

ZZ1_C90_SDI is from E_SalesDocumentItemBasic , the source of which is VBAP, and which has been associated to I_SalesContractItemFlfmtCube. The source of I_SalesContractItemFlfmtCube is VBAP, so in a sense, VBAP is joined to VBAP. But performance would not get worse because of the join as when the data is accessed, thanks to HANA SQL optimization, SELECT is optimized internally to retrieve the same result without joining VBAP. See SAP Note 2000002 in detail.

 

Run the app “Sales Contract Fulfillment Rates” (F1905) in Fiori launchpad.

The application is launched. Push “Setting” icon (top-right).

The field created with CFL is selectable when trying to do with the value help.

 

To use the custom field in the View, new KPI has to be created by copying original KPI app with the tool “Manage KPIs and Reports”.

Fiori Element List Report : Manage Sales Item Proposals (F2583)

The source is SD_F2583_SLSITMPRPSL_SRV 0001

With transaction SCFD_REGISTRY, you can find CDS View C_SALESITEMPROPOSALITEMTP is the source of the OData SD_F2583_SLSITMPRPSL_SRV as below.

The Extend View has been created to add the field and the associated view to CDS View C_SALESITEMPROPOSALITEMTP.

In ADT, Open C_SALESITEMPROPOSALITEMTP and jump to the Extend View.

In the Manage Sales Item Proposals (F2583), the field added with CFL is included. Launch this app from Fiori launchpad.

The application is launched, and the records are retrieved by pushing Go. Click one record and go detail.

The field added with CFL is included in the table of Materials.

Fiori Design Studio : Sales Quotations – Flexible Analysis (F4093) / CDS View C_SALESQUOTATIONITEMQRY 

CDS View C_SALESQUOTATIONITEMQRY is the source of Sales Quotations – Flexible Analysis (F4093), which is Fiori Design Studio application. When a field is added to the source CDS View, it is also added to the application automatically when the app type is Fiori Design Studio.

When a field is added with CFL, Extend Views have been created to add the field to C_SALESQUOTATIONITEMQRY and the source Interface view of this consumption view. You can find them with ADT.

Extend View for C_SALESQUOTATIONITEMQRY

Extend View for I_SALESQUOTATIONITEMCUBE_2 (source of C_SALESQUOTATIONITEMQRY)

In Fiori launchpad, launch the app Sales Quotations – Flexible Analysis (F4093).

The field is added in the application.

Note: Text of the field is not added although the field type is “association with Business Object”, as the analytics category is not set to DIMESION in the associated CDS View. It is not the case when selecting “Code List” as field type. Then Analytics category of the generated CDS View is set to DIMENSION.

Others

  • For the field type Text, master view cannot be associated to the custom field. For adding the field with associated custom master CDS View based on custom table, the field and the custom master view have to be added with Extend View manually.
  • To derive the values to be written in the standard field from the value inputted in the custom field, technically Custom Logic could be used, but it depends on the BADI provided for Custom Logic. In case of SD, it is not possible to derive the value for standard field.
  • One typical requirement is to add a field with associated master view, and the custom table must be the source of the master view. For meeting the requirement, the field has to be added manually to the source table and the master view should be created using the custom table as the source. In the transaction SCFD_EUI, add this field as Custom Field and select LIST as semantic type and set the created custom master view as the value help view. See the blog in detail. See also SAP Note 2632727 and 2660620.
  • For adding fields in BW provider for BPC Optimized for S/4HANA, please use Metadata Extension Tool with which the fields in ACDOCA/P are added to corresponding HANA Calculation View and InfoProvider, e.g. /ERP/SFIN_V01. But you have to add the fields in the BW Queries manually.
    • You can run Metadata Extension Tool in Customizing:Tcd SPRO > Controlling>General Controlling>Planning>Setup for Planning>Enhance InfoProvider with Additional Fields.

       

Hope you enjoy more and more standard Fiori apps by adding important fields with Custom Fields and Logic!

Assigned tags

      99 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo shweta nargachhe
      shweta nargachhe

      Hi Masaaki,

      This is really good block .It helped to clarify concept about In app extension and side by side extension.Thank you.

      If I am having ABAP on cloud scp along with S/4 hana system.Is it side by side extension and what is scenario we will be using this ? Will you please help to explain on this more?

      Regards,

      Shweta

       

       

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Shweta,

      Thanks.

      It is in in-App extensibility, not SBS, not related to ABAP on CP.

      pls read this chapter.

      https://blogs.sap.com/2020/02/01/adding-field-in-standard-fiori-apps-of-s-4hana-with-custom-fields-and-logic/#Background%20Info

      Thanks, Masa

      Author's profile photo Vincent Voca
      Vincent Voca

      Thank you for taking the time to post this!

      Author's profile photo Thomas Schneider
      Thomas Schneider

      A very nice blog post that provides a look "behind the scenes" which is in particular important for all users of the on-premise edition.

      Let me add 2 points

      1. you wrote: Business Context” is a business object in S/4HANA like Material, Business Partner, Product  ...  . More precisely, a business context belongs to a business object node, for example sales order header or sales order item. Thus, in most business objects you find 2 business contexts, sometimes even more.
      2. You are describing nicely the activation steps for Key User Extensibility in the on-premise version. Readers may ask how this works in the Cloud edition. The good news is, in the Cloud edition, Key User Extensibility is already active by default (except for the starter edition, see SAP note 2283716), and you only have to assign the respective role to the users (see the documentation to find the exact role names).

      Regards, Thomas

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Thanks, Thomas!

      Author's profile photo navya shetty
      navya shetty

      Hi Masaaki

      Thanks for the amazing blog. I have one question though .We have a requirement for extending standard fiori app(like add a standard field in UI of fiori app , hide existing field) and the modifications done should be visible to all business users.Please let me know if i can still use "Custom Fields and Logic" app for this extension. Once the extension is created , how do we transport it so that the changes done(new field added/hided) are visible to all users .

       

      Regards,

      Navya.

       

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Navya,

      Depending on what kind of Modification it is.

      the fields added to the source table could be added with Tcd SCFD_EUI.

      See the blog in detail.

      https://blogs.sap.com/2020/02/06/adding-the-field-already-in-the-table-to-standard-fiori-apps-with-custom-field-and-logic/

      Thanks, Masa

       

      Author's profile photo navya shetty
      navya shetty

      Hi  Masaaki

      I have described my requirement in this thread https://answers.sap.com/questions/13013603/looking-for-inputs-for-extending-fiori-app-with-ap.html

      Do you think I can use the custom fields and logic app for adding a field to fiori app with application type as  Web Client UI.

       

      Regards,

      Navya.

      Author's profile photo Attila Berencsi
      Attila Berencsi

      THANK YOU!

      Author's profile photo Shiva Krishna Esakoila
      Shiva Krishna Esakoila

      Hi Masaaki,

      Thank you for the Blog!! Great work.

      I've a requirement to extend the info provider (on ACDOCA) of query with the other standard fields from ACDOCA which are not projected. These are not custom fields and so I can't make use of SCFD_EUI and not part of any association CDS so that I can make use of associations in data source extension of CFL app.

      We can always do this in Eclipse thru extend view. I can't use eclipse and had to go with CFL app.

      Please let me know if there's any possibility.

      BR,

      Shiva Krishna E

       

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Shiva,

      it seems Extend View should be the only option although I need to know more about the field and app you want to add. Why cant you use ADT?

      Thanks, Masa

      Author's profile photo navya shetty
      navya shetty

      Hi Masaaki,

      Please let me know if we can we use the custom fields and logic app for adding a field to fiori app with application type as  Web Client UI.

       

      Regards,

      Navya.

      Author's profile photo Soumya Renukamurthy
      Soumya Renukamurthy

      HI there,

      its great blog. I am into custom development for s4hana 1709 on prem cloud release. with this tool, customer can enhance standard fiori application? how can i enable this tool in customer fiori launchpad environment? is this release specific?

      i have requirement – display vendor list in financial line of business. need to add 3 custom fields in fiori app. application is created from CDS based, data source reference at OData, BSP application at gateway system. in webide, i am developing the app extension.

      is this can be achieved via this tool by retaining the standard behaviour? what more i need to learn more about how it fit in this criteria.

      Regards,

      Soumya

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Soumya,

      Pls create the role including catalog SAP_BASIS_TCR_T and assign this role to your user.

      whether or not your FIori app can be enhanced can be checked in Extensibility Registry explained in this blog.

      But sometimes not possible. In the case, It has to be enhanced with other ways. e.g. for CDS View Extend View could be used.

      https://blogs.sap.com/2018/08/22/sample-custom-cds-view-using-predefined-virtual-data-model-and-extend-view-in-s4hana/

      regards, Masa

      Author's profile photo Charles Anthony
      Charles Anthony

      Hi Masaaki,

       

      kidly tell me the role for Custom Fields in CFL..

       

       

      Thank you .

      Regards,

      Antony

      Author's profile photo Aloysius Magtibay
      Aloysius Magtibay

      Hi Masaaki,

      Thank you for your for this very informative blog.  Are there limits on how many custom fields can we add in a business context?

      Thanks

      AM

      Author's profile photo Ching Hong Chong
      Ching Hong Chong

      Based on the previous sharing session with SAP, if not mistaken is limited to 1000 character lengths. Not sure SAP improve since then… And this change will not apply to all the GUI tcode(ME23N/ME21N.. etc) which might even create bigger problem on the reporting issue as most of the standard Fiori report in S4HANA is still using GUI version and can’t replace by the Fiori UI5 App / analytical app.

      Correct me if I’m wrong.

      Author's profile photo Chaitra A
      Chaitra A

      Hi Masaaki,

      Thanks for the excellent blog!

      Please let me know if freestyle Fiori apps can also be extended using In-App extensibility.

       

      Regards,

      Chaitra

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Chaitra,

      What I can say is the target is the objects in SCFD_REGISTRY.

      I have not checked all objects, but as far as I know, there are no or few Fiori Freestyle apps ("SAP Fiori (SAPUI5)" extensible with CFL.

      Most of standard Freestyle apps are based on OData in which OData is "mapped" to the source CDS View, but this kind of OData is mainly not the target of CFL, but odata using CDS View as reference would be the target.

      Thanks, Masa

       

      Author's profile photo Archana Sakkuri
      Archana Sakkuri

      Hi Masaaki,

       

      Thank you for the detailed explanation.

      We have added a custom field to a standard app. Is there an option to add the dynamic field control? When I try to edit the extended view generated from CFL to add 'EXTERNAL_CALCLUATION' at the field level, it throws the error message : 'Object could not locked ' and 'Editing is only possible within FIORI app custom fields.

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Archana,

      For the case, it is expected to add field manually by creating custom Extend View.

      Hope if my blog could help.

      https://blogs.sap.com/2018/08/22/sample-custom-cds-view-using-predefined-virtual-data-model-and-extend-view-in-s4hana/

      Thanks, Masa

      Author's profile photo Kanwardeep Singh Gill
      Kanwardeep Singh Gill

      Hi Masa,

      I am working on a project where i need to extend an existing CDS view with custom fields for the central procurement Sourcing Project Application(RFX).

      I have done all steps, like extending the underlying persistence structures, extending the CDS and exposed the custom fields in Consumption View for Sourcing Project.

       

      Now, we have a requirement to add value helps to each of the custom fields for which i defined associations to the relevant value help CDSs and used the @Consumption.valuehelp to use the exposed associations as value Helps. Till this point everything is fine.

       

      The problem here is that Customer does not want to redefine an standard applications, but they want to use the standard odata service. Now, the custom fields get added to the RDS in Odata Project, however, the newly added associations are not added for which we would need to re-generate the standard gateway project, which means modifications.

      Now, the customer does not want to go ahead with the modification of the gateway project, therefore, none of the values helps are coming for the custom fields.

       

      My ask: Is it possible to include the newly added associations in gateway project without regenerating the project? If not, is there any alternative available for this?

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Kanwardeep,

      For associating master view, see the last comment in my blog.

      One typical requirement is to add a field with associated master view, and the custom table must be the source of the master view. For meeting the requirement, the field has to be added manually to the source table and the master view should be created using the custom table as the source. In the transaction SCFD_EUI, add this field as Custom Field and select LIST as semantic type and set the created custom master view as the value help view. See the blog in detail.

      In addition, you can redirect the request to the original odata service to the copied odata service in which you can adjust the logic using tcd /n/IWBEP/REG_SERVICE. set original odata in Extension for Service

      Thanks, Masa

       

      Author's profile photo jyothir aditya k
      jyothir aditya k

      Hi Masaaki,

      We are trying to apply the same thing for outbound delivery scenario(API_OUTBOUND_DELIVERY_SRV) , where we don't have a standard BAPI enlisted in the "Custom Fields and Logic" App. We need to extend some custom fields to the delivery item and thinking of updating the same using OData API service. On addition using CFL app, we couldn't see the fields in the OData model, but were added to the table LIPS,but the fields were available in metadata. And we have to make them updatable.  In the standard model, there are some 14 which can be updated using API. But now we have to make these custom fields updatable. Also changing of the standard model is not supported. Can you please give some pointers on how to proceed ?

       

       

      Regards,

      Aditya

      Author's profile photo Aditya Palekar
      Aditya Palekar

      Hello Masaaki,

      We are trying to add a custom field to ACDOCA which should be editable for a customer line item (Account Type = D) in SAP GUI and possibly Fiori.

      I came across this note 2453614 but it clearly mentions that with Classical Coding block I can only use it for GL Item which does not suit my purpose. And if I use Key User extension then it adds the field for any type of Item but does not allow input of values.

      Any idea how can I achieve this requirement?

      Best Regards,

      Aditya

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Palekar,

      In my understanding, in many cases, the added field should not be read only. but I know the cases in which additional effort would be needed. e.g. Use BADI to handle the added field in FM.

      To which datasources do you want to add the field?

      Thanks, Masa

      Author's profile photo Aditya Palekar
      Aditya Palekar

      Hello Masaaki,

      Thanks for your response. I should have seen your response earlier.

      I hope I have understood your point and I will answer.

      The custom field that I am trying in ACDOCA should appear in the Process Receivables Fiori Application. Not sure which specific reports this should appear in. But are you saying that you know a way to have a custom field in ACDOCA appear on a customer item and make it editable? That would be helpful.

       

      Continuing this investigation, I found another point related to BSEG table wherein the fields XREF1 to XREF3 can be used for user specific needs. In your experience can these fields become truly editable fields meaning: -

      a. Can I introduce these fields into the UI, enter a value and store in the system even through a Fiori application? What is see is these fields are flagged as Change Document enabled, so if a value is stored it will be recorded in the Change document.

      b. Can I add assign my own search helps to these fields?

       

      Please if you could suggest for both the ACDOCA and BSEG fields that would help.

      Thank you,

      Best Regards,
      Aditya

      Author's profile photo Paddu K
      Paddu K

      Hello Masaaki,

      Thank you for the very detailed blog. I tried this for different Business contexts and I have below queries.

      1. The newly added fields are prefixed with ZZ1_ and suffixed with 3 character word based on the Business context selected(eg: PDH for Purchase Document header). Is there a way to change this configuration to have the fields with the prefix we want(may be ZZ_) and no suffix? I tried changing the config in the T-code S_ATO_SETUP but, it is giving me error.
      2. Can we capture the changes in a package of our choice and in a TR while publishing the changes in the Fiori app? When I tried, the objects are saved in the Local package as per the configuration made in S_ATO_SETUP. We have to manually move the objects to our TR and package. There is a change that we may miss few objects and multiple objects get updated with this approach.
      3. How to control the new fields behavior based on some conditions? I mean, if the fields have to be disabled/enabled or visible/invisible based on some condition, how to handle it while extending through the FIori app?
        Request you share your inputs on these queries.

      Thanks & Regards,

      Pradeep.

      Author's profile photo Soumya Renukamurthy
      Soumya Renukamurthy

      Hi,

      I did the below steps for the similar issues. hope it helps.

      1. You cannot change the prefix as its system generated fields.
      2. Package can be assigned in fiori app - with reassign to package option or assign to TR and include in CR option in Register Extensions to Transport.
      3. in Annotation file or XML view, behavior can be changed.

      Regards,

      soumya

      Author's profile photo Vinay Parab
      Vinay Parab

      HI Masaaki,

       

      Thanks a lot for sharing detailed explanation about the CFL app. Taking a step forward, in my S/4 HANA Cloud STE implementation, I need to add a custom field WBS element to the Purchase Order Line item and I am able to do that, but the challenge is adding an F4 Help to that field. On further checking I found that Custom Business Object can be a solution, by any chance do you have information/experience in creating a CBO which can be used.

       

      Thanks & regards

      Vinay Parab

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Vinary,

      Could it help? I think teacher Google could teach.

      https://developers.sap.com/group.abap-extensibiliy-cbo-cce-ccl.html

      Thanks, Masa

      Author's profile photo Basudeb Datta
      Basudeb Datta

       

      Hi Masa,

      This is an excellent document. Thanks for this post.

      We have a requirement around analytic app and underline view is HANA view.

      We added few custom fields in ACDOCA and ACDCOP. Now we want these fields to be available in F0925A Market segments App ( Plan/ Actual). This app is pulling data for Actuals from the ACDOCA table using view /ERP/SFIN_V01 & Plan from ACDOCP table using /ERP/SFIN_V20. Is there any tool/technique to add these custom fields in Fiori App? 

      FYI... we referred this link for solution. Is there any alternatives?

      https://help.sap.com/doc/4215dc52f2d2a91ae10000000a44538d/1610%20002/en-US/1c233257e064dd7ae10000000a4450e5.html  

       

      Thanks

      Basudeb

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Basudeb,

      Sorry, I have never tried to add fields for BPC optimized.

      But according to the help and customizing guide, it is possible to add the fields automatically with the customizing menu to INFOPROVIDER.

      After that it seems it is needed to add fields to the query manually. it is possible to do with BW-Modeling tools. (open the query /ERP/SFIN_M01_Q2501 used for F0925A and add the fields). you can do also with BEX Query designer. it is good to ask BW expert.

      Thanks, Masa

      Author's profile photo Flavio Souza
      Flavio Souza

      Hello Masaaki

      Thanks for sharing this great article.

      Do you have any blog post to explain how to delete a Custom Field ? I'm facing an issue when trying to delete a test field that I added to a standard table and to a field catalog for BOP.

      It says that the field is in usage by a CDS view which is used by a field catalog for BOP. I already removed the field from the catalog but the error still persists and the CFL app doesn't allow me to delete it.

      I wonder if there's any step to be done for removing usages of the field and then to be able to delete the field?

       

      Thanks

      Flavio

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Flavio,

      it sounds bug so expected to be reported to customer Incident.

      regards, Masa

      Author's profile photo Uma Arjunan
      Uma Arjunan

      Hi Flavio ,

      Did you manage to delete the test field ? is there any that helped to solve the issue. we have also stuck with similar type of issue  , unable to remove the usages in the custom analytical reports before deleting . pl. suggest

      Author's profile photo Flavio de Souza
      Flavio de Souza

      Hi Uma,

      After a lot of work trying to convince the support about the issue, I got an OSS note to fix that problem. This is the instruction I got and it worked fine.

      apply the note 3004684 and regenerate the view.

      Also, make sure you deleted your field from any field catalogs and that you added your custom field to a package using the app "Register Extensions for Transport" before you try to delete it using the "custom fields and logic" app.

      I hope this helps.

      Regards,

      Flavio

      Author's profile photo Alejandro Kinsbrunner
      Alejandro Kinsbrunner

      Hi Masaaki

      Congratulatinos for such a well exaplined blog!

      I just wanted to see how would you handle a requirement which consisted to add a new custom field into Business Context "Sales: Sales Document" in order to use it on some forms but, alsi, it is required to be under the Business Context "Sales: Billing Document" in order to be used on some other forms.

      Is there any way to avoid getting the custom field duplicated? How could I handle this in order to re-use it on both parts?

      Thanks and regards.

      Alejandro.

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Alejandro,

      The idea coming to my mind is to add the field in the DB table and add it with CFL. in the way, the same value help view can be reused.

      Thanks, Masa

      Author's profile photo Yadunath Nambisan
      Yadunath Nambisan

      Hi,

       

      We migrated from ECC to S4HANA, Is there a simple way to add existing custom fields to fiori apps.

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Nambisan,

      Pls see the following links. they are all I can provide..

      https://blogs.sap.com/2020/09/24/analytics-on-universal-journal-the-heart-of-sap-s-4hana/#How%20to%20add%20fields%20to%20VDMs?

      https://ga.support.sap.com/dtp/viewer/#/tree/1910/actions/24709

      Thanks, Masa

       

      Author's profile photo Daouda Pouye
      Daouda Pouye

      Hello Masaaki ,

      Thank you for your very clear and explicit blog.

      I am extending a Fiori Manage Product Master Data application based on S/4HANA 1908. I have created my custom fields "ZZ1_" with the extensibility tool but I still see them in the dropdown list to finally be able to add them in the context.

      I'm stuck and don't know how to see them back up.

      Thank you in advance

      Author's profile photo Vijay Vikram
      Vijay Vikram

      Hello ,Masaaki,

       

      Nice Blog!. Understood the concept. But I have a question, is there a restriction the custom fields to add ?. Can you please provide a more insight ?.

       

      Thanks

      Vijay

       

       

      Author's profile photo Daouda Pouye
      Daouda Pouye

      Hello Masaaki,

      Thank you for your very clear and explicit blog.

      I am extending a Fiori Manage Product Master Data application based on S/4HANA 1908. I have created my custom fields "ZZ1_" with the extensibility tool but I still see them in the dropdown list to finally be able to add them in the context.

      I'm stuck and don't know how to see them back up.

      Thank you in advance

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Daouda,

      is your question to add the custom field in the standard fiori app? to do that, you need to check the source and if the source is cdsview (or using cdsview as data source reference in odata project with tcd SEGW), you need to add it with annotate view (metadata extension).

      Thanks, Masa

      Author's profile photo Daouda Pouye
      Daouda Pouye

      Hello Masaaki,
      Thank you for replying to my post.
      Yes, indeed my question is: How do I add custom fields in the Fiori Standard application?
      I give you more details below:
      1.  The data source is View CDS with ODATA Annotations.
      2.  First, I was able to add a tab in (Plant -> WorkSCheduling) with 2 custom fields without any problem.
      3.  I wanted to add a new tab ("COSTING") with 4 custom fields but this is a problem. I don't see a "COSTING" section and the fields I created in "CUSTOM FIELDS AND LOGIC" are not listed in the popup list.

      In your answer, you talk to me about metadata extension. Do you have a link to a Blog that explains this type of matadata extension?

      Thank you very much

      Below some screenshots.The%20fields%20I%20created%20did%20not%20go%20up%20in%20the%20list.And%20I%20can%20nott%20create%20a%20Section

      The fields I created did not go up in the list.And I can nott create a Section

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello,

      regarding MDE, I think Teacher google will answer like below.

      https://sapyard.com/vdm-3-s-4hana-embedded-analytics-using-cds-virtual-data-model-meta-data-extensionsmde/

      CFL is only for the data source, not frontend.

      Thanks, Masa

      Author's profile photo Daouda Pouye
      Daouda Pouye

      Thank you very much.
      I'm reviewing the blog about the Metadata extension but it turns out that the CDS view whose fields I wanted to add is not extensible.
      Thanks again

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Daouda,

      As far as I know, most CDS Views as the source of standard Fiori app has been set to be extensible. if your one is not, I think it might be the option to create the incident to request it.

      Thanks, Masa

      Author's profile photo Daouda Pouye
      Daouda Pouye
      Hello Maasaki,

      I finally found the solution.
      I have made
      - an extension of the "Base" CDS Interface View
      - an extension of the "Composite" CDS Interface View
      - An extension of the CDS Consumption View

      And finally it was necessary to make a metadata extension of the consumption view (It is the latter that feeds the OData service. That's what I hadn't done)

      Thank you very much for your help. Everything works well

      Author's profile photo Daouda Pouye
      Daouda Pouye

      Thank you very much.
      I'm reviewing the blog about the Metadata extension but it turns out that the CDS view whose fields I wanted to add is not extensible.
      Thanks again

      Author's profile photo Nil Peksen
      Nil Peksen

      Hello Masaaki,
      First, I’d like to thank you for your insightful blog post, great job 👏

      We have a requirement to add a custom field into Fiori App 'Display Line Items in General Ledger'. For that reason, we created a custom field in CFL with the relevant business context (FINS_JOURNAL_ENTRY_ITEM). I enabled and published it for 'UIs and Reports' (for CDS views) and  I can see that CDS view 'I_JournalEntryItemCube' is extended correctly. That means, I can see the custom field in ACDOCA and in the CDS view. But of course it is not filled.

      We want to write the value in BSEG-LZBKZ field (also in transaction FBL3N) into this new custom field. My question would be, where and how to write this logic..

      1.       I cannot see this new field in CFL under 'Data Source Extensions'.. Should we see it here in the field list and then map?

      2.       Where to include the logic of new field (again in CFL? Or in the CDS view?)

      Thanks,
      Nil

      Author's profile photo Amandeep Bal
      Amandeep Bal

      Hi Guys,

      Just for testing, I added a field to the "Master Data: Product General" and enabled the UI, but somehow it doesn't show up when I want to add it to the UI. what am i missing here?

      Thanks

      Aman

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Mandeep,

      sorry, what is the Fiori ID? Pls check whether or not the field is added in the source of the app.

      Thanks, Masa

      Author's profile photo Sean House
      Sean House

      Hi Masaaki, Amandeep and I work for the same firm and I also have the same issue so we felt there was merit in my replying.  I have created fields using the Customer Fields and Logic App and successfully added them to the Business Partner Core View.  I am attempting to add the fields to Fiori App "Manage Business Partner Master Data" (App ID F3163) and the custom fields do not show up in the Drop Down of Available fields to add. Not sure if this is a training issue and we are just missing a step.  BTW this is on a 1909 FP1 system.  Drop%20Down%20of%20Allowed%20Fields

      Drop Down of Allowed Fields

      Author's profile photo Amandeep Bal
      Amandeep Bal

      Hi Masaaki,

      The App ID F1602. Same issue what Sean mentioned. Not sure if we are missing something.

      Thanks

      Aman

      Author's profile photo Rafal Matuszewski
      Rafal Matuszewski

      Hello,

      have you checked if the field shows up today? 🙂

      If you did everything correct, the only one thing left to do could be FIORI buffers refresh. Buffers are cleared every 24h, so it is possible that your field is already on the list.

      There are a few programs you can execute to force clearing the FIORI cache, but I don't remember their names now.

      Author's profile photo Sean House
      Sean House

      That was it!  Just a buffer update issue.

       

      Author's profile photo anton kopylov
      anton kopylov

      Why SCFD_REGISTRY protected of customizations (Error: "Maintenance of Extensibility Registry not allowed in customer system"?
      I need enhance classical transaction. I have PBO and etc enhancement points. I could add field, but can't display it in classical transaction.
      Example context PRODUCT in GUI transaction MM02.

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      It is read only for customers.

      Author's profile photo Kalyan Dittakavi
      Kalyan Dittakavi

      Hi Masaaki

       

      Thanks for this excellent blog.

       

      I have a quick question. we have to add a Custom Field to Std SAP Delivered Fiori apps. I want this custom field as a part of Product Plant Business context and i want this custom field to added to Dead Inventory app.

      I selected  'Association to Business Object' ( attached a screenshot), and i see it got added to MARC. This is a Custom Field- ZZ1_CustomFld1.

      My question is 'How do we populate the data for  this custom field' ? where does the logic go. would it be a extension view based on I_PRODUCTPLANT or a ABAP program which would populate the data.

      Thanks again

       

      Kalyan

       

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Kalyan,

      Does the blog below help?

      https://blogs.sap.com/2017/09/18/media-product-master-in-sap-s4hana-example-for-creation-of-media-product-master-using-bapis/

      Thanks, Masa

      Author's profile photo Kalyan Dittakavi
      Kalyan Dittakavi

      Thanks Masa..

      Author's profile photo Jigang Zhang 张吉刚
      Jigang Zhang 张吉刚

      Thanks for sharing this

      Author's profile photo KathirvelKumar Parameswaran
      KathirvelKumar Parameswaran

      Hello Masa,

      We have added a custom tab at PO item level with handful of custom fields thru the CFL framework.

      When a particular line item is deleted, the custom fields are still editable. Is there a way to control this behavior similar to standard whereby the tab/fields would be disabled when a line is deleted.

      Thanks much.

      ~kathir

       

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Kathir,

      Sorry, I cannot help.

      it would be possible to add fields to FMs wil CFL as well. you can check it in SCFD_REGISTRY. there would be the cases in which BADI or Exit would be available. you may be able to find the info in SAP Note. asking via Incident would be the way.

      Thanks, Masa

      Author's profile photo rakesh baggam
      rakesh baggam

      Hello Masaaki,

      Its really nice blog.

      I tried this by adding additional field to "Manage Purchase Requisitions (F1048) app". Business context related to this app is "MM_PURREQN_ITEM (Procurement: Purchase Requisition Item)". I have added the custom fields to this business context. I am able to see the added field in F1048.

      Now I have added some logic in Custom Logic section for the business context in the BADI "MM_PUR_S4_PR_MODIFY_ITEM" to fill this added field with value.

      But I am not able to get the added field with value which i am passing in the BADI. I tried putting External debugger at BADI "MM_PUR_S4_PR_MODIFY_ITEM". But debugger is not stopping there.

       

      Can you help me what I am missing here? Our system is -  HANA ON Premise 1909 FPS02.

       

      Thanks in Advance.

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Rakesh,

      I have asked the responsible developers.

      In Professional PR (F2229), any custom field and value would be available in BADI: MM_PUR_S4_PR_MODIFY_ITEM.

      In Manage Purchase Requisition (F1048), the BADI is not triggered.

      Thanks, Masa

      Author's profile photo Srinath Velagala
      Srinath Velagala

      Hi Masaaki,

      I extended Manage Product Master Data Fiori app with 16 new custom fields added in MARC. All the fields get buffered/drafted well except for one field. When I try to update the below marked field, it throws me a dump in the backend. When debugged it I figured out only for this field the value is not getting buffered. Any idea why this is happening. Please advice. Thanks in advance.

       

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Srinath,

      Sorry, it seems bug, so pls create the customer incident.

      Thanks, Masa

      Author's profile photo Pablo Ghosh Roy
      Pablo Ghosh Roy

      Greetings Masa,

      I am trying to extend the Fiori App "Asset Transactions (F1614)" using the Custom Fields and Logic App.

      New%20Custom%20Field

      New Custom Field

      The Field has been enabled for the following service FAA_ASSET_TRANSACTIONS_SRV 0001

      FAA_ASSET_TRANSACTIONS_SRV%200001

      FAA_ASSET_TRANSACTIONS_SRV 0001

      The new field now appears on the APP (F1614) but has no data in it. Now I am trying to figure out where do I write the custom logic to populate the data for the new column that I have just added.( Basically a select statement to fetch data from table T095 using the Asset Number, Subnumber and Company Code).

      The BADI that is available FAA_CUSTOMER_FIELD_CONTROL is only for adjusting the field properties (i.e. Read Only, Mandatory or Invisible).

      Do I need to extend the CDS View C_FIXEDASSETTRANSACTION to populate the data for this new columns or is there a better way of achieving this functionality?

       

      Regards,

      Pablo Ghosh Roy

       

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi,

      I think extend view for C_FIXEDASSETTRANSACTION is needed instead of CFL if the filed value woudl not be updated.

      Thanks, Masa

      Author's profile photo Thorsten Kröpelin
      Thorsten Kröpelin

      Hello Masa,

      our partner added some custom fields to table mara with the "Custom fields and logic" technic.

      some fields are describe with a texttable ( like a domäne ) .

      Question : how can I get the describtion for a field-value from this texttable ?

       

      I try class : CL_TEXT_IDENTIFIER method GET_AVAILABLE_TEXTS . this returns all available text , but no key informations

      and  I try CL_TEXT_IDENTIFIER -> IF_TEXT_IDENTIFIER -> READ_TEXT returns "NO_TEXT" - failure

      any idea ? Thanks

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Thorsten,

      sorry, in the last of the blog, I have mentioned as below. could it help?

      • For the field type Text, master view cannot be associated to the custom field. For adding the field with associated custom master CDS View based on custom table, the field and the custom master view have to be added with Extend View manually.

      Thansk, Masa

      Author's profile photo Ashok Yesala
      Ashok Yesala

      Hi Masaaki,

      Thank you, it's nice blog.

      Need your suggestion on one of our requirement.

      In our requirement we have redefined standard OData service.

      In the standard service there is one entity which is created from "Map to datasource" to CDS view.

      As we know for this there exist mapping between the SADL and entity in the standard service.

      So what we did is we have extended the CDS view, but when we regenerate redefined odata service the mapping was not updated in the standard service, as we don't have mapping in redefined service.

      Is this a bug, which we need to raise to SAP or is there any solution to resolve from our side.

      Please suggest us.

      Thanks,

      Ashok

       

       

      Author's profile photo Shashi Ponaganti
      Shashi Ponaganti

      Hi Masaki,

      Thank you for wonderful blog and information.

      I Have one question regarding the custom field creation in SAP S4HANA 1909 Web Client UI (know as CRM Web UI). Can we also use the same tool to create a custom field in web ui and any other specific things to do.

      Since CRM is embedded in S4HANA and using the same database and data.

      Thank you in advance.

      Regards,

      SK

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Shashi,

      Which objects can be enahnced can be checked with Tcd SCFD_REGISTRY. it means, I think, it is normally not possible to enhance Web Client, although some SAPGUI transactions can be enhnaced (in Tcd SCFD_REGISTRY).

      Thanks, Masa

      Author's profile photo Leonardo Francisco
      Leonardo Francisco

      Dear Masaaki

      I create on Custom Analytical Query using Data Source Journal Entry Item - Cube (I_JOURNALENTRYITEMCUBE) but don´t appear Cost Center Group and Cost Element Group can you say for me if this solution of Adding Fiels can be done or have another solution?

      Best Regards

       

      Leonardo

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Leonardo,

      Cost Center hierarchy and (maybe) Cost Element hierarchy should be available in the consumption creating on top of I_JOURNALENTRYITEMCUBE).

      https://wiki.scn.sap.com/wiki/display/BI/Using+Hierarchy+in+CDS#UsingHierarchyinCDS-DefiningaHierarchy

      Thanks, Masa

      Author's profile photo Jules Cliff
      Jules Cliff

      Masaaki

      A very nice blog post that provides a look "behind the scenes" which is in particular important. It clarifies the benefits of "Custom Fields" and their usage.

      There is one question left:

      Is there a way to connect a "Custom Field", which is created manually with "Custom Field and Logic" successfully, with an related data table in abap to use the stored data as an input help?

      (An option would be to create  the "Custom Field" as a "CodeList" and add the input help manually. But this would result in a large maintenance effort for changes in the future.)

       

      Kind Regards & Thanks for helping

       

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Cliff,

      Good question. I think it would be more common request.

      But as far as I know, there would be no way.

      So, to add cusotm fields with value help, firstly, add the fields to the append structure to the table w/o CFL, and make it available for CFL with SCFD_EUI. in the transaction, as far as I remember, you can add the master view whose source is proposed in the tool.

      Thanks, Masa

      Author's profile photo Nijat Seydeliyev
      Nijat Seydeliyev

      Hí Masaaki

       

      I have question about adding custom field with selection logic to fiori app Manage Defects(F2649). But i can not see any Business Context to add field with CFL like in your blog. I checked SCFD_REGISTRY also . Is there any other way to add custom field this fiori app ?

      Regards,

      NS

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Nijat,

      out of the scope of CFL. the field has to be added to the OData.

      regards, Masa

      Author's profile photo Ashok Yesala
      Ashok Yesala

      Hi Masaaki

      Is it possible to add field as filter in the App (selection fields) using CFL which require association to other VDM.

      if not please suggest how the approach should be.

      Thanks,

      Ashok

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Ashok,

      No, CFL is for the datasource, not for frontend apps.

      how to add depends on the app type.

      this blog also says as below.

      How is a field added technically

      How to add fields in the UI depends on Fiori app type.

      For KPI app, the new app must be created (copy) to add the fields in the initial screen, but if you do not have to add in the initial screen but it is enough to make it possible to add the field manually after launching the app, you do not have to copy and create new one.

      For Fiori Design Studio app or Webdynpro Grid, the field is added automatically.

      For Fiori Elements Object page, you can use “Adapt UI” in Fiori launchpad.

      For other Fiori Elements app or Freestyle app, if the source is CDS View, you may be able to add with UI annotations by using it with Metadata Extension(for the CDS Views in which metadata extension is set to be allowed with “Metadata.allowExtensions”. But in some other cases, e.g. the source is OData Project (T-cd SEGW), it might be more complex.

      Thanks, Masa

       

      Author's profile photo Ashok Yesala
      Ashok Yesala

      Hi Masaaki,

      I didn't get 'not for frontend Apps'.

      So CFL is only to add a field which is isolated and can't be derived from associating with other view with standard interface view of source.

      Just curious to know if there is scenario to add additional selection fields to standard Fiori app and the consumption view of this doesn't have metadata extension true. how should be the approach apart from copy entire app.

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Ashok,

      which VDM are you dicussing? As far as I know, most consumption view has the annotation for metadata extension.

      With tcd /n/IWBEP/REG_SERVICE, you can change the class for odata in the technical service. it might help.

      regards, Masa

      Author's profile photo Ashok Yesala
      Ashok Yesala

      Hi Masaaki,

      For example : C_ObjPgTechnicalObject, which doesn't have metadata extension.

      We have a scenario to add selection fields and lineitems, which should be derived from other source using technical object and this requires association.

      These type of complex scenarios, I am not sure if CFL will be helpful.

      Please let me know if any reference.

      Thanks,

      Ashok

       

       

      Author's profile photo Ashok Yesala
      Ashok Yesala

      Hi Masaaki,

      VDM : C_ObjPgTechnicalObject which doesn't have metadata extension.

      we have a scenarios to add additional selection fields and lineitems from other interface view associating with interface view of source based on technical object.

      Please let me know if these type of scenarios can be possible with CFL.

      Please provide if any reference possible.

      Thanks,

      Ashok

      Author's profile photo MATIAS BACONSKY
      MATIAS BACONSKY

      Hi Masaaki! Thanks for the info! I have one question: I want to add a standard field that is not listed as a 'dimension' in the app Goods Movement Analysis, for example Delivery Note.Can I do achieve this with this app 'Custom Fields and Logic'? Or how can I do this? Thank you!

      Goods%20Movement%20Analysis

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Matias,

      Firstly, Multidimensional reporting is for aggregated data, so it doesnt make sense ti add long text field.

      I dont know much about delivery note field (which table, which field?), but it should be added to I_GoodsMovementCube  (Interface View) with Extend View (https://blogs.sap.com/2018/08/22/sample-custom-cds-view-using-predefined-virtual-data-model-and-extend-view-in-s4hana/) (better to add view E_* view for shortening activation time), and to consumption view on top.

      Thanks, Masa

      Author's profile photo Andrew Fordham
      Andrew Fordham

      Hi Masaaki,

      Great blog!

      I am trying to add fields to the C_BILLINGDOCUMENTITEM_F0797 CDS view for use in the Manage Billing Documents Fiori app.  In the Usage section of its registry entry, the "Is Invisible" box is checked.  When I go into the Custom Fields & Logic app, I am unable to see this CDS view listed anywhere in the custom fields that I have assigned to the "Sales: Billing Document" Business Context, so I cannot enable these fields.

      Does the Invisible checkbox mean that custom fields are automatically published to this CDS view?  When I debug the OData/SADL call from the Fiori app, the custom fields I have added to the _Extension are not getting retrieved from the database.

      Thanks,

      Andrew

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Andrew,

      I have received the answer from the responsible developer.

      There should be fields added to Manage Billing Documents Fiori app. If you search for this title in SCFD_REGISTRY, you will find the following OData model:

      SD_CUSTOMER_INVOICES_MANAGE 0001

      If you now check the details of this OData model (support of custom field tab), you will recognize that the CDS view C_BILLINGDOCUMENTITEM_F0797 is used within the OData entity implementation:

       

      So in order to extend the CDS view C_BILLINGDOCUMENTITEM_F0797 you just need to enable the usage Manage Billing Documents in your custom field. Depending on the business context for which the custom field was created, either the CDS view C_BILLINGDOCUMENTITEM_F0797 or C_BILLINGDOCUMENT_F0797 will be extended. As this CDS view is only used within the OData service, it is registered as Is invisible. Otherwise it would appear twice and only confuse users…

       

      Thanks, Masa

      Author's profile photo Andrew Fordham
      Andrew Fordham

      Thanks, Masa.  That's fixed it!

      Andrew

      Author's profile photo Cliff Candelaria
      Cliff Candelaria

      Hi Masa,

      Greatly appreciate your blog and worked as describe.

      We have a scenario wherein we need to redefine a ODATA source for app Manage purchase requisition - F2229 (for validation and other purpose).

      Now when we reload the app, the previously added fields in the app screen (from CFL) has gone missing. Noticed when we roll back the redefinition, fields shows as normal.

      Is there a setting during ODATA redefinition or after needs to be done? (MM_PUR_PR_PROFNL_MAINTAIN)

       

      BR,

      Cliff

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hello Cliff,

      Hum.. only you have to do is to regenerate the odata service. And pls check if the field is added in the metadata of the odata with tcd SEGW odata test.

      regards, Masa

      Author's profile photo Cliff Candelaria
      Cliff Candelaria

      Thanks for your response Masa. The custom field was added in the redefined service however it is not showing in the screen where it was previously added.

      And when I add Z* field through CFL app for the same business context, it is not showing in the picklist at all.

      Author's profile photo Rafael Razzolini
      Rafael Razzolini

      Hi Masa,

      How do we publish and use a custom field in Create Material (MM01) WebGui application?

      I've created another custom field related to purchase orders and it works because the UIs & reports tab have the Create Purchase Order - Advanced option to activate.

      Please advise.

      Best Regards

      Author's profile photo Masaaki Arai
      Masaaki Arai
      Blog Post Author

      Hi Rafael,

      in some gui screen, the cfl is available, but otherwise, it has to be added as ecc.

      thanks, Masa