|
| 1 | +--- |
| 2 | +title: Language Version |
| 3 | +category: reference |
| 4 | +order: 80 |
| 5 | +--- |
| 6 | + |
| 7 | +## ABAP Language Version |
| 8 | + |
| 9 | +With the 7.52 release, SAP provides the usage of the ABAP language version information in the on-premises world. |
| 10 | + |
| 11 | +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). |
| 12 | + |
| 13 | +:::warning |
| 14 | +Using ABAP language version in abapGit is still an experimental feature. |
| 15 | + |
| 16 | +So far, abapGit handles ABAP language version only for a limited set of object types. See Supported Object Types, below. |
| 17 | +::: |
| 18 | + |
| 19 | +### Settings |
| 20 | + |
| 21 | +There are five possible [settings](/user-guide/repo-settings/dot-abapgit.md) for defining how the ABAP language version is handled by abapGit: |
| 22 | + |
| 23 | +Setting | Description |
| 24 | +--------|------------ |
| 25 | +Any (default) | Object-specific ABAP language version |
| 26 | +Ignore | ABAP language version not serialized |
| 27 | +Standard ABAP | Only objects with "Standard ABAP" are allowed |
| 28 | +ABAP for Key Users | Only objects with "ABAP for Key Users" are allowed |
| 29 | +ABAP for Cloud Development | Only objects with "ABAP for Cloud Development" are allowed |
| 30 | + |
| 31 | +### Any ABAP Language Version |
| 32 | + |
| 33 | +If you do not define the ABAP language version (default setting "Any"), you can mix objects of any ABAP language version in a repository. |
| 34 | + |
| 35 | +:::info |
| 36 | +This setting is recommended for repositories containing objects of more than one ABAP language version, which you want to preserve during import. |
| 37 | +::: |
| 38 | + |
| 39 | +#### Export |
| 40 | + |
| 41 | +When serializing objects, the ABAP language version will be part of the metadata of each object. |
| 42 | + |
| 43 | +#### Import |
| 44 | + |
| 45 | +When deserializing objects, abapGit will set the ABAP language version according to the metadata of each object. |
| 46 | + |
| 47 | +:::warning |
| 48 | +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. |
| 49 | +::: |
| 50 | + |
| 51 | +### Ignore ABAP Language Version |
| 52 | + |
| 53 | +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. |
| 54 | + |
| 55 | +:::info |
| 56 | +This setting is recommended for cross-platform repositories with code that runs on-premises and on BTP. |
| 57 | +::: |
| 58 | + |
| 59 | +#### Export |
| 60 | + |
| 61 | +When serializing objects, the ABAP language version will *not* be part of the object metadata. |
| 62 | + |
| 63 | +#### Import |
| 64 | + |
| 65 | +When deserializing objects, abapGit will set the ABAP language version according to the target SAP package (software component). |
| 66 | + |
| 67 | +:::warning |
| 68 | +The ABAP language version of an object might lead to errors during import or when trying to activate objects. |
| 69 | +::: |
| 70 | + |
| 71 | +### Standard ABAP, ABAP for Key Users, ABAP for Cloud Development |
| 72 | + |
| 73 | +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. |
| 74 | + |
| 75 | +:::info |
| 76 | +This setting is recommended for repositories that support only one platform. |
| 77 | +::: |
| 78 | + |
| 79 | +#### Export |
| 80 | + |
| 81 | +When serializing objects, the ABAP language version will be part of the metadata of each object. |
| 82 | + |
| 83 | +#### Import |
| 84 | + |
| 85 | +We distinguish two cases: |
| 86 | + |
| 87 | +1. The root package has the same or an undefined ABAP language version as specified in the repository |
| 88 | + |
| 89 | + When deserializing objects, abapGit will set the ABAP language version according to the setting in the repository. |
| 90 | + |
| 91 | +2. The root package has a different ABAP language version than specified in the repository |
| 92 | + |
| 93 | + 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. |
| 94 | + |
| 95 | +### Summary |
| 96 | + |
| 97 | +The following table shows the combinations of ABAP language settings of the repository and of the root package used for importing: |
| 98 | + |
| 99 | +Root Package: | Repo:<br>Any or Ignore | Repo:<br>Standard ABAP | Repo:<br>ABAP for Key Users | Repo:<br>ABAP for Cloud Development |
| 100 | +---------------------------|---------------------------|-------------------------------|---------------------------------|------------------------------------ |
| 101 | +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> |
| 102 | +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> |
| 103 | +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> |
| 104 | +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> |
| 105 | + |
| 106 | +<span style="color:blue">(1) Import possible; success if the root package (system) and the ABAP language version of individual objects are compatible</span> |
| 107 | + |
| 108 | +<span style="color:green">(2) Import possible</span> |
| 109 | + |
| 110 | +<span style="color:blue">(3) Import possible; success if root package (system) supports the ABAP language version of the repository</span> |
| 111 | + |
| 112 | +<span style="color:red">(4) Import not possible; error message</span> |
| 113 | + |
| 114 | +### Examples |
| 115 | + |
| 116 | +If your project uses programs, function modules, or classes not released for ABAP for Cloud Development, set the ABAP language version to "Standard ABAP". |
| 117 | +This will ensure that users will not be able to install the project on BTP. |
| 118 | + |
| 119 | +Conversely, if your project uses exclusively objects and code released for ABAP for Key Users or Cloud Development, set the ABAP language version accordingly. |
| 120 | +This will ensure that only objects compatible with BTP will be included in your project. |
| 121 | + |
| 122 | +:::info |
| 123 | +You can use [abaplint](https://github.com/abaplint/abaplint/blob/main/docs/getting_started.md) to automatically check for compatibility. |
| 124 | +::: |
| 125 | + |
| 126 | +### Supported Object Types |
| 127 | + |
| 128 | +So far, handling of ABAP language version is implemented for the following object types: |
| 129 | + |
| 130 | +`CLAS`, `DEVC`, `FUGR`, `INTF`, `PROG`, and objects based on the ABAP file format. |
| 131 | + |
| 132 | +It's planned to support other object types that include the ABAP language version as well. |
| 133 | + |
| 134 | +See [Supported Object Types](./supported.md) for details. |
| 135 | + |
| 136 | +### Further Information |
| 137 | + |
| 138 | +[Standard Documentation](https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenabap_versions.htm) |
| 139 | +[Cloud Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenabap_versions.htm) |
| 140 | +[Blog and FAQ](https://blogs.sap.com/2022/09/09/abap-language-versions-faqs/) |
| 141 | +[Object Types Supporting ABAP Language Version (in general)](https://github.com/abapGit/abapGit/issues/6154#issuecomment-1749086748) |
0 commit comments