Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Task 3 - Enhancing CDS View Entities with Annotations

sheenamk
Developer Advocate
Developer Advocate
20,165

Another Wednesday and we are back with Task 3 of the August Developer Challenge on ABAP Core Data Services. We are thrilled to see the amazing response to Task 1 and Task 2. Whoever missed it can find all the information in our blogpost August Developer Challenge.

Today for Task 3 we decided to take you all through one of the interesting and widely used feature of ABAP Core Data Services – Annotations.

Annotations allow you to add domain-specific metadata and text labels to CDS objects that goes beyond the syntax features of ABAP SQL. This means that it enhances the technical properties of CDS view entities such as adding search , capabilities or controlling access to your data. To know more about Annotations watch the SAP TechByte on Annotations or go through the CDS Annotation Help Documentation

Task 3 – In this task we will add annotations to the CDS View Entity created in Task1 and then create a Fiori app to view the results.

  1. Add annotations to display all the fields in the Fiori app by default.
  2. Add annotations to provide a search field and enable search by ‘Description’ in the filter bar.
  3. Add annotations to provide a value help filter on the ‘Status text’ field based on Overall Status text.
  4. Add annotations to provide a filter for the Travel ID field.
  5. Create a Service Definition
  6. Create a Service Binding to preview the Fiori app.  

Follow the instructions carefully and share with us the screenshots of the items mentioned in the ‘Validation’ section of this discussion.

Please use this separate thread to ask your questions and discuss issues.

Validation :-

Note:- Please do not search with '*'

Please share screenshots after performing the following :

  1. Preview the App showing all the columns, search and filter options in the CDS view entity.
  2. Search records based on a specific value from 'Description' field and select an available value from the 'Status' field.

We are eagerly waiting to see your submissions. Enjoy!!

196 REPLIES 196

SebSchlegel
Explorer
3,474

My solution for week 3 😊

SebSchlegel_0-1724418105638.png

With the active filter:

SebSchlegel_1-1724418147789.png

Kind regards

Sebastian

OanaVladescu
Explorer
3,417

Hello,

Here is my solution for Task 3 🎉:

  1. Preview the App showing all the columns, search and filter options in the CDS view entity:OanaVladescu_4-1724427107762.png
  2. Search records based on a specific value from 'Description' field and select an available value from the 'Status' field:OanaVladescu_5-1724427387434.png

     

Thank you! 😊

 

 

Eyis
Explorer
3,197

Hello,

Task 3 - 

Preview the App showing all the columns, search and filter options in the CDS view entity.

Eyis_0-1724466109662.png

Search records based on a specific value from 'Description' field and select an available value from the 'Status' field.

Eyis_1-1724466208239.png

Thanks,

Eris

 

jonwalnikhilesh
Participant
3,241

Below is the solution for 3rd week 

Preview the App showing all the columns, search and filter.CDS 3rd week1.png

Search  based on user text from 'Description' field.

CDS 3rd week2.png

Search  based on user text and status filter

CDS 3rd week3.png

Thanks

Nik

0 Kudos
2,642

Hi @jonwalnikhilesh ,

Thanks for the submission. For better readability use the annotation to display the text.

3,389

Completed!

Application Preview

govendan_annadurai_0-1724475626233.png

Fuzzy Search

govendan_annadurai_1-1724475653567.png

Filter

govendan_annadurai_2-1724475693669.png

 

jakub_plocki
Explorer
3,219

Hello team,

this is my submission for this task:

jakub_plocki_0-1724497222722.png

jakub_plocki_1-1724497258229.png

 

 

Sayontan_Das
Participant
3,150

Hi @sheenamk ,

Task-3 is done. Please find the below details of the task3 validation

  1. Preview the App showing all the columns, search and filter options in the CDS view entity.

Sayontan_Das_0-1724502049420.png

  1. Search records based on a specific value from 'Description' field and select an available value from the 'Status' field.

A. Only with Description field search

Sayontan_Das_1-1724502126928.png

B. Both Description field search and value help filter of status

Sayontan_Das_2-1724502183732.png

 

 

Mohammed_Nabeel
Explorer
0 Kudos
3,092

1. Add annotations to display all the fields in the Fiori app by default.

Mohammed_Nabeel_0-1724517308978.png

2. Add annotations to provide a search field and enable search by ‘Description’ in the filter bar.

Mohammed_Nabeel_1-1724517410898.png

3. Add annotations to provide a value help filter on the ‘Status text’ field based on Overall Status text.

Mohammed_Nabeel_2-1724517548233.png

4. Add annotations to provide a filter for the Travel ID field

Mohammed_Nabeel_3-1724517658677.png

 

0 Kudos
2,719

Hi @Mohammed_Nabeel ,

Thanks for the submission. kindly add Search field and search with a description. 

0 Kudos
2,641

Hi @Shilpa_Shankar ,

Please review the below screenshot for search field and search with description.

Mohammed_Nabeel_0-1724677646044.png

Thank you for pointing out the missed screenshot. Your keen observation is much appreciated.

Regards,

 

Vara_reddy
Explorer
3,107

Task 3 Details:

  1. Preview the App showing all the columns, search and filter options in the CDS view entity.

Vara_reddy_0-1724519475869.png

 

2. Search records based on a specific value from 'Description' field and select an available value from the 'Status' field.

Vara_reddy_1-1724519566094.png

 

SubaR
Explorer
3,098

Hi ,

Here are the screenshots for the task 3.

SubaR_1-1724519398156.png

SubaR_2-1724521065491.png

 

 

RakeshDevani
Explorer

styles
Participant
2,969

Vanakam, Developer Advocates!

Here is the preview of my application

1.Preview the App showing all the columns, search and filter options in the CDS view entity.
image.png2.Search records based on a specific value from 'Description' field and select an available value from the 'Status' field
a.Search and Status Value HelpSearch & FilteringSearch & Filtering
b.Result of Search and Filtering
Search: "Business Trip", Status: "Accepted"

image.png

 

Warm Regards
Surya L

"Programming is not about what you know, it is about what you can solve"

Ruthiel
Product and Topic Expert
Product and Topic Expert

MatLakaemper
Participant
2,968

Here my Submission:

kind Regards, Matthias Lakämper

MatLakaemper_0-1724586468986.png

MatLakaemper_1-1724586489938.png

 

 

 

ganeshprasadj34
Explorer
2,965

All the fields

ganeshprasadj34_0-1724590469713.png

Search records based on a specific value from 'Description' field

ganeshprasadj34_1-1724590508744.png

 Select an available value from the 'Status' field.

ganeshprasadj34_2-1724590620442.pngganeshprasadj34_3-1724590628964.png

 

 

2,730

Hi @ganeshprasadj34 ,

Thanks for the submission. For better readability you can add the annotation where the status text will be displayed. Use @objectmodel.text.element

Prass
Explorer
2,951

Hi,

I was not able to log in with my previous instance which had till task 2. Hence created a new instance and new package. Please find my CDS preview below for task 3.Prass_0-1724604058600.png

 

Dani_
Explorer
2,940

Please find my submission below:

Dani__0-1724610673542.png

Dani__1-1724610710104.png

Dani__2-1724610778210.png

 

Thanks,
Daniel

 

 

 

Bharath369
Explorer
0 Kudos
2,914

Hi, I am getting the below error. I cleared the browing history, logged in incognito mode, tried with edge browser, I uninstalled and installed the eclipse but still the same. Any one faced this error?

login error.jpg

Thanks,

Bharath

2,888

Hello, 

Many we had the same issue, you need to delete the ABAP instance from your BTP trial account, then generate a new ABAP instance and create a new cloud project in eclipse. Unfortunately, if you don't have a backup from your components, you must create them again. 

Regards.

EnryIrala
Explorer
2,890

Hello, 

My submission.

1.- Preview the App showing all the columns, search and filter options in the CDS view entity.

EnryIrala_0-1724644208054.png

2.- Search records based on a specific value from 'Description' field and select an available value from the 'Status' field.

EnryIrala_1-1724644485556.png

Regards.

 

 

rvinod1982
Contributor
2,876

Hi All,

General Preview 

rvinod1982_1-1724647725967.png

Data display based on Search criteria and Overall Status Text Filter

rvinod1982_2-1724647814965.png

Regards,

Vinod Iyer

Ajay19
Explorer
2,853

Hi,

Below are my week 3 task screenshots

App with all fields

Ajay19_0-1724651241204.png

Screenshot with Search and Filter by Status

Ajay19_1-1724651415039.png

Thanks

Ajay

YasinKoseoglu
Participant
2,833

 

Done.

 

YasinKoseoglu_1-1724659345461.png

 

YasinKoseoglu_2-1724659401876.png

 

We are waiting next task 😉

UsamaKhan
Explorer
2,808

CB9980002351

Preview of all fields (excluding the currency code field and the total price field, as they have been concatenated into TotPriceCurr for status showing value and status text together in OverAll Status).

UsamaKhan_1-1724666456591.png

With filter:

UsamaKhan_0-1724666426396.png

Thanks and regards,

Usama Khan

 

aaruljothi
Participant
2,813

Hello,

Thank you for the week 3 exercise!! Below are the validation screenshots:

Full Data Preview:

aaruljothi_6-1724670389428.png

 

Data Preview with Filter on Travel ID:

aaruljothi_5-1724670362724.png

 

Date Preview with Filter on Description:

aaruljothi_4-1724670336121.png

 

Data Preview with Filter on Status:

aaruljothi_7-1724670483764.png

aaruljothi_3-1724670154318.png

 

 

 

0 Kudos
2,798

Hi @aaruljothi ,

Thanks for the submission. Kindly add a search field and search with a value from the description.

2,750

Hello @Shilpa_Shankar,

Thank you for noticing and alerting the unintentional miss. I have added the search field for description now. Below are the screenshots.

Full Data Preview:

aaruljothi_0-1724672711420.png

Data Preview with Search Field filter

aaruljothi_1-1724672769141.png

 

 

Momaharshi
Discoverer
2,800

Hi, Please find the screenshot for Task 3

Momaharshi_0-1724671189830.png

 

Momaharshi_1-1724671235342.pngMomaharshi_2-1724671280052.png

 

babu4abap
Explorer
2,737

Preview 

babu4abap_0-1724676078538.png

Filter on Description only

babu4abap_1-1724676132531.png

 

Description filter + Status filter

babu4abap_2-1724676166593.png

 

 

0 Kudos
2,306

Hi @babu4abap ,

Thanks for the submission. For better readability use Status text to be displayed.

Kartheek
Explorer
2,643

After many iterations!! Here is my Solution for the Task3.

1. Data Preview with all the columns.

Kartheek_0-1724683781649.png

2. search with "Description" and "status" field with filter.

Kartheek_1-1724683881802.pngKartheek_2-1724683917617.pngKartheek_3-1724683942895.png

Thank you.

AndreaUS
Product and Topic Expert
Product and Topic Expert

SROUT
Discoverer
2,652

Hi
here is task 3 challenge

SROUT_0-1724685722901.png

After search and filter

SROUT_1-1724685776118.png