Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
pavithrasathish
Discoverer
0 Kudos

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.

pavithrasathish_0-1711759439296.png

 

pavithrasathish_1-1711759439298.png

 

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.

pavithrasathish_2-1711759439310.png

 

Open Standard CDS View:

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

pavithrasathish_3-1711759439322.png

 


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.

pavithrasathish_4-1711759439330.png

 

Finding the extension point:

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

pavithrasathish_5-1711759439336.png

 

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.

pavithrasathish_6-1711759439343.png

 

pavithrasathish_7-1711759439346.png

 

pavithrasathish_8-1711759439350.png

 

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

Extending Standard CDS:

C_EHSSimpleTaskDefinitionType > I_EHSTaskDefinition_TP > E_EHSTaskDefinition

pavithrasathish_9-1711759439357.png

 

pavithrasathish_10-1711759439363.png

 

pavithrasathish_11-1711759439366.png

 



You need to extend all the CDS.

  1. First, we need to extend the E_EHSTaskDefinition CDS.

To extend CDS

pavithrasathish_12-1711759439374.png

 

pavithrasathish_13-1711759439376.png

 

pavithrasathish_14-1711759439381.png

 

This is the extended view.

pavithrasathish_15-1711759439383.png

 

  1. Then we need to extend CDS I_EHSTaskDefinitionTP

Use the same procedure to extend.

pavithrasathish_16-1711759439384.png

 

  1. 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.

pavithrasathish_17-1711759439389.png

 

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

pavithrasathish_18-1711759439395.png

 

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

pavithrasathish_19-1711759439400.png