You are on page 1of 2

CDS Challenge

Story:
We have a very urgent marketing campaign to be started as soon as possible.

An existing report (ZR_CHL_CAMPAIGN_## in package TEST_CHL_EX_##) was coded by a


consultant whom we cannot reach anymore. It was used to contact customers who bought speakers in
Germany in a specific time period.

For the new campaign we additionally want to contact customers in the United States (US) and Great
Britain (GB) who bought products of the category 'servers' with a Sales Order (not Sales Order Item)
Net Amount greater than 10.000.

Another problem is, that unfortunately the ex-consultant seems to have deleted some code :(.
We commented out what is not working anymore.

So now it is on you to get it working ...


And yes we know you could do this with classical ABAP, but please try it with CDS this time :)

Data Model

sepm_sddl_salesorder_head sepm_sddl_businesspartner sepm_sddl_address


buyer address

items

sepm_sddl_salesorder_item sepm_sddl_product
product

Challenge: Please solve the puzzle, the expected result set is given in the report. Good luck!

Hints (which you certainly won’t need) can be found on the reverse side of this document.

SAP CodeJam ABAP for SAP HANA with Fiori


CDS Challenge
Hints:

1. In CDS it is not yet possible to put all need functionality in one view. Why not try to put a view on
a view on view…

2. To get results from multiple views with the same column layout together you can use the
“UNION” construct to combine two queries in a CDS view

3. Associations are used to make it easy to follow relations between tables. They can be used in any
CDS views consuming a CDS view containing an association.

SAP CodeJam ABAP for SAP HANA with Fiori

You might also like