This is a test message to test the length of the message box.
Login
|
ABAP Tools Work with Eclipse
Created by Software-Heroes

ABAP Tools - Working with Eclipse (CDS Templates)

2802

Did you select the wrong CDS template when creating the view? Here's a little tip to correct the view in ABAP afterwards.

Advertising


In this article we look at how you can save a Core Data Service after it has been generated incorrectly without deleting it completely from the system. The tip comes from Thomas Fiedler (SAP).

 

Introduction

Core Data Services come in different types, such as: View, View Entity, Custom Entity, Abstract Entity, and with and without parameters. If you want to create a new Core Data Service, you decide on a type when you create it. Accordingly, you start the installation wizard and come across the problem that we describe in the next section. 

 

Problem

We would like to create an abstract entity in the system that we then want to use as a structure for an action in a service. To do this, we start on the package with a right click and go to the path "New -> Other ABAP Repository Object" in the context menu to start the wizard.

 

After selecting "Data Definition" we go one step further with "Next" and come to entering the data. Here we define the name (CamelCase) and the description. With an abstract entity, we do not need a reference object for the system.

 

In the next step, we select the transport and in most cases we confirm the popup with Finish, since there is usually no further step after selecting the transport.

 

And here lies the real problem, since we have now received a template that we perhaps did not want at all. Our Core Data Service now looks like this; the template for the View Entity was used.

@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Abstract Entity Demo'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
define view entity ZBS_S_DMOAbstractEntity as select from data_source_name
{
  
}

 

Solution

In many cases we would now delete the view and create a new one using a template in order to get the syntax for it. But this is actually not necessary because the template does not determine the type. The type is still "Data Definition". The easiest way is to delete the content and call up the Content Assist (CTRL + Space).

 

Now you can choose the new template and at the end we get the desired abstract entity that we can continue working on.

 

Hint: The CamelCase name was not copied over properly and was not corrected by the Pretty Printer. It is best to copy the name before changing the template.

 

Conclusion

With this little tip, deleting the entity should be no longer necessary and you can relax and choose the right template for you, even if you miss the step again in the wizard. At least that's what happened to us a lot in the past.


Included topics:
ToolsADTEclipseCDS Templates
Comments (1)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Tuesday and Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


ABAP Tools - VS Code (Agentic AI)

Category - ABAP

ABAP Development Tools for VS Code is here, so how do you get started with Agentic AI? Let's take a look at a basic configuration and how to get it running.

06/03/2026

ABAP Tools - VS Code (Quick Start)

Category - ABAP

The ABAP Development Tools for VS Code are now available, and in this short guide we'll look at everything you need to get started.

05/30/2026

ABAP Tools - Working with Eclipse (Classes)

Category - ABAP

In this article, we'd like to discuss working with classes and how you can extend them cleanly and easily in Eclipse. We'll also look at further options available in the ABAP Development Tools.

04/21/2026

ADT - RAP Extension Assistent [MIA]

Category - ABAP

You want to extend a RAP object and don't know exactly where to start? Perhaps the Extension Assistant can help you and guide you through the process step by step.

03/06/2026

ADT - RAP Analyzer [MIA]

Category - ABAP

Getting to grips with and understanding existing RAP objects can not always be easy, especially when dealing with complex objects. Questions such as which pattern is used and which objects are important usually need to be worked out.

02/24/2026