Showing posts with label SLIN. Show all posts
Showing posts with label SLIN. Show all posts

Wednesday, December 31, 2025

Possibilities of checking ABAP code quality from HANA DB migration point of view

When migrating SAP NetWeaver based ABAP stack server from any DB to HANA DB there are a few steps to be done prior to the migration with the respect to the ABAP code.

First there are functional modifications to the custom ABAP code to be analyzed. Those are places in the code that leverages specific DB features that need to be adjusted for the HANA DB. As an example, these are Native SQL statements in the ABAP code.

Secondly there is SQL Optimization of the custom ABAP code. To support this part there are a few of the tools available.

To identify the places of the code for both the cases it is possible to leverage Runtime and Static Checks.  Those are two different approaches also to support the code quality assurance and error detection.

Static checks analyze your ABAP code without executing it. They examine the source code itself to identify potential issues, coding standard violations, and best practice deviations. They are performed during development time in the ABAP Editor or through Code Inspector (SCI), no program execution required, checks syntax, adherence to coding guidelines, and potential logical errors.

Tools:

Extended Program Check (t-code SLIN)

Code Inspector (t-code SCI/ATC)

ABAP Test Cockpit (t-code ATC)

SQL Monitor (t-code SQLM or older /SDF/ZQLM)

SQL Performance Tuning Worklist (t-code SWLT or older /SDF/ZQLMD). It combines the SQLM data with the ATC tool results.

 

Runtime checks monitor and validate code behavior during program execution. They detect issues that only become apparent when the program runs with actual data.

They are: activated in t-code SLIN or through specific settings, to monitor memory usage, database operations, and system calls during execution, to impact performance when active, to provides detailed analysis of actual program behavior.

Tools:

Runtime Check Monitor (t-code SRTCM), is used for administrative tasks

Runtime Check Monitor (t-code SRTCMD): Data Display, is used for pure runtime data analysis

The above-mentioned SRTCM tool is solely focused to scan the code for two main issues:

Empty table in case of FOR ALL ENTRIES statement. If the internal table is empty then all data is fetched from DB table.

Missing ORDER BY or SORT statements after SELECT. In case the internal table is not sorted the SELET is slower performing is it could be.

 

More information:

1912445 - ABAP custom code migration for SAP HANA - recommendations and Code Inspector variants for SAP HANA migration

3242700 - ABAP SQL Monitor: Implementation Guide and Best Practices

SQL Performance Monitoring


Saturday, December 16, 2023

"Results table" feature in SAP Code Inspector

SAP Code Inspector (t-code SCI) is a tool for analyzing and inspecting ABAP code. The tool is to help ABAP developers to ensure that ABAP code complies with certain coding standards, performance guidelines, and best practices. It performs static code checks, which means it analyzes the source code without actually executing it. The tool identifies potential issues, vulnerabilities, and areas for improvement in the code, facilitating the development of more robust and efficient applications.

Here I want to mention one feature of the SCI that is most likely not very known. It is called a "Results table". It is a button on SCI’s toolbar:

View of "Results table" provides comprehensive view where checks from the SCI and ABAP Extended Program Check (t-code SLIN) are combined.

In a picture below – issue marked in red are reported by the SCI. Issue marked in green are reported by the SLIN.


The "Results table" button is a new function that is added into SAP NetWeaver system as of SAP_BASIS 702.