Skip to content

Add ABAP Language Version #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/user-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ index: false
- [Namespaces](reference/namespaces.md)
- [Packages & Transports](reference/packages.md)
- [Folders & Files](reference/folders-filenames.md)
- [ABAP Language Version](reference/abap-language-version.md)
- [Note Analyzer](reference/note-analyzer.md)
- [APACK](reference/apack.md)
- [Database Utility](reference/database-util.md)
Expand Down
2 changes: 1 addition & 1 deletion src/user-guide/other/where-used.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ order: 50
* [rku.it GmbH](https://www.rku-it.de/)
* [Resulto Consultoria](https://www.resultoconsultoria.com/)
* [SBCG](https://www.sbcg.com.ua/)
* [SE38 IT-Engineering, Neuss, Germany](https://www.se38.de/)
* [SE38 IT-Engineering, Neuss, Germany](http://www.se38.de/)
* [SoftwareONE](https://www.softwareone.com)
* [Tricktresor](https://www.tricktresor.de)
* [Yelcho Systems Consulting](https://www.yelcho.com.au/)
Expand Down
1 change: 1 addition & 0 deletions src/user-guide/reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dir:
- [Namespaces](namespaces.md)
- [Packages & Transports](packages.md)
- [Folders & Files](folders-filenames.md)
- [ABAP Language Version](abap-language-version.md)
- [Note Analyzer](note-analyzer.md)
- [APACK](apack.md)
- [Database Utility](database-util.md)
141 changes: 141 additions & 0 deletions src/user-guide/reference/abap-language-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
---
title: Language Version
category: reference
order: 80
---

## ABAP Language Version

With the 7.52 release, SAP provides the usage of the ABAP language version information in the on-premises world.

abapGit has been enhanced to support consistent handling of the ABAP language version across the different abapGit "flavors" (open-source / part of SAP BTP ABAP Enviromnent).

:::warning
Using ABAP language version in abapGit is still an experimental feature.

So far, abapGit handles ABAP language version only for a limited set of object types. See Supported Object Types, below.
:::

### Settings

There are five possible [settings](/user-guide/repo-settings/dot-abapgit.md) for defining how the ABAP language version is handled by abapGit:

Setting | Description
--------|------------
Any (default) | Object-specific ABAP language version
Ignore | ABAP language version not serialized
Standard ABAP | Only objects with "Standard ABAP" are allowed
ABAP for Key Users | Only objects with "ABAP for Key Users" are allowed
ABAP for Cloud Development | Only objects with "ABAP for Cloud Development" are allowed

### Any ABAP Language Version

If you do not define the ABAP language version (default setting "Any"), you can mix objects of any ABAP language version in a repository.

:::info
This setting is recommended for repositories containing objects of more than one ABAP language version, which you want to preserve during import.
:::

#### Export

When serializing objects, the ABAP language version will be part of the metadata of each object.

#### Import

When deserializing objects, abapGit will set the ABAP language version according to the metadata of each object.

:::warning
The ABAP language version of an object might lead to errors during import or when trying to activate objects. For example, if you try to import "Standard ABAP" into BTP which requires "ABAP for Cloud Development" you might get syntax errors.
:::

### Ignore ABAP Language Version

If you set the ABAP language version to "Ignore" it will not be serialized. This avoids diffs due to variations in development and target environments.

:::info
This setting is recommended for cross-platform repositories with code that runs on-premises and on BTP.
:::

#### Export

When serializing objects, the ABAP language version will *not* be part of the object metadata.

#### Import

When deserializing objects, abapGit will set the ABAP language version according to the target SAP package (software component).

:::warning
The ABAP language version of an object might lead to errors during import or when trying to activate objects.
:::

### Standard ABAP, ABAP for Key Users, ABAP for Cloud Development

If a specific ABAP language version is defined, then all objects in the repository must adhere to this ABAP language version. If not, you will receive an error message.

:::info
This setting is recommended for repositories that support only one platform.
:::

#### Export

When serializing objects, the ABAP language version will be part of the metadata of each object.

#### Import

We distinguish two cases:

1. The root package has the same or an undefined ABAP language version as specified in the repository

When deserializing objects, abapGit will set the ABAP language version according to the setting in the repository.

2. The root package has a different ABAP language version than specified in the repository

When deserializing objects, abapGit will raise an error message alerting you to the mismatch. To import objects, change the ABAP language version of your root package to match the repository. However, this might not be possible since you can't use "Standard ABAP" on BTP, for example.

### Summary

The following table shows the combinations of ABAP language settings of the repository and of the root package used for importing:

Root Package: | Repo:<br>Any or Ignore | Repo:<br>Standard ABAP | Repo:<br>ABAP for Key Users | Repo:<br>ABAP for Cloud Development
---------------------------|---------------------------|-------------------------------|---------------------------------|------------------------------------
Undefined (Any) | <span style="color:blue">(1)</span> | <span style="color:blue">(3)</span> | <span style="color:blue">(3)</span> | <span style="color:blue">(3)</span>
Standard ABAP | <span style="color:blue">(1)</span> | <span style="color:green">(2)</span> | <span style="color:red">(4)</span> | <span style="color:red">(4)</span>
ABAP for Key Users | <span style="color:blue">(1)</span> | <span style="color:red">(4)</span> | <span style="color:green">(2)</span> | <span style="color:red">(4)</span>
ABAP for Cloud Development | <span style="color:blue">(1)</span> | <span style="color:red">(4)</span> | <span style="color:red">(4)</span> | <span style="color:green">(2)</span>

<span style="color:blue">(1) Import possible; success if the root package (system) and the ABAP language version of individual objects are compatible</span>

<span style="color:green">(2) Import possible</span>

<span style="color:blue">(3) Import possible; success if root package (system) supports the ABAP language version of the repository</span>

<span style="color:red">(4) Import not possible; error message</span>

### Examples

If your project uses programs, function modules, or classes not released for ABAP for Cloud Development, set the ABAP language version to "Standard ABAP".
This will ensure that users will not be able to install the project on BTP.

Conversely, if your project uses exclusively objects and code released for ABAP for Key Users or Cloud Development, set the ABAP language version accordingly.
This will ensure that only objects compatible with BTP will be included in your project.

:::info
You can use [abaplint](https://github.com/abaplint/abaplint/blob/main/docs/getting_started.md) to automatically check for compatibility.
:::

### Supported Object Types

So far, handling of ABAP language version is implemented for the following object types:

`CLAS`, `DEVC`, `FUGR`, `INTF`, `PROG`, and objects based on the ABAP file format.

It's planned to support other object types that include the ABAP language version as well.

See [Supported Object Types](./supported.md) for details.

### Further Information

[Standard Documentation](https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenabap_versions.htm)
[Cloud Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenabap_versions.htm)
[Blog and FAQ](https://blogs.sap.com/2022/09/09/abap-language-versions-faqs/)
[Object Types Supporting ABAP Language Version (in general)](https://github.com/abapGit/abapGit/issues/6154#issuecomment-1749086748)
Loading