HOW TO ADD NEW INPUT FIELD IN STANDARD FIORI APPLICATION BY EXTENDING STANDARD CDS.

Estimated read time 4 min read

Objective:

Despite limitations in directly modifying custom fields or logic, our goal is to enhance the “Task Definition” application by incorporating new input fields below the priority field. Our objective remains to ensure that user inputs are seamlessly reflected both in the front end and back end of the application.

 

 

Step-by-Step Guide:

Identify Standard CDS View:

Begin by identifying the standard CDS view utilized by the Task Definition application. This can typically be found by inspecting the application’s metadata call.

 

 

RIGHT CLICK THE APP -> INSPECTION -> NETWORK -> RELOAD THE APP -> FIND THE METADATA CALL.

 

Open Standard CDS View:

Access the identified standard CDS view (C_EHSSimpleTaskDefinitionType) in your development environment, such as Eclipse or Visual Studio Code.

 

Exploring Standard CDS View:

Exploring the main CDS view, as you can see the code it was using another CDS, “I_EHSTASKDEFINITIONTP.” Navigate to that CDS. You can navigate by right-clicking on the CDS and navigating to Target.

 

Finding the extension point:

While viewing the “I_EHSTASKDEFINTIONTP CDS, you could find an extension keyword . Use this CDS for extension purposes.

 

Adding a field to the standard structure of the table:

We found out the extension point. Though we are using the input field on the front end, we need to add fields in the standard table structure, So that value entered in front end will automatically reflect back to the table as well. In this Application “EHFNDD_TDEF_ROOTtable is used.

 

 

 

We have successfully added ZHAZARD and ZTASK fields to the structure.

Extending Standard CDS:

C_EHSSimpleTaskDefinitionType > I_EHSTaskDefinition_TP > E_EHSTaskDefinition

 

 

 

You need to extend all the CDS.

First, we need to extend the E_EHSTaskDefinition CDS.

To extend CDS

 

 

 

This is the extended view.

 

Then we need to extend CDS I_EHSTaskDefinitionTP

Use the same procedure to extend.

 

We need to extend the main C_EHSSimpleTaskDefinitionType CDS as well.

After extending CDS, we need to add UI annotations to the fields we added.

 

After writing all the UI annotations for our fields, you can see the fields in the application.

 

We have successfully added fields to the Task Processing Application.

As you can see below value entered in the fronted was updated in the back end as well

 

 

 

 

​ Objective:Despite limitations in directly modifying custom fields or logic, our goal is to enhance the “Task Definition” application by incorporating new input fields below the priority field. Our objective remains to ensure that user inputs are seamlessly reflected both in the front end and back end of the application.  Step-by-Step Guide:Identify Standard CDS View:Begin by identifying the standard CDS view utilized by the Task Definition application. This can typically be found by inspecting the application’s metadata call.  RIGHT CLICK THE APP -> INSPECTION -> NETWORK -> RELOAD THE APP -> FIND THE METADATA CALL. Open Standard CDS View:Access the identified standard CDS view (C_EHSSimpleTaskDefinitionType) in your development environment, such as Eclipse or Visual Studio Code. Exploring Standard CDS View:Exploring the main CDS view, as you can see the code it was using another CDS, “I_EHSTASKDEFINITIONTP.” Navigate to that CDS. You can navigate by right-clicking on the CDS and navigating to Target. Finding the extension point:While viewing the “I_EHSTASKDEFINTIONTP” CDS, you could find an extension keyword . Use this CDS for extension purposes. Adding a field to the standard structure of the table:We found out the extension point. Though we are using the input field on the front end, we need to add fields in the standard table structure, So that value entered in front end will automatically reflect back to the table as well. In this Application “EHFNDD_TDEF_ROOT” table is used.   We have successfully added ZHAZARD and ZTASK fields to the structure.Extending Standard CDS:C_EHSSimpleTaskDefinitionType > I_EHSTaskDefinition_TP > E_EHSTaskDefinition   You need to extend all the CDS.First, we need to extend the E_EHSTaskDefinition CDS.To extend CDS   This is the extended view. Then we need to extend CDS I_EHSTaskDefinitionTPUse the same procedure to extend. We need to extend the main C_EHSSimpleTaskDefinitionType CDS as well.After extending CDS, we need to add UI annotations to the fields we added. After writing all the UI annotations for our fields, you can see the fields in the application. We have successfully added fields to the Task Processing Application.As you can see below value entered in the fronted was updated in the back end as well      Read More Application Development Blog Posts articles 

#SAP

You May Also Like

More From Author

+ There are no comments

Add yours