Enterprise Resource Planning Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Masaaki
Product and Topic Expert
Product and Topic Expert
332,193

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 a.business_context, a.persistence_include, b.tabname
FROM cfd_w_bus_ctxt AS a
JOIN dd03l AS b
ON a.persistence_include = b.precfield
JOIN dd02l as c
ON b.tabname = c.tabname
WHERE b.precfield LIKE '%_EEW_%'
AND c.tabclass = 'TRANSP'
AND c.APPLCLASS <> ''
ORDER BY 1, 2, 3

(This SELECT Statement was proposed by an expert (Daniel) who advised in the comment.

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.

For most types, conversion routine is not included in the added custom fields, e.g. ALPHA conversion routine. If you use the field type “Code List based on CDS View” the key fields including their data element properties are derived from a specified CDS view. This would however require a CDS view. The other way is to add fields with Tcd SCFD_EUI.

 


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 and Fiori element apps. In Webdynpro Data Grid and Fiori Design Studio, the field is added automatically in as free column,

 

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 ++++) 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 with BW-MT.

    • You can run Metadata Extension Tool in Customizing:Tcd SPRO > Controlling>General Controlling>Planning>Setup for Planning>Enhance InfoProvider with Additional Fields.

    • Alternatively, VDMs corresponding to BPC Optimized for S/4HANA contents could be used sepecially for the cases BPC Optimized function (Planning) is not used. See more in this section of the blog.



  • To add the fields added to the master data also to the app, firstly, enable usage to the master data in UIs and Reports tab and then go to Data Source Extensions tab and add the field to teh app.

    • e.g. Firstly, add a custom field (XYZ) to the business context Cost Center Master Data, and add (push Enablee Usage) XYZ to Data Source "Cost Center" (I_CostCenter).
      Next, go to Data Source Extensions tab and select "G/L Account Balance - Cube " (I_GLACCTBALANCECUBE) and you can find XYZ under "Cost Center" in the left side, and you can add it to the data source.
      Finally, go back to the initial screen of the Data Source Extensions and select "Trial Balance". you can find XYZ in the left side, which you can add.




Hope you enjoy more and more standard Fiori apps by adding important fields with Custom Fields and Logic!
139 Comments
Amandeep
Participant
0 Kudos
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
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
Sean_House
Explorer
0 Kudos

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 Down of Allowed Fields











Amandeep
Participant
0 Kudos
Hi Masaaki,

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

Thanks

Aman
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.
Sean_House
Explorer
That was it!  Just a buffer update issue.

 
anton_kopylov
Explorer
0 Kudos
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.
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
It is read only for customers.
ditt_kalyan
Explorer
0 Kudos

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

 

Masaaki
Product and Topic Expert
Product and Topic Expert
ditt_kalyan
Explorer
0 Kudos
Thanks Masa..
Jigang_Zhang
Active Contributor
0 Kudos
Thanks for sharing this
kathirvelkumar
Discoverer
0 Kudos
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

 
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
0 Kudos
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.
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
SrinathVelagala
Participant
0 Kudos

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.

 

Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Srinath,

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

Thanks, Masa
0 Kudos
Greetings Masa,

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


New Custom Field


The Field has been enabled for the following service FAA_ASSET_TRANSACTIONS_SRV 0001


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

 

UmaArjunan
Active Participant
0 Kudos
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
fsouza
Explorer
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
thorsten_krpelin
Explorer
0 Kudos
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
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi,

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

Thanks, Masa
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
ashokyesala
Explorer
0 Kudos
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

 

 
0 Kudos
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
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
0 Kudos
Dear masaaki.arai

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
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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-DefiningaHierarc...

Thanks, Masa
0 Kudos

masaaki.arai

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

 

Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
0 Kudos

Hí masaaki.arai

 

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

Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello Nijat,

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

regards, Masa
ashokyesala
Explorer
0 Kudos
Hi masaaki.arai

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
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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

 
mbaconsky
Explorer
0 Kudos

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!


Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
ashokyesala
Explorer
0 Kudos
Hi masaaki.arai,

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.
afordham
Participant
0 Kudos
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
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
Masaaki
Product and Topic Expert
Product and Topic Expert
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
afordham
Participant
Thanks, Masa.  That's fixed it!

Andrew
ashokyesala
Explorer
0 Kudos
Hi masaaki.arai,

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

 

 
ashokyesala
Explorer
0 Kudos
Hi masaaki.arai,

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
former_member761693
Discoverer
0 Kudos
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
0 Kudos
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
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Rafael,

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

thanks, Masa
Masaaki
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
former_member761693
Discoverer
0 Kudos
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.
0 Kudos
Hi Masaaki,

I have added a field in sales order header using CFL and controlling the visibility of that field using a badi in custom logic section.

The new fields is added in a new tab called Custom Fields. I am making that field visible for only an order type and for others it will be invisible. This is working as expected.

The only problem is for the other order type, as the field is invisible, the tab is appearing as a blank tab. In such scenario, how can i hide the tab. Please suggest.

 

Regards,

Arnab.