SAP ABAP VERSIONS AND APIS



Get Example source ABAP code based on a different SAP table
  


VERSION 5 IN

ABAP Language Versions, Release Contracts and Released APIs
ABAP can be developed on an ABAP_PLATFORM_CLASSIC or an ABAP_PLATFORM_STRICT . Especially for strict ABAP, the following subjects are important:
ITOC

ABAP Language Versions
ABAP programs as well as other repository objects have an attribute called ABAP language version. For an ABAP program, its language version defines the syntax rules and set of repository objects that can be addressed as APIs. For other repository objects the ABAP language version mainly defines the usable APIs.
There are three supported ABAP language versions:
ABAP_STANDARD
ABAP_FOR_CLOUD
ABAP_FOR_KEY_USERS
ABAP_STANDARD covers the entire language scope of ABAP and besides the package concept there are no restrictions for accessing APIs. ABAP_FOR_CLOUD and ABAP_FOR_KEY_USERS are restricted ABAP language versions which are required for certain developments:
ABAP_FOR_CLOUD must be used for developments on an ABAP_PLATFORM_STRICT .
ABAP_FOR_KEY_USERS is used for development objects created using key user apps.
Compared to ABAP_STANDARD , these ABAP language versions are restricted as follows:
The ABAP language scope is limited. See Language Elements in ABAP Versions for a list of ABAP language elements that are allowed in the restricted language versions compared to ABAP_STANDARD .
Access to other repository objects is restricted as follows:
Repository objects with language version ABAP_FOR_KEY_USERS can access objects which are released APIs for key user apps or were created by key user apps and marked for use by other key user apps.
Repository objects with language version ABAP_FOR_CLOUD can access objects which are released APIs for ABAP_FOR_CLOUD or are in the same software component. Objects of a local software component with language version ABAP_FOR_CLOUD can access the objects of all other of their software components with language version ABAP_FOR_CLOUD .
ABAP_STANDARD is an unrestricted ABAP language version .



Latest notes:

The ABAP language version of a repository object can either be set explicitly or is derived implicitly, e.g. from the package or the software component.
For more information about the ABAP language version of an ABAP program see ABAP Language Versions.
NON_V5_HINTS
ABAP_HINT_END

Release Contracts
A repository object can be classified by a release contract. A release contract is the prerequisite for classifying a repository object as a released API that can be accessed in a restricted ABAP language version. It ensures a certain stability regarding consistency and compatibility of repository objects that are released as APIs. For repository objects delivered by SAP, compliance with a release contract is checked by special ATC checks.
The following release contracts are available:
Extend (C0) This contract ensures stability at dedicated extension points to allow for a certain extensibility. Contract C0 is relevant for repository objects that are enhanced by enhancement tools, e.g. of the ABAP Dictionary or ABAP CDS. For more information, see Extend (C0) on SAP Help Portal and Compatibility Rules for the C0 Contract .
Use System-Internally (C1) This contract ensures a technically stable public interface for system-internal use. Existing visible components, for example parameters, elements, or CDS associations, must not be changed in an incompatible way. Optional components might be added later. Contract C1 is relevant for repository objects that are accessed by different ABAP language versions. For more information, see Use System-Internally (C1) .
Use as Remote API (C2) This contract ensures a technically stable public interface for use as remote API. It is similar to C1 but additionally guarantees, that external consumers of the API do not need to be adjusted after an upgrade. Contract C2 is relevant only for external consumption. For more information, see Use as Remote API (C2).
Manage Configuration Content (C3) This contract ensures a stable persistence for own configuration content that can be exported, imported, displayed and edited using dedicated APIs. No key or other fields must be changed. Non-key fields might be added later. Contract C3 is relevant for Business Configuration Tools.
Use in ABAP-Managed Database Procedures (AMDP) (C4) This contract ensures a technically stable public interface for use in ABAP Managed Database Procedures . It is similar to C1 but in contrast to C1, no optional components can be added later. No changes are allowed. Contract C4 is relevant for repository objects that are accessed by AMDP methods, such as AMDP-related BAdI methods. For more information, see Use System-Internally (C4) .
The program ABAP_DOCU_RELEASED_APIS displays a list of repository objects of the current system, that are classified with a release contract.
BEGIN_SECTION SAP_ONLY



Latest notes:

For consistency reasons, a repository object with release contract C1 must be classified as visible for a least one restricted ABAP language version. and thus be released as an API.
Internally at SAP, additional information is available under:
API Release: Release Contracts
API Release: Implemented Checks
NON_V5_HINTS
ABAP_HINT_END
END_SECTION SAP_ONLY

Released APIs
As stated above, repository objects with a restricted ABAP language version cannot freely access other repository objects. Besides some allowed accesses, for example inside the same software component, only access to those repository objects is allowed that are a released API for that language version. Releasing an API for a restricted ABAP language version comprises two classifications:
The repository object must be classified with an appropriate release contract.
The repository object must be classified as visible for the restricted ABAP language version.
Repository objects with release contracts C0 and C1 can be made visible for the restricted ABAP language versions ABAP_FOR_CLOUD and ABAP_FOR_KEY_USERS . For accessing released APIs from other repository objects of certain ABAP language versions, only release contract C1 is relevant.
The classification of a repository object as a released API is part of the development process. The classification must be part of the same software component or even package as the repository object itself. This ensures that APIs can be released only by organizations that are responsible for the repository objects.
See Released APIs for a list of repository objects that are released as APIs in the current system.



Latest notes:

It is recommended that released APIs are subject to an approval process, as it is the case at SAP.
For more information, see Released APIs.
See Working with Released APIs for rules that must be obeyed by providers and consumers.
NON_V5_HINTS
The package concept can also restrict the access to APIs but is not enforced. Package checks are carried out in ABAP Test Cockpit (ATC) and report only package errors that can be determined statically. There are no dynamic checks during the execution of a program.
ABAP_HINT_END