This is a test message to test the length of the message box.
Login
|

036: Core Data Service [Basics] - Analysis

33

Where can you find more information about a Core Data Service in ABAP when it comes to analyzing existing objects? Let's look at various tools for this.

Advertising


Introduction

In the last episode, we looked at the creation and modeling of the Consumption Layer. Over time, and with the different layers of the virtual data element, the complexity of the data model also increases. This is usually very easy for the creator to understand, but for someone who is learning the ropes, the complexity can be very time-consuming. Therefore, in this episode, we will look at various tools in the ABAP Development Tools that are designed to help you with the analysis.

 

Outline

The "Outline" view is already open in the standard view. Here, the objects and their components are explained in various use cases. For a class, we see the classes, methods and their visibility, as well as any local classes and test classes. Normally, the view is located under the "Project Explorer," but you can configure it flexibly to suit your needs. For a Core Data Service, we see the entity name at the top, followed by the SELECT statement, the tables, and the elements. Since a view can become quite long, navigation to the individual components is very practical and increases our workflow speed. The elements each have their own icons for keys, database fields, and virtual elements that we have defined locally. Clicking on an element allows us to navigate within the CDS View, and all components of the element are highlighted.

 

CDS Navigator

Another helpful and important tool in the ABAP Development Tools is the CDS Navigator. It is not visible in the default view and must first be displayed via the Tools menu. We start the search using the magnifying glass icon and can find the view using the keyword "CDS" and embed it into the current view with a click. Where you ultimately display the view is up to you; by default, we display it next to the Outline and the Relation Explorer, directly below the Project Explorer. Essentially, the CDS Navigator provides context for the current view, such as extensions, metadata extensions, access controls, or other objects. The button bar provides us with additional functions and tools that we can use for further analysis.

 

Active Annotations

Let's take a look at the active annotations in the view. To do this, we select the "Active Annotations" button, and the corresponding view is loaded in Eclipse. Processing the information may take some time. At first glance, we see all the annotations that are now available in the view. Here we also see annotations like the semantics, which are not actually present in the main view but are inherited from one of the lower views. In this case, from the positions, as we see in the "Source" section at the back. Furthermore, the various annotations from other views, as well as locally, are available.

If you want less information at this level, or if there are any bothersome annotations, you can deactivate them at this level. Using the additional annotation "ignorePropagatedAnnotations", we can disable inheritance. We then receive an error message stating that our "PositionPrice" field is now missing the relevant currency information. We must now add this information at this level. To do this, we extend the annotation from the Semantics section and add the missing information. Afterward, we activate the Core Data Service, which can now be compiled again. Now let's go to the annotation view and press the "Refresh" button. Only then will the annotations be recalculated. After the recalculation, only local annotations will be available. Therefore, to analyze errors, you should occasionally check the view to see if the correct annotations are being loaded or if the lower annotations are being ignored because the corresponding annotation has already been set.

 

Dependency Analyzer

Next, let's start the "Dependency Analyzer" tool in the CDS Navigator toolbar. The tool will begin analyzing the current view immediately, which may take some time. We then get a new tab with the results of the analysis, and at the bottom, we find three tabs with further views of the data.

The first view is a hierarchical tree of dependencies. Starting with the view, all further objects are broken down to their respective databases. Next to this, we find further information such as the relationship at the SQL level, the type, the name of the CDS entity, whether the object was created in the database, and whether there is an access control (i.e., a permission check).

In addition, there is the SQL Dependency Graph. This view displays all information in hierarchical order according to its dependencies. At the top level, you will find the Consumption View, and at the bottom level, the corresponding tables that exist. In the menu at the top, you will find a button to switch between the entity names and the actual names of the objects. We'll take a closer look at this function later in a more complex view. You can move the view using the navigation within the view or on the side. When you click on an object in the view, you first receive various pieces of information such as the entity name, the object type, and the type of connection. Right-clicking allows you to access the context menu and, for example, directly open the object to obtain further information.

On the third level, you'll find the Complexity Metrics. Here you'll find information about the complexity of the current view, such as loaded database tables or views present in the view stack. Complex SQL operations that can contribute to runtime performance are also displayed. Further performance information includes, for example, called functions, executed casts, or corresponding case statements in the hierarchy. This is all information that can significantly influence performance later on.

 

Complex View

Let's take a look at a more complex view from the standard in the next step. To do this, we open the object C_BusinessPartnerTP_2 using Ctrl + Shift + A. This is the second version of the business partner for the corresponding application. In the CDS Navigator, we now see further objects, such as the Metadata Extension or the Access Control. By clicking on the corresponding object, we go directly to the view extension. For example, we can look at the access control or, as in the second step, the metadata extension, which also belongs to this view.

Now, in the next step, let's load the Dependency Analyzer. The analysis is correspondingly complex because the view is very large. If we look at the tree, we see a very complex structure consisting of many tables and views. Complex views like the business partner are therefore not immediately clear but must be analyzed in detail. The various entities and tables can result in considerable complexity. Let's now visualize the complete tree in the dependency graph. We immediately notice that the view is very cluttered and highly complex. Within the view, we also find, for example, the I_BusinessPartner, which forms the basis for the business partner. This is based on the BUT000 table and is the corresponding view that should be used when working with the business partner.

Let's look at a special configuration further up in the view. Here we see a union of different data sets displayed in a view. The address data of natural persons and companies are combined – the standard uses a union operation for this. Let's look at the corresponding view and open it in the ABAP Development Tools (ADT). There, we first see the SELECT statement on the first part of the addresses; in the lower part, you'll find the union and the corresponding SELECT statement on the second set of data being combined. This creates a combined result set from the addresses of both worlds, merged into a new view.

Let's go back to the overview and look at the two views at the top. Here we see that these view entities have names. If we now switch the view, we get the rather cryptic name of the corresponding SQL view. Switching within the view allows us to display both the SQL view name and the actual entity. We will take a closer look at the exact difference between the SQL name and the entity name in the next episode.

Finally, let's look at the complexity metrics again. Here, the large number of database tables and views used is striking. In total, we have nine Group By clauses across the various views. We also see a high number of cast operations and case statements. With such a complex view, you should definitely pay attention to performance.

 

Summary

In this episode, we took a detailed look at analyzing Core Data Services. From the Consumption View level onward, analyzing existing views quickly becomes complex. Various tools and views within the ABAP Development Tools (ADT) in Eclipse can help you with this. These tools provide you with a quick overview and allow you to make informed statements about the complexity of each view. That brings us to the end of this episode. We hope you now have a better overview of how to analyze your corresponding Core Data Services. Thanks for watching and see you next time.

 

YouTube
Video


Included topics:
YouTubeSkriptCore Data ServiceAnalyse
Comments (0)



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.


035: Recycling-Heroes - New entity (Document)

Category - YouTube

After generating the app, the actual development phase begins. The app needs to be adapted and expanded for our use in order to meet our specific requirements. Therefore, we are extending the data model with a new entity.

02/23/2026

034: Recycling-Heroes - Object and RAP Generator (Document)

Category - YouTube

In this episode, we create our new document app using generators to create the data model and then to create the RAP object.

02/02/2026

033: Core Data Service [Basics] - Consumption Modeling

Category - YouTube

In this episode, we look at the modeling of a Consumption View and examine various aspects such as functions, associations, session variables, and virtual fields.

01/26/2026

032: Recycling-Heroes - Tags and Types

Category - YouTube

In this episode, we'll create additional business configurations that we'll need later in our data model. Some of the properties have changed, and we'll examine these changes in detail.

01/19/2026

031: Recycling-Heroes - Unit Testing (Configuration API)

Category - YouTube

Now that we've finished the Configuration API, let's take a look at unit tests and how we can automatically test our API. This will save us the effort of manual testing later on.

01/05/2026