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

Extend a Custom Core Data Service in ABAP Environment

Explore developer extensibility by creating a CDS view and extending it in ABAP Environment.

Overview

🎓 beginner 30 min. SAP BTP ABAP EnvironmentBeginnerABAP DevelopmentSAP Business Technology Platform

You will learn

  • How to extend SAP or custom table using Extensibility model
  • How to extend a CDS view by adding a new field
  • How to implement custom logic
  • How to consume fields from other exposed CDS view using Associations
Shilpa Shankar S Shilpa Shankar June 5, 2026
Created by September 15, 2025
Contributors

Prerequisites

Prerequisites

  • You need to have access to an SAP BTP, ABAP environment, or SAP S/4HANA Cloud, ABAP environment or SAP S/4HANA (release 2022 or higher) system. For example, you can create a free trial user on SAP BTP, ABAP environment.
  • You have downloaded and installed the [latest ABAP Development Tools (ADT)] (https://tools.hana.ondemand.com/#abap) on the latest Eclipse© platform.
  • You have created an ABAP Cloud Project.
  • Your system has the ABAP flight reference scenario. If your system hasn’t this scenario. You can download it here. The trial systems have the flight scenario included.

Steps

Intro

This tutorial was written for SAP BTP ABAP Environment. However, you should also be able to use it in SAP S/4HANA Cloud Environment in the same way. Always replace ### with your initials or group number.


Step 1 Create your own ABAP package

  1. Open Eclipse and connect to your system.

  2. Right-click on the package ZLOCAL and choose New > ABAP Package from the context menu.

  3. Create your own ABAP development package Z_Travel_### as a sub package of ZLOCAL.

    • Name: Z_Travel_###
    • Description: My travel package
    • Select the Add to favorite packages box
  4. Click Next.

    Create ABAP package
    Create ABAP package

  5. Select package properties and click Next.

    • Software Component: ZLOCAL

    Create ABAP package
    Create ABAP package

  6. Select a transport request or create new and click Finish.

    Transport request
    Transport request

Step 2 Create a Structure
+
Step 3 Create a database table
+
Step 4 Create data generator class
+
Step 5 Create a CDS view
+
Step 6 Extend the database table
+
Step 7 Create a new ABAP class to generate the values for the newly added field
+
Step 8 Extend the CDS View to consume the newly created custom field
+
Step 9 Add a new calculated field to the extended CDS view
+
Step 10 Extend the view with an association to CDS view entity
+
Step 11 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 12
1. Create your own ABAP package 2. Create a Structure 3. Create a database table 4. Create data generator class 5. Create a CDS view 6. Extend the database table 7. Create a new ABAP class to generate the values for the newly added field 8. Extend the CDS View to consume the newly created custom field 9. Add a new calculated field to the extended CDS view 10. Extend the view with an association to CDS view entity 11. Test yourself 12. More Information

Learn more →