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: 

SAP Developer Challenge - SAP Cloud Application Programming Model (Week 2)

nicoschoenteich
Developer Advocate
Developer Advocate

Please note that this challenge is closed. The deadline for receiving a badge upon successful completion has passed. Check out this new challenge for the month of August.

Welcome to the second week of this month's SAP Developer Challenge. This week we are going change development environments and move to the SAP Business Application Studio. Additionally, we will add some sample data to our project using the @sap/cds-dk (command line client and development toolkit).

If you haven't read the announcement blog post for this challenge, please head over and do so. This week's challenge builds on top of last week's challenge, which you should have completed before starting with this one.

The Challenge

After getting started with the SAP Cloud Application Programming Model in a CodeSandbox last week, we now want to move to a new development environment, that is dedicated to development on the SAP Business Technology Platform and is a better fit for purpose - the SAP Business Application Studio. You might have noticed that the CodeSandbox didn't provide syntax highlighting or code completion for CDS, which is one of many benefits of moving to the SAP Business Application Studio.

 
This is what you have to do to successfully complete this week's challenge:
 
1. You need access to an account on SAP Business Technology Platform. If you don't have one yet, check out these tutorials on how to get an account on SAP BTP to try out Free Tier service plans or how to get a free account on SAP BTP Trial.
2. If you don't already have access to the SAP Business Application Studio, check out this tutorial on how to set up SAP Business Application Studio for development.
3. Once you have access, create a new dev space of type "Full Stack Cloud Application". This dev space will have all necessary tooling preinstalled.
 
Screenshot 2023-07-11 at 22.45.21.png
 
You can alternatively also complete this week's challenge in any other development environment, for example VS Code or a terminal (any (n)vim users? 😁), although we highly recommend to try out the SAP Business Application Studio. Using the SAP Business Application Studio (or VS Code) allows you to use the SAP CDS Language Support extension. Additionally, any other dev environment than the SAP Business Application Studio would require to install Node.js and the @sap/cds-dk (command line client and development toolkit) manually.
 
4. Open a new terminal (Menu > Terminal > New Terminal).
5. Create a new directory for your CAP application inside the projects/ directory using the command mkdir projects/cap-developer-challenge (basix UNIX commands).
6. Open the newly created directory (Menu > File > Open Folder ... > /home/user/projects/cap-developer-challenge/).
7. Open a new terminal session (Menu > Terminal > New Terminal).
8. You can now make use of the CDS project generator by running the command cds init (documentation). You will see how this creates a sample application. Now is also a good time to run cds help and explore the capabilities of the CDS cli.
9. You can now manually copy over the db/schema.cds and srv/cat-service.cds files from last week's CodeSandbox.
 
At this point you can of course also use a source code control system like GitHub to share the project between to environments. We will skip this step here for brevity. Please let us know in the comments, if you are interested in a "Getting started with Git" tutorial. Always use a source code control system when working on productive projects.
 
10. You can now start the dev server using the command cds watch in the terminal.
11. Add some initial data to your application (hint: providing initial data).
12. Take a screenshot of your development environment. Make sure it shows the db/data/ directory with its content and at least one open CSV file. It should look something like this:
 
Screenshot 2023-07-11 at 22.44.28.png
 

Resources

We have gathered a few helpful resources for this week's challenge. Feel free to use the comments sections if you have question or need help.

 
131 REPLIES 131

0 Kudos

Well done Ajay

P41l
Explorer

Submission for Week-2 Challenge

P41l_0-1689616849461.png

 

 

0 Kudos

Well done

Aliaksandr_Ch
Product and Topic Expert
Product and Topic Expert

Hi @nicoschoenteich ,

Week 2 screenshot:

Screenshot 2023-07-18 at 00.06.11.png

0 Kudos

Well done

Ruthiel
Product and Topic Expert
Product and Topic Expert

My challenge's print for this week:

Ruthiel_0-1689632087734.png

 

Well done

andrew_chiam
Explorer

Week 2 submission from my side. Look forward for your verification 😃

Week 2 Challenge.PNG

0 Kudos

Well done

Aashish28
Contributor

Hi @nicoschoenteich ,

Here is my submission for week#2.

Below are screen captured of the results in BAS.

Aashish28_0-1689663906822.png

Aashish28_2-1689664451229.png

Thanks,
Ashish

 

 



0 Kudos

Well done

My submission for the second week

HarshalN_0-1689664721290.pngHarshalN_1-1689664770566.png

 

0 Kudos

Well done

alina-balysh
Discoverer

Hello! This is my submission for this week:Screenshot 2023-07-18 152548.png

0 Kudos

Well done

jschallenberger
Explorer

Here is the submission for this week, waiting for tomorrow!

jschallenberger_0-1689697875102.png

 

0 Kudos

Well done

dinah
Product and Topic Expert
Product and Topic Expert

Submission:

dinah_0-1689780925275.png

 

0 Kudos

Well done Dinah

geek
Participant

Is this O.K.?

geek_0-1689781793163.png

 

0 Kudos

Well done

sabarna17
Contributor

My submission for Week2. Please validate ->
Screenshot 2023-07-20 021336.png

0 Kudos

Well done

Hi, is this ok?

benw_0-1689865147420.png

Thanks,

Ben

 

0 Kudos

Well done

Trulov
Participant

Week2 from VSCodecap-dev-challenge-2.png

0 Kudos

Well done

antothomasraja
Explorer

Hi @nicoschoenteich

Below is my submission for Week 2,

antothomasraja_0-1690111118619.png

Best Regards,

Anto

0 Kudos

Well done

steph_senita
Explorer

Hi @nicoschoenteich ,

Please find below my submission for Week 2.

 

stephanie_senit_0-1690111379774.png

Thanks & regards

Stephanie

0 Kudos

Well done

VijayCR
Active Contributor

Hi @nicoschoenteich ,

Please find below my submission for Week 2.

1.PNG

Thanks,

Vijaya

0 Kudos

Well done

VenugopalA
Explorer

Hi  @nicoschoenteich, bit late but success & review my submission for Week 2 please.

VenugopalA_0-1690182775401.png

Thank you.

 

 

0 Kudos

Well done

Ashok459
Participant

Hi,

My week 2 submission.

Ashok_Easa_0-1690239080576.png

 

0 Kudos

Well done

Geeth
Product and Topic Expert
Product and Topic Expert

Hi Nicolai,

I hope this looks fine. 

 

Geeth_0-1690361681466.png

 

Well done

andrew_mak
Explorer

Hi, my submission for Week 2.

2023-07-26 Week-2.png