In this exercise, you will add an ABAP CDS metadata extension for the projection view of the Travel entity. You can put all the UI relevant annotations in it.
Prerequisites
You have completed the exercise Publish the OData V4 Service in the unit Getting an Overview of ABAP RESTful Application Programming Model (lesson: Creating an OData V4 Service).
Watch the Simulation and Perform the Steps
This exercise contains a simulation that takes you through detailed steps. You can find all the steps after the simulation. You can follow the simulation and perform the steps using your own trial account.
Steps
You have the OData service package that you generated previously opened in ADT.
Expand Core Data Services within ZFE_TRAVEL_######, where ZFE_TRAVEL_###### is the unique ID of your package.
Select and expand Data Definitions. You can see the three projection views for which you can create UI annotations.
Double-click ZC_FE_TRAVEL_###### from Data Definitions. The projection view for the Travel entity opens.
Create a metadata extension for the Travel entity.
Select and right-click ZC_FE_TRAVEL_###### .
Choose New Metadata Extension. The New Metadata Extension dialog opens.
Ensure that the name of the metadata extension is entered as ZC_FE_TRAVEL_###### .
Enter the description as UI annotations for the Travel entity.
Select Next. The Select Transport Request opens.
Select Next again. The Templates are displayed.
Select Finish. You can see that a metadata extension has been generated. The annotation ZC_FE_TRAVEL_###### is your projection view. You can add all the UI relevant annotations for the Travel entity into this file.
Press CONTROL + SPACE. From the subsequent dropdown, select #CORE(annotation). You have selected #CORE as the value for the @Metadata.layer.
Expand Metadata Extensions. You can see the newly created metadata ZC_FE_TRAVEL_###### extension in the Metadata Extension folder.
Result
You successfully created an ABAP CDS metadata extension for ZC_FE_TRAVEL_###### ABAP CDS projection view. In the upcoming exercises, you will add all the UI relevant annotations for the Travel entity into this file.