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 2 - CDS View Entity Associations ( August Developer Challenge )

Shilpa_Shankar
Developer Advocate
Developer Advocate
20,553

Thanks for the enormous response and showing great enthusiasm in Task 1. Let’s continue the ABAP Developer Challenge by enhancing the CDS view entity.

Task 2 - In this task, we will explore some basic SQL function, CDS Associations and use it to enhance the CDS View entity that is created in Task 1.

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.

Here you go:

  1. Create a new field in the CDS view entity created in task 1 and use String function to concatenate Total_Price and Currency_Code.
    1. https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_sql_functions_char... 
  2. Since we have Status field in the CDS view entity, let us create an association with /DMO/I_Overall_Status_VH to fetch the corresponding Text field.
    1. https://help.sap.com/docs/abap-cloud/abap-data-models/cds-associations?locale=en-US&version=s4_hana
  3. Expose the Text field from the association and give a name to the newly created field. This should return the text value of the Status (Overall Status Text)

Note: For those who do not have data in the status text table, try running the data generator class /dmo/cl_flight_data_generator. This should load that table with initial data. 

Validation: Share a screenshot of the following items as a reply to this thread to gain credits:

  1. Data Preview of the CDS View Entity which contains,
    1. 1 new field with concatenated value of Total_Price and Currency_Code.
    2. 1 new field with Overall Status Text

Note: Do not post the screenshot of the CDS view entity. Just Data preview is sufficient.

Enjoy until we are back with the next task!

187 REPLIES 187

Tharun_Kumar_M
Explorer
3,217

Hi, Task 2 completed.

Tharun_Kumar_M_0-1723814469613.png

Waiting for Task 3.

VinodhBabu
Newcomer
3,218

Data preview of CDS view Entity with Status Description and Total Value with currency.

VinodhBabu_0-1723814988998.png

Thanks

Vinodh

RonyPhilip
Discoverer
3,218

Hi,

Data Preview of the CDS View Entity with the 2 additional fields:

Capture2.PNG

mtunc
Explorer
3,219

Hi,
here is my data preview for task 2 (new columns: totalprice_curr, overall_status_text)

task2.png

Laco
Explorer

Henning_T
Explorer

dla3076
Explorer
3,155
 

Prass
Explorer
3,145

Please find the below solution:

Task_2_code.PNG

Task_2_preview.PNG

Eyis
Explorer
3,126

Task 2: CDS View - Data Preview

Eyis_0-1723869086831.png

 

MinhNguyenABVN
Explorer

Bhumika_K
Associate
Associate
2,949

Hello
Please find Data Preview of the CDS View Entity with new columns: PriceWithCurrency, StatusText

Task-2.png

 

MatLakaemper
Participant
2,926

Here my submission,

kind Regards,
Matthias Lakämper

MatLakaemper_0-1723962607182.png

 

 

2,927

Hi,

Task Completed 🙂

Nandhini_Thanikachalam_0-1723962708154.png

Thanks,
Nandhini Thanikachalam.

vslakshmi
Explorer
2,771

Task 2 done, Please review 

vslakshmi_0-1723995785652.png

Regards,

Lakshmi

 

Momaharshi
Discoverer
2,745

Hi, 

Data preview for Task 2:

Momaharshi_1-1724004467095.png

 

Aditya1231
Discoverer

aaruljothi
Participant
2,706

Hello,

Below screenshot of data preview with additional fields, Thank you

aaruljothi_0-1724015629973.png

 

PedroARomero
Explorer
2,690

Hi, this is my solution to Task 2

PedroARomero_0-1724034811661.png

 

jonwalnikhilesh
Participant
2,689

Hi, Below is the solution for Task 2

CDS result with Amount in Text

Week2_CDS_with amount text.png

CDS result with Amount in Text and Overall Status Text 

Week_2CDS_result.png

0 Kudos
2,511

Thanks and if you have completed the task 2, post your screenshot to get a badge.

0 Kudos
2,519

Thanks and if you have completed the task 2, post your screenshot to get a badge.

0 Kudos
2,521

Thanks and if you have completed the task 2, post your screenshot to get a badge.

Ravindhiran
Discoverer
2,594

Hi,

Task completed.

Ravindhiran_0-1724044428243.png

Regards,

Ravindhiran.

Aslam2
Explorer
2,582

Hi,

Please find the below data preview of CDS.

Data Preview:

Aslam2_3-1724051329811.png

 

 

0 Kudos
2,409

Kindly send the screenshot of the CDS view..

0 Kudos
2,551

Kindly post the screenshot of the CDS view and data preview of the CDS view that you have created. The above screenshot is from another participant.

2,595

Data Preview of CDS View entity.

Naveen_srinivasan_0-1724054110916.png

Best Regards,

Naveen 

 

Alamas0210
Discoverer
0 Kudos
2,534

We already tried recreating the time dimensions - without success.
This is what the view looks like for us, the field "DAY_OF_W_SAP" is not available.
NicolasMartinez_1-1724053560974.png

the game vs apps

0 Kudos
2,523

Are you referring to the above mentioned task?

0 Kudos
2,498

Yes, I'm interested in the task

the game vs apps

0 Kudos
2,527

Kindly post the screenshot of the CDS view and data preview of the CDS view that you have created. The above screenshot is from another participant 'Aslam2'.

siva1990
Explorer
2,533

Hi Team,

Please find my results below,

siva1990_0-1724060375275.png

 


Regards

Alamas0210
Discoverer
0 Kudos
2,505

Yes, I'm interested in the task
NicolasMartinez_1-1724053560974.png

the game vs apps