This repository contains the material originally created for the SAP TechEd 2025 session DT266 | Troubleshoot and optimize extensions for ABAP Cloud in cloud ERP.
- Overview
- Presentation
- Requirements for attending this workshop
- Overview of the Model and ABAP Code
- Exercises
- How to obtain support
Ensuring optimal performance and stability of your ABAP Cloud-based extensions is crucial to long-term success. Learn techniques and best practices for troubleshooting and optimizing custom code in the Cloud ERP. Use powerful tools like the ABAP Cross Trace to get deep insights into execution flows and resource consumption. This session introduces attendees how to analyze custom extensions in SAP Fiori Apps within ABAP Cloud using tools like ABAP Debugger, Feed Reader, ABAP Cross Trace, ABAP Trace, SQL Trace, Memory Analyzer, Table Comparison Tool.
Note
DISCLAIMER:
Please note that information about SAPβs strategy and possible future developments is subject to change and may be changed by SAP at any time for any reason without prior notice. Check out the SAP Road Map Explorerβ and the ABAP Cloud Roadmapβ for more details.
- Access the presentation: πDSAG_DT266.pdf (extended version)β
Participants should have an interest in exploring topics through guided exercises and should have the following knowledge:
- Basic of ABAP knowledgeβ
- Basic knowledge of ABAP Development Tools for Eclipse (ADT)β
- Basic knowledge of ABAP Core Data Services (CDS)β
- Basic understanding of ABAP RESTful Application Programming Model (RAP)β
To complete the practical exercises in this workshop, you need the latest version of the ABAP Development Tools for Eclipse (ADT) on your laptop or PC
- The latest Eclipse platform and the latest ABAP Development Tools (ADT) pluginβ must be installed
- The web browser settings in your ADT installationβ must be adjusted.
And in addition you need the latest version of the MS Visual Studio Code on your laptop or PC with the SQL analyzer tool for SAP HANA
In our example we want to provide a list of Airline IDs = Carrier_Id(s) for which we get in the result list additional column fields calculated by customer extension:
- the total of all corresponding flight prices
- the total price of all corresponding supplements (like meal, beverage, luggage)
- the percentages %Meals, %Beverages, %Luggage with which those supplement categories contribute to the total price of the supplements
Note
Runtime error for specific Airlines:
If you click on Go without specification of any Airline or e.g. choose Airline ID = 'AC' you get a runtime error:
Currently it is only working without error for some specific airlines e.g. Airline ID = 'AA'.
This error is analyzed and fixed in Exercise 1.
π REMARK: The scenario of these exercises is based on a RAP application using the
ABAP Flight Reference Scenario. For an overview of the available database tables, seeABAP Flight Reference Scenario Database Tables. The calculation for the additional fields is performed in the ABAP classZCL_DT266_CARR_EXTENSION_###where we call in exercise 1 to 4 the methodGET_PRICES_ABAPand for exercise 5 the methodGET_PRICES_CDS.
π REMARK: The following overviews are only provided as optional to read information. This information is not required to execute the exercises.
More details on the involved underlying Data Model:
Click here for an Overview of the tables involved
We use in the Exercises the following tables:
| Table | Content | Number of Entries | Key Fields | Other Fields used in Model / Where used |
|---|---|---|---|---|
| /DMO/CARRIER | Different Carriers, e.g. AA, AC,... | 16 Airline IDs = Carrier IDs | CLIENT, CARRIER_ID | |
ZDT266_CARR_### |
Copy of /DMO/CARRIER | 16 Airline IDs = Carrier IDs | CLIENT, CARRIER_ID | |
| /DMO/CONNECTION | Connections of the Carriers | 20 rows: Combinations of Carrier & Connection | CLIENT, CARRIER_ID, CONNECTION_ID | |
| /DMO/BOOKING | Booking IDs and travel IDs for each combination of carrer and connection | 9161 rows | CLIENT, TRAVEL_ID, BOOKING_ID | CARRIER_ID, CONNECTION_ID, FLIGHT_PRICE |
| /DMO/BOOK_SUPPL | Supplements like meal, beverage, luggage | 16211 entries | CLIENT, TRAVEL_ID, BOOKING_ID, BOOKING_SUPPLEMENT_ID | SUPPLEMENT_ID |
ZDT266_BO_SU_000 |
Copy of 4.000 times /DMO/BOOK_SUPPL | 64,844,000 entries | CLIENT, TRAVEL_ID, BOOKING_ID, BOOKING_SUPPLEMENT_ID, ID (4,000 different values) | used for CDS performance |
| /DMO/SUPPLEMENT | Different kind of Supplements and their categories and prices | 48 entries | CLIENT, SUPPLEMENT_ID | SUPPLEMENT_CATEGORY, PRICE |
ZDT266_SUP_I_### |
Copy of 500 times /DMO/SUPPLEMENT | 24,000 entries | CLIENT, SUPPLEMENT_ID, ID (500 different values) | used for ABAP performance |
ZDT266_SUP_L_000 |
Copy of 200,000 times /DMO/SUPPLEMENT | 9,600,000 entries | CLIENT, SUPPLEMENT_ID, ID (200,000 different values) | used for CDS performance |
Click here for an Overview of the ABAP Code
In a similar way to Create Database Table and Generate UI Service
we have created a copy of /DMO/CARRIER with the name ZDT266_CARR_###, e.g. for ZDT266_CARR_000 and generated a UI service.
Following Using Virtual Elements in CDS Projection Views we created Virtual Elements declared in the CDS projection view ZC_DT266_CARR_### (ZDT266_CARR_000) created in the previous step:
They shall be calulated in the custom extension class ZCL_DT266_CARR_EXTENSION_000.
In this class ZCL_DT266_CARR_EXTENSION_000 two interface methods have to be created (refer to Implementing the Calculation of Virtual Elements):
The method Calculate calls then two alternative methods where we do the calculations:
GET_PRICES_ABAPwhere the calculations are performed in ABAP code (used in Exercises 1 to 4)GET_PRICES_CDSwhere the calculations are performed in CDS views (used in Exercise 5)
The method GET_PRICES_ABAP first determines for given AIRLINE = CARRIER_ID the corresponding connections (from table /DMO/CONNECTION) and for the connections the corresponding bookings (from table /DMO/BOOKING):

And then the supplements for the bookings:

and their prices and categories:

Then we just loop over the selected data to calculate the totals and percentages:

| Exercise Blocks | -- |
|---|---|
| Getting Started | -- |
| Getting Started | -- |
| Exercise Block for Functional Analysis | -- |
| Exercise 1: Analyze Errors with the Feed Reader | -- |
| Exercise 2: Usage of the Memory Inspector | -- |
| Exercise 3: Usage of the ABAP Cross Trace | -- |
| Exercise Block for Performance Analysis | -- |
| Exercise 4: Performance Analysis and Improvement using ABAP Trace and Table Comparison Tool | -- |
| Optional Exercises for Performance Analysis | -- |
| Exercise 4: Performance Analysis and Improvement using ABAP Trace and Table Comparison Tool | -- |
| Exercise 5: SQL Trace Analysis in SAP HANA SQL Analyzer | -- |
In the Getting Started section we outline how to logon to the system and to access your package for these exercises. We shortly introduce the Fiori App to use in the exercises.
In Exercise 1 a runtime error occurs for specific input data. With the tool Feed Reader and the ABAP Debugger we examine the root cause. Here a specific case is not handled correctly in a single line of ABAP code.
In Exercise 2 after a change in the ABAP code an Out-Of-Memory error is thrown. This runtime error is usually not related to the call of a single line of code. We analyze with the Memory Inspector the memory consumption and increase.
In Exercise 3 you will then use the ABAP Cross trace for tracing and analysing ABAP Cloud applications across different runtime components. The tool is useful to track down errors or unexpected behavior even without runtime errors.
The focus of Exercise 4 is on performance analysis using the ABAP Trace. There we learn different techniques to improve the runtime in ABAP code. In addition with help of the Table Comparison Tool we analye a functional error introduced with one of our optimizations.
In Exercise 5 we perform a code push down to the HANA Database using CDS views. Here we learn to create an SQL trace and analyze the execution plan in the HANA SQL Analyzer in Visual Studio Code.
So let us start and have a look at the Getting Started section: Getting Started - Mandatory, please check.
Please read the CONTRIBUTING.md to understand the contribution guidelines.
Please read the SAP Open Source Code of Conduct.
Support for the content in this repository is available during the actual time of the online session for which this content has been designed. Otherwise, you may request support via the Issues tab.
Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.


