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,255

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

mwn
Participant
0 Kudos
8,707

The wizard did most of the work, as all good wizards should!

I removed some of the generated filters, and added the search for description, and here's the result:

mwn_1-1724250623163.png

 

 

 

sheenamk
Developer Advocate
Developer Advocate
0 Kudos
8,631

Hi @mwn 

  Thanks for the response. Could you please search without a (*), may be with a specific value?

8,607

Whoops,  I forgot the fuzziness annotation! 
The latest screen shot should have fixed that.

sheenamk
Developer Advocate
Developer Advocate
0 Kudos
7,956

Thanks...please also show the value of 'Status' field search in screenshot 

0 Kudos
7,605

Despite following the YouTube video I still can't get a useful value help! It either has just "contains" or a list which doesn't get returned to the filter field.

0 Kudos
2,093

Hi,

My Solution:

Nandhini_Thanikachalam_0-1725451142401.png

 

Thanks,

Nandhini Thanikachalam.

BH2408
Active Contributor
8,626

Hi Team, 

Greetings!!!!

Here is the screen shot for today's challenge. 

1. Create the MDE for all annotations

2. Added the Search and Fuzzy Search value in MDE for Description 

BH2408_0-1724250252484.png

Please review. 

 

Thanks and Regards,

Bharani 

8,428
  1. Preview the App showing all the columns, search and filter options in the CDS view entity.Sivaiah_Bhiragani_0-1724257433826.png
  2. Search records based on a specific value from 'Description' field, and apply a filter on 'Status'.Sivaiah_Bhiragani_1-1724257592558.png

     

    Sivaiah_Bhiragani_2-1724257668787.png

     

abaprules
Explorer

sheenamk
Developer Advocate
Developer Advocate
0 Kudos
7,952

hi,

  Thanks for the response. Please provide a screenshot after adding a value help for Status field and also by searching without a '*' .

0 Kudos
4,331

I added also the status value help.

abaprules_0-1724835336695.png

 

tim_matsypura
Product and Topic Expert
Product and Topic Expert

Sandra_Solis
Participant

0 Kudos
7,945

hi,

  Thanks for the response. Please provide a screenshot after adding a value help for Status field and also by searching without a '*' .

pankajgupta1992
Explorer
8,253

Hi Team,

Let's go!!

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

pankajgupta1992_0-1724265483774.png

2. Search records based on a specific value from 'Description' field, and apply a filter on 'Status'.

pankajgupta1992_1-1724265694068.png

Thanks & regards,

Pankaj Gupta

 

0 Kudos
7,941

hi,

  Thanks for the response. Please search without a '*' .

Silvi_
Explorer
8,211

Hello,

My solution to task 3:
1. General preview

Silvi__0-1724269961742.png

2. Preview based on the search field

Silvi__1-1724270005112.png

3. Preview from filtering 'StatusText' field based on OverallStatus text.

Silvi__2-1724270158901.pngSilvi__3-1724270175200.png

Thank you!😊

mwn
Participant
0 Kudos
8,207

Out of curiosity, what fuzziness value are people using?

AVG
Participant

Shilpa_Shankar
Developer Advocate
Developer Advocate
0 Kudos
6,727

Hi @AVG ,

Thanks for the submission. For better readability you can filter out on the Status Text instead of the Status Code.

Regards,

Shilpa

SachinArtani
Active Participant

ayyappa_koneti90
Discoverer
7,710

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

ayyappa_koneti90_0-1724319021145.png

 

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

ayyappa_koneti90_1-1724319086521.png

 

rajesh_munusamy
Explorer
7,687

Done!! 

1. General Preview 

rajesh_munusamy_1-1724320806770.png

2.Dispaly data based on filter 

rajesh_munusamy_2-1724320888260.png

 

0 Kudos
5,341

Hii,

  Thanks for the submission. For better readability you can filter out on the Status Text instead of the Status Code.

d_orozco
Discoverer
7,661

My solution:

  • All the findings:

d_orozco_1-1724322270599.png

  • Search by Description & Status:

d_orozco_2-1724322353042.png

 

 

 

sheenamk
Developer Advocate
Developer Advocate
0 Kudos
5,341

Hi,

  Thanks for the submission. Please search without a '*'.

gphadnis2000
Participant
0 Kudos
7,670

Here is my submission.

gphadnis2000_0-1724322479948.png

 

0 Kudos
6,752

Hi Gaurav,

Thanks for the submission. Could you add search field and enable Description to be searched.

azaharescu
Explorer
7,635

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

 

 

azaharescu_0-1724324811182.png

 

Search records based on a specific value from 'Description' field, and apply a filter on 'Status'.

  • Open Filter

 

azaharescu_1-1724324811184.png

  • Accepted Filter

 

azaharescu_2-1724324811185.png

 

Aslam2
Explorer
7,624

Hi, 

All Fields are displayed in Fiori App with " Search field"  "Description" "Travel id" and "Overall status Text" fields.

Aslam2_0-1724325282766.png

Aslam2_1-1724325468203.png

 

Aslam2_2-1724325497187.png

Value help for Overall status field.

Aslam2_3-1724325570053.png

Kindly review and let me know if any modifications are required.

Thanks.

 

 

LF98
Discoverer
7,577

Task 3:

1. Generell Preview

LF98_0-1724327492693.png

2. Display Data based on filter

LF98_1-1724327618732.png

 

7,529

Preview of the App showing all the columns, search and filter options and value help in the CDS view entity:

Chandana_Pamarthi_0-1724329112917.png

Regards,
Chandana.

 

0 Kudos
6,769

Hi @Chandana_Pamarthi ,

Thanks for the submission. For better readability you can filter out on the Status Text instead of the Status Code.

Regards,

Shilpa