In this blog post, I want to provide some answers for frequently asked questions on ABAP Language Versions.
1. What is an ABAP language version?
An ABAP language version is a subset of the full ABAP language set. It provides:
Restricted syntax: only a well-defined part of the ABAP syntax tree is allowed in a specific ABAP language version. In other words, either complete statements are forbidden (e.g. EXEC SQL) or parts of a statements (e.g. SELECT USING CLIENT)
Released object check: only released SAP APIs (for example releases classes and CDS views) can be used. Precisely speaking, the ABAP language version restricts the access to objects (ABAP classes, interfaces, tables, CDS views, …) which are either part of the same software component or that are released for the respective ABAP language version
2. What is the goal of an ABAP language version?
The concept of ABAP language versions supports two targets:
Minimize the risk of damages to the system or the data integrity/security
De-couple custom code from the SAP core by enforcing the exclusive use of released SAP APIs
3. Which ABAP language versions are available?
As of today, the following three ABAP language versions are available for custom development and key user tools:
ABAP Language Version
SAP BTP ABAP Environment
SAP S/4HANA Cloud ABAP Environment (aka Embedded Steampunk,
available with 2208)
SAP S/4HANA 2022 (on-premise)
ABAP for Cloud Development
ABAP for Key User
In older on-premise releases, some obsolete language versions are available (e.g. non-unicode ABAP). These are obsolete since some years and have been cleaned out with 2022.
The ABAP language version can be set in the ABAP Developer Tools (ADT) in the Properties tab. In 2022, the ABAP language version field is shown in the Properties -> General tab.
In older releases it is shown in the tab Properties -> Specific.
The language version can be changed in on-premise only. In Cloud, the ABAP language version is set by the system and cannot be changed. The ABAP language version ABAP for key users is set by the key user tools, so normally you will not change the ABAP language version from/to ABAP for Key in ADT.
The ABAP language version is a property of the respective ABAP object. It is in principle independent of the tool in which the object is maintained (ABAP workbench, ADT, key user tool).
The ABAP language version can be defaulted for a package or a software component. For Cloud products (SAP BTP, SAP S/4HANA Cloud), the configuration is managed by the system.
5. What is the effect of the ABAP language version?
When an ABAP language version (<> Standard) is set for an ABAP object, the syntax check is enhanced by additional checks, which prevent the use of “forbidden” statements and non-released objects from other software components. In other words, objects using “forbidden” statements or non-released objects cannot be activated.
Syntax error due to use of non permitted object/API
6. Which object types support an ABAP language version?
The ABAP language version is not only supported for ABAP “code” objects (classes, interfaces, …) but also for other object types of the “modern ABAP world”:
DDIC: domains, data elements, structures, tables, …
CDS/RAP: CDS views and entities, behavior definitions, …
The language version enablement was completed for most object types in version 2208/2022. In the 2208/2022 version, you can find the language version field in ADT in the Properties -> General tab for all object types that support the ABAP language version.
In previous releases, the ABAP language version was supported for ABAP “code” objects (classes, interfaces, …). The language version field in ADT is located in the Properties -> Specific tab for these objects.
7. Which statements are supported in the ABAP language version?
For ABAP “code” objects (classes, interfaces, …), the list of statements or “sub-statements” can be found in the documentation:
Supported. But statement like CALL FUNCTION … STARTING NEW TASK, RECEIVE, WAIT are no longer supported. Use API CL_ABAP_PARALLEL.
Providing and implementing extensions
Supported: CALL BADI, GET BADI. Obsolete extension technology is not supported, e.g. ENHANCEMENT-POINT
Statements for REPORT and DYNPRO processing (e.g. REPORT, CALL SCREEN, …)
Access to the file system, low level access to the database, statements that would endanger the operations in the Cloud (e.g. OPEN DATASET, EXEC SQL, OPEN/CLOSE CURSOR, SELECT CLIENT SPECIFIED, SELECT USING CLIENT, SYSTEM CALL)
8. Which APIs/objects can be used in an ABAP language version?
The ABAP language version restricts the access to objects (ABAP classes, interfaces, tables, CDS views, …) which are either part of the same software component or that are released for the respective ABAP language version. The information on the release state is shown in ADT in the Properties -> API State tab.
Release Contract of an API/Object
9. Can I see objects with ABAP language version ABAP for Key Users in ADT?
Yes. You can see and also debug code written in key user tools in ADT. Details see: Key User Debugging
10. Can I change the ABAP language version ABAP for Key Users in ADT?
In on-premise you can set the ABAP language version ABAP for Key Users in ADT. However normally this language version is used and set automatically by the key user tools. So normally you will change the ABAP language version from/to ABAP for Key Users for test objects only.
11. Can I execute the ABAP language version checks using ATC?
Yes. You can use the ATCs ABAP Language Version Check and Usage of Released APIs in the Cloud Readiness check group to check the syntax and usage of released APIs for objects, before changing the ABAP language version. Learn more in the following blog: How to check your custom ABAP code for SAP BTP ABAP Environment
12. How can I adapt legacy custom code towards the new ABAP Language Version?