Lesson 2 of 5
The ABAP for Cloud Development language version
10 min
Listen to this lesson
The ABAP language version is a property of each program and of many other repository objects. It decides which statements are allowed, which repository objects may be used and which syntax rules apply. SAP's keyword documentation lists Standard ABAP (unrestricted, for classic ABAP), ABAP for Cloud Development (restricted, for ABAP Cloud) and ABAP for Key Users (restricted, for key user enhancements). ABAP Cloud means using ABAP for Cloud Development.
What the version restricts
| Restriction (as SAP documents it) | What developers notice |
|---|---|
| Only a restricted set of language elements | Statements such as MOVE ... TO and DESCRIBE TABLE are invalid; use assignments and built-in functions |
| Most development in class methods | No executable reports, dynpros or classic lists; UIs come from RAP services |
| Almost no obsolete language elements | Old forms such as GET REFERENCE OF are flagged; use REF #( ) |
| Strictest ABAP SQL syntax check | Host variables need @, field lists must be explicit, and so on |
| Client isolation enforced | Additions such as USING CLIENT are not allowed |
| Access only to released repository objects | Most SAP tables cannot be read; use released CDS views and classes |
What ABAP for Cloud Development restricts, with examples from SAP’s cheat sheet.
SAP's cheat sheet adds practical details. Some sy fields such as the application server date and time should not be used; released classes such as the XCO library provide user date and time instead. Dynamic ABAP SQL with a non-released data source compiles but fails at runtime, so dynamic code needs extra care and tests. And SAP's keyword documentation offers the program DEMO_ABAP_VERSIONS to check source code against the rules of different language versions.
- Create or open the objectIn a package of the ABAP Cloud software component, the version is ABAP for Cloud Development
- Write codeCode completion offers only released objects
- Syntax checkNon-released use is an error; ADT names a successor when one exists
- ATCCloud development checks confirm the rules on every run
- Activate and transportIf it activates, it uses only released APIs
Setting the version
In the SAP BTP ABAP environment and Public Edition, ABAP for Cloud Development is the only version for custom code, so there is nothing to choose. In Private Edition and on-premise, the version comes from how the development is organized: SAP and community guidance for developer extensibility describes creating a software component whose packages use ABAP for Cloud Development, as Contoso did with ZCMC_CLOUD. For an individual object in a classic package, SAP's cheat sheet shows changing the version in ADT under Properties, General, Edit. Doing that on converted code is a fast way to see how far it is from ABAP Cloud: the syntax errors are the gap list.
For reviewers and testers, the language version is the most honest label in the system. A code review can miss a direct table read buried in an include; the syntax check for ABAP for Cloud Development cannot. That is why Contoso's review checklist asks one question before any other for new code: which language version does the object use, and if it is Standard ABAP, why? The answer is recorded with the clean core level in the change.
What would you do?
A developer in ZCMC_CLOUD writes a dynamic SELECT whose table name comes from a parameter. It activates without errors. What should the reviewer ask for?
- ABAP Cloud uses the language version ABAP for Cloud Development.
- It restricts statements, enforces strict ABAP SQL and client isolation, and allows only released objects.
- Dynamic access to non-released objects compiles but fails at runtime; test it.
- In Private Edition, organize ABAP Cloud work in a software component that uses the cloud version.
- Switching a classic object’s version turns its gaps into a visible error list.
Check your understanding · not graded
Lesson check
1. Which of these statements is not allowed in ABAP for Cloud Development?
2. Which addition is not allowed because client isolation is enforced?
3. What happens with a dynamic SELECT on a non-released table in ABAP Cloud code?
4. Which SAP program checks source code against different ABAP language versions?