Application Development and Automation 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: 
Read only

Task 3 - Enhancing CDS View Entities with Annotations

sheenamk
Developer Advocate
Developer Advocate
61,413

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
Read only

mwn
Participant
0 Likes
19,035

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

 

 

 

Read only

sheenamk
Developer Advocate
Developer Advocate
0 Likes
18,959

Hi @mwn 

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

Read only

18,935

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

Read only

sheenamk
Developer Advocate
Developer Advocate
0 Likes
18,284

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

Read only

0 Likes
17,933

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.

Read only

0 Likes
12,421

Hi,

My Solution:

Nandhini_Thanikachalam_0-1725451142401.png

 

Thanks,

Nandhini Thanikachalam.

Read only

BH2408
Active Contributor
18,954

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 

Read only

Sivaiah_Bhiragani
Participant
18,756
  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

     

Read only

abaprules
Explorer
Read only

sheenamk
Developer Advocate
Developer Advocate
0 Likes
18,280

hi,

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

Read only

0 Likes
14,659

I added also the status value help.

abaprules_0-1724835336695.png

 

Read only

tim_matsypura
Product and Topic Expert
Product and Topic Expert
Read only

Sandra_Solis
SAP Champion
SAP Champion
0 Likes
18,659

Done 🥳🥳🥳

Sandra_Solis_0-1724263172857.png

 

Sandra_Solis_1-1724263417510.png

Sandra_Solis_1-1724479938084.png

 

Read only

0 Likes
18,273

hi,

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

Read only

Read only

pankajgupta1992
Explorer
18,581

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

 

Read only

0 Likes
18,269

hi,

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

Read only

Silvi_
Explorer
18,539

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!😊

Read only

mwn
Participant
0 Likes
18,535

Out of curiosity, what fuzziness value are people using?

Read only

AVG
Participant
Read only

Shilpa_Shankar
Developer Advocate
Developer Advocate
0 Likes
17,055

Hi @AVG ,

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

Regards,

Shilpa

Read only

Read only

SachinArtani
Active Participant
Read only

ayyappa_koneti90
Discoverer
18,038

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

 

Read only

rajesh_munusamy
Participant
18,015

Done!! 

1. General Preview 

rajesh_munusamy_1-1724320806770.png

2.Dispaly data based on filter 

rajesh_munusamy_2-1724320888260.png

 

Read only

0 Likes
15,669

Hii,

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

Read only

d_orozco
Explorer
17,989

My solution:

  • All the findings:

d_orozco_1-1724322270599.png

  • Search by Description & Status:

d_orozco_2-1724322353042.png

 

 

 

Read only

sheenamk
Developer Advocate
Developer Advocate
0 Likes
15,669

Hi,

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

Read only

gphadnis2000
Participant
Read only

0 Likes
17,080

Hi Gaurav,

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

Read only

Read only

azaharescu70
Explorer
17,963

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

 

Read only

Aslam2
Explorer
17,952

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.

 

 

Read only

LF98
Discoverer
17,905

Task 3:

1. Generell Preview

LF98_0-1724327492693.png

2. Display Data based on filter

LF98_1-1724327618732.png

 

Read only

17,857

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.

 

Read only

0 Likes
17,097

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