0% found this document useful (0 votes)
38 views8 pages

Build Basic RAP App with CDS Annotations

The document outlines the steps to create a simple app using RAP, focusing on a list page and an object page without draft functionality. It emphasizes the importance of understanding CDS annotations and provides a step-by-step approach including creating a database table, a basic CDS, BDEF, service definition, and service binding. The document concludes with a preview of the app's functionality, including CRUD operations and data management.

Uploaded by

Karnataka567
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views8 pages

Build Basic RAP App with CDS Annotations

The document outlines the steps to create a simple app using RAP, focusing on a list page and an object page without draft functionality. It emphasizes the importance of understanding CDS annotations and provides a step-by-step approach including creating a database table, a basic CDS, BDEF, service definition, and service binding. The document concludes with a preview of the app's functionality, including CRUD operations and data management.

Uploaded by

Karnataka567
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Simple App built via RAP ( also covers domain F4 )

Document : Created by Manjeet Dang


Date: December 25, 2021

[Link]

Scenario:

Create a simple basic app via RAP with a list page and an object page.

• Please note that you should have a knowledge about CDS annotations ( and if you have not
worked on CDS earlier, then please go through each and every line of CDS in this post
properly and do a hands on )
• Here I have tried to explain a basic app without draft functionality ( will try to cover draft
and other high level scenarios in further posts)

Approach:

Step 1: Create a DB Table


For field Project status, say you have a requirement that you need F4 on this table on basis of
domain values, then you will have to create

For data element ZSTATUS, I have taken below domain:

Now you will create a CDS on top of domain DB table dd07l and domain text table dd07t and pass
your specific DOMAIN VALUE.

CDS:

Can Try domain f4 directly from text cds also( as it has language, domain value, text columns)
Value Help Table output:

Step 2: Create a Basic CDS on top of it

Now create a root CDS (as RAP needs ROOT syntax for CDS)
Step 3: Create BDEF

Note that BDEF Name is disabled as BDEF always take same name as what we give in root entity (
that is the root CDS here) which is ZROOT_MDANG_CDS2
Step 4: Create Service Definition

Step 5: Create Service Binding

Note that I exposed only root entity and all value helps used in my consumption view are
automatically exposed here.

Click on PREVIEW to see list page:

On top, we see 3 selection/filter fields, also we see fields with @[Link] annotation, also create,
delete buttons

Click on GO to see data

Click on create to create data (Since we gave a managed BDEF IMPL, so crud operation will be
handled automatically )
On object page, we see all identification fields

Marked we see header info: title value and description value.

On saving, we see marked fields with purpose #Header

Also we can edit and delete these.

And check DB now, to see etag last changed date time ( in bdef) and see uuid ( autogenerated due to
numbering managed in bdef)
X
MANJEETDANG92@[Link]

Hope it helps you!!

You might also like