SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Create an ABAP Core Data Services (CDS) View in SAP BTP, ABAP Environment

Create a CDS View, display it in Fiori Elements preview, and enhance its appearances using built-in annotations in the Business Technology Platform, ABAP Environment

Overview

🎓 beginner 45 min. ABAP DevelopmentBeginnerSAP BTP ABAP EnvironmentSAP Business Technology Platform

You will learn

  • How to create a read-only CDS-based travel model
  • How to display your CDS view in a Fiori Elements preview
  • How to add selection fields to Fiori Elements preview
  • How to extract the metadata of your CDS view
  • How to add semantic annotations
  • How to add a search function
  • How to add selection fields to the Fiori Elements preview
Julie Plummer J Julie Plummer June 5, 2026
Created by March 9, 2023
Contributors

Prerequisites

Prerequisites

Steps

Intro

In summary, based on existing persistent data sources, you will create and implement a query for an OData service to get a running app with useful read-only features. You can then use some of these features in productive development to make your applications more powerful and more user-friendly. By the end of this tutorial, your application should look like this.

final-app-create
final-app-create

Throughout this tutorial, object names may include a suffix or group number, such as _### or 000. Always replace this with your own group number or initials.

For more information on creating a read-only app, see the SAP Help Portal: Developing Read-Only List Reporting Apps


Step 1 Create package

  1. Create a new package for this tutorial, by choosing New > ABAP Package.

    step1a-new-package
    step1a-new-package

  2. Enter the following then follow the wizard, choosing a new transport request:

    • Name: Z_ENHANCE_CDS_###

    • Description Enhance CDS Tutorial 2020

      step1a-create-package
      step1a-create-package
      step1b-new-tr
      step1b-new-tr

Step 2 Create CDS View Entity
+
Step 3 Define CDS View
+
Step 4 Display in Data Preview
+
Step 5 Create a service definition
+
Step 6 Create service binding
+
Step 7 Activate service binding
+
Step 8 Display Fiori Elements Preview
+
Step 9 Add annotation for automatic display
+
Step 10 Extract UI metadata
+
Step 11 Add search field
+
  • For convenience, add the following annotation to the metadata extension object, so that the Memo field appears by default in the preview, then format, save, and activate ( Shift+F1, Ctrl+S, Ctrl+3 ):

    CDS
    @UI           : {
          lineItem      : [{position: 60, importance: #HIGH}]
          }
    Memo;
  • Refresh the Fiori elements preview in your browser.

  • There is a new Search input field.

    step11a-search-field
    step11a-search-field

  • Enter the search text Miami. The app only displays trips to Miami (to date, eleven trips).

    step11b-miami-90
    step11b-miami-90

  • Optional: You can test the fuzziness threshold by changing the value to 0.70. After you save and activate, the app will now show trips to Miami and trips involving Matthias. (You may need to empty the cache.)

    step11b-miami-70
    step11b-miami-70

  • Step 12 Add selection fields
    +
    Step 14 Test yourself
    +

    Resources

    Discussion

    Share feedback on this tutorial or join the conversation in SAP Community.

    Submit detailed feedback Discuss in Community
    Steps
    Step 1 of 14
    1. Create package 2. Create CDS View Entity 3. Define CDS View 4. Display in Data Preview 5. Create a service definition 6. Create service binding 7. Activate service binding 8. Display Fiori Elements Preview 9. Add annotation for automatic display 10. Extract UI metadata 11. Add search field 12. Add selection fields 13. Check your code 14. Test yourself

    Learn more →