Skip to content
NextLytics
Megamenü_2023_Über-uns

Shaping Business Intelligence

Whether clever add-on products for SAP BI, development of meaningful dashboards or implementation of AI-based applications - we shape the future of Business Intelligence together with you. 

Megamenü_2023_Über-uns_1

About us

As a partner with deep process know-how, knowledge of the latest SAP technologies as well as high social competence and many years of project experience, we shape the future of Business Intelligence in your company too.

Megamenü_2023_Methodik

Our Methodology

The mixture of classic waterfall model and agile methodology guarantees our projects a high level of efficiency and satisfaction on both sides. Learn more about our project approach.

Products
Megamenü_2023_NextTables

NextTables

Edit data in SAP BW out of the box: NextTables makes editing tables easier, faster and more intuitive, whether you use SAP BW on HANA, SAP S/4HANA or SAP BW 4/HANA.

Megamenü_2023_Connector

NextLytics Connectors

The increasing automation of processes requires the connectivity of IT systems. NextLytics Connectors allow you to connect your SAP ecosystem with various open-source technologies.

IT-Services
Megamenü_2023_Data-Science

Data Science & Engineering

Ready for the future? As a strong partner, we will support you in the design, implementation and optimization of your AI application.

Megamenü_2023_Planning

SAP Planning

We design new planning applications using SAP BPC Embedded, IP or SAC Planning which create added value for your company.

Megamenü_2023_Dashboarding

Dashboarding

We help you with our expertise to create meaningful dashboards based on Tableau, Power BI, SAP Analytics Cloud or SAP Lumira. 

Megamenü_2023_Data-Warehouse-1

SAP Data Warehouse

Are you planning a migration to SAP HANA? We show you the challenges and which advantages a migration provides.

Business Analytics
Megamenü_2023_Procurement

Procurement Analytics

Transparent and valid figures are important, especially in companies with a decentralized structure. SAP Procurement Analytics allows you to evaluate SAP ERP data in SAP BI.

Megamenü_2023_Reporting

SAP HR Reporting & Analytics

With our standard model for reporting from SAP HCM with SAP BW, you accelerate business activities and make data from various systems available centrally and validly.

Megamenü_2023_Dataquality

Data Quality Management

In times of Big Data and IoT, maintaining high data quality is of the utmost importance. With our Data Quality Management (DQM) solution, you always keep the overview.

Career
Megamenü_2023_Karriere-2b

Working at NextLytics

If you would like to work with pleasure and don't want to miss out on your professional and personal development, we are the right choice for you!

Megamenü_2023_Karriere-1

Senior

Time for a change? Take your next professional step and work with us to shape innovation and growth in an exciting business environment!

Megamenü_2023_Karriere-5

Junior

Enough of grey theory - time to get to know the colourful reality! Start your working life with us and enjoy your work with interesting projects.

Megamenü_2023_Karriere-4-1

Students

You don't just want to study theory, but also want to experience it in practice? Check out theory and practice with us and experience where the differences are made.

Megamenü_2023_Karriere-3

Jobs

You can find all open vacancies here. Look around and submit your application - we look forward to it! If there is no matching position, please send us your unsolicited application.

Blog
NextLytics Newsletter Teaser
Sign up now for our monthly newsletter!
Sign up for newsletter
 

How to debug SAP HANA SQLScript in AMDP-Transformations

When using SQLScript in transformations, you benefit from an enormous performance increase. Since data is processed directly in the database, there is no need to transfer data from the database to the application server.

However, SQLScript is fundamentally different from the ABAP programming language you may be used to. Therefore, sometimes unexpected results can occur. Debugging the SQLScript is essential for the subsequent troubleshooting. In this article you will learn how it works.

So-called breakpoints are used to stop and debug the processing of the respective logic. As of SAP BW version 7.40 you can set breakpoints directly in the AMDP class. These behave just like external breakpoints in ABAP.

SQL Script Debugging

On a BW4HANA system, the procedure is slightly different. There are two classes for the transformation routine, the M and the A class. First, the logic is created in the M class. After the activation of the transformation routine, the A class is generated. In order to be able to debug the routine, the breakpoints must be set in the A class. The breakpoints set in the M class are ignored.

SQL Script Breakpoints BW4HANA

To use the debugger in SAP BW 7.40, you have to set the parameter DTP_HANA_DEBUG_SCRIPT in RSADMIN to X. To do this, use the program SAP_RSADMIN_MAINTAIN (transaction SE38).

RSADMIN administration

An AMDP breakpoint can be created by double-clicking to the left of the line number. Each AMDP breakpoint is represented as a dot. It can have different colors. If the AMDP debugger is active, the dot is green. If the AMDP debugger is not active, the dot is grey. By double-clicking on the gray dot you can reactivate the AMDP debugger. 

Below is an overview of possible debugger states:

Color

Status

blue

This color is only displayed shortly after the breakpoint has been set. The routine must be recompiled for debugging.

green

Confirmed breakpoint, debugger is active.

gray

Inactive debugger. This can be activated through the context menu of the breakpoint.

white

Deactivated debugger. This can also be activated via the context menu.

 

Please note that the debugger deactivates itself after 10 minutes of inactivity. This is intended to save resources, since an activated debugger consumes a relatively large number of resources on the ABAP server.

In addition, you must know that the debugger will not start if you select the processing mode "Serially in dialog process (for debugging)" in DTP. In simulation mode, the generated SQL-statements are not executed. Instead, you must select the "Parallel SAP HANA execution" option.

However, the data is actually updated in the data target. Therefore, you must delete the requests after debugging.

Processing Mode Parallel SAP HANA Execution

If you have now set an active breakpoint and start the DTP in "Parallel SAP HANA Execution" processing mode, the view changes to the debug perspective.

Perspective switch


Increase the performance of your BW with SQLScript

Neuer Call-to-Action


The debugger stops the execution of the procedure at the breakpoint. Using the top bar in Eclipse, you can execute the steps in the debugger as usual. You can thus control the processing of the source code with the two buttons Resume and Single Step.

Debug steps

With the former, the program continues to run until it reaches another breakpoint or the end. With Single Step, as the name already indicates, only one statement is executed, then processing is stopped again.

The Debug perspective consists of several windows, which I explain below.

Debug Perspective

The window on the left shows the procedure and the associated class. This helps you to orientate yourself and find your way around more easily. In the middle you see your SQLScript code. On the left side next to the row number you can see a pointer that shows the number of the currently processed line.

On the right you see your variables, internal tables, breakpoints and watch expressions. Here you can see the values of the variables and view active breakpoints. If necessary, you can delete all breakpoints at once. 

In the lower window you see the data preview. While the value of the scalar variables is displayed directly in the variables view, for variables based on a table only the number of rows is displayed. The data preview can be used to view the contents of the table and to check the result. Note that in SQLScript, data is not processed row by row as it is in ABAP. Instead, the entire table is processed at once.

To display several tables in the data preview, e.g. INTAB and OUTTAB side by side, you can pin the view.

Pin view

You can export the table data via Save Table, for easier analysis and troubleshooting in Excel.

Export data

SAP HANA SQLScript - Our Summary

Especially when switching from ABAP to SQLScript, it is important to deal with debugging. After you are familiar with it, you can find out any errors.

Are you planning to migrate your developments to SQLScript and need help planning the right strategy? Or do you need experienced developers to implement your requirements? Please do not hesitate to contact us and we will be happy to advise you.Learn more about  SAP HANA SQLScript

 

Further information can be found in the book "SQLScript for SAP HANA" (SAP PRESS, ISBN 978-3-8362-7408-1) by Jörg Brandeis 

, ,

avatar

Sebastian

Sebastian Uhlig has been consulting companies in various industries on SAP BI solutions at national and international level since 2001 and covers the range from requirements analysis to the implementation of complex solutions. He has experience in leading project teams and is the architect of the product NextTables. He enjoys mountain biking and watching American football games.

Got a question about this blog?
Ask Sebastian

Blog - NextLytics AG 

Welcome to our blog. In this section we regularly report on news and background information on topics such as SAP Business Intelligence (BI), SAP Dashboarding with Lumira Designer or SAP Analytics Cloud, Machine Learning with SAP BW, Data Science and Planning with SAP Business Planning and Consolidation (BPC), SAP Integrated Planning (IP) and SAC Planning and much more.

Subscribe to our newsletter

Related Posts

Recent Posts