Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 2 of 5

The ABAP for Cloud Development language version

10 min

Listen to this lesson

0:00 / 7:39

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 elementsStatements such as MOVE ... TO and DESCRIBE TABLE are invalid; use assignments and built-in functions
Most development in class methodsNo executable reports, dynpros or classic lists; UIs come from RAP services
Almost no obsolete language elementsOld forms such as GET REFERENCE OF are flagged; use REF #( )
Strictest ABAP SQL syntax checkHost variables need @, field lists must be explicit, and so on
Client isolation enforcedAdditions such as USING CLIENT are not allowed
Access only to released repository objectsMost 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.

The language version catches static misuse at activation, but dynamic access to a non-released source only fails when it runs, so it needs tests.
The Sign-Off Table · thesignofftable.com/academy/sap-abp-203
  1. Create or open the objectIn a package of the ABAP Cloud software component, the version is ABAP for Cloud Development
  2. Write codeCode completion offers only released objects
  3. Syntax checkNon-released use is an error; ADT names a successor when one exists
  4. ATCCloud development checks confirm the rules on every run
  5. Activate and transportIf it activates, it uses only released APIs
How the language version enforces ABAP Cloud from first keystroke to transport.
The Sign-Off Table · thesignofftable.com/academy/sap-abp-203

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.

Where the object lives sets its language version; on converted code, switching the version is a quick way to list what stands in the way.
The Sign-Off Table · thesignofftable.com/academy/sap-abp-203
Classic but cleanStandard ABAP that happens to use only released APIs. Switch the version and keep it clean.
ABAP CloudThe target. The language version guarantees released-only use.
Classic and coupledTypical converted code. Assess before changing anything.
Not possibleAn object in ABAP for Cloud Development cannot activate with non-released usage.
Language version and API usage together determine where an object stands.
The Sign-Off Table · thesignofftable.com/academy/sap-abp-203

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?

Key points
  • 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. 1. Which of these statements is not allowed in ABAP for Cloud Development?

  2. 2. Which addition is not allowed because client isolation is enforced?

  3. 3. What happens with a dynamic SELECT on a non-released table in ABAP Cloud code?

  4. 4. Which SAP program checks source code against different ABAP language versions?