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
Consistent handling of ABAP Language Version during pull/push #6154
Comments
a. Dont serialize ALV to files |
Appreciate the initiative, Thomas 🙏 a. agree |
b. IMHO, require users to always create packages manually, we cannot automatically determine things like transport route/layer |
Somewhat off topic, I am seeing the use of the acronym ALV for ABAP Language Version here for the first time. Is that a fixed term? (Many people might get confused with the ABAP List Viewer :P ) |
Not it is not - but often used inside SAP. It can easily cause confusion because of the ABAP List Viewer. We should not use it here. |
so, it turns out that in on-prem it is possible to have a package with mixed ALVs, ie. ignoring the field in serialization would loose information. the nice world would be developers using the ALV on package level so perhaps, by default ignore ALV, but have a setting(in hmm |
The language version on package level is just the "default" when creating new development objects in that package. |
The language version "ABAP for cloud development" on package level is enforced if the package is part of a software component that uses ABAP language version 5. |
Just as a reference. There was a discussion on the topic related to ABAP language version and ABAP file formats in issue SAP/abap-file-formats#44 |
Yes, this is possible. @BeckerWdf confirmed the same. This was also the reason why I wanted this field (at least as optional information) per object in the ABAP file formats. There we need the possibility to ensure to keep the ABAP language version of an object. I guess, it wouldn't be an issue to specify the ABAP language version per object (as it is for other object-specific property) if there weren't the need to work with repositories in different releases (releases which support the ABAP language version as property and releases which don't). This situation would lead to the fact that abapGit serializes object differently (dependent on the release). Same situation as for other fields which might be introduced in later releases, but are unknown in lower releases. Since ABAP language version affects a broad range of object types this might lead to diffs for almost all objects in a repository. :( |
I am in favour in storing the ABAP language version per object (since it is a property of the object). However, I can understand the issue with the serialization/large diffs. Therefore, I guess @larshp's proposal to provide a configuration in the repository could be a solution for abapGit. If this approach is taken, we should be aware of the implications if no ABAP language version is not serialized (due to the setting):
In any case, we would need a clear contract for abapGit how objects are deserialized in systems which support ABAP language version if the ABAP language version was not specified for the object. |
Maybe if the field is not available, serialize ABAP Language Version "Standard ABAP", if it is available, serialize the one in the system? Then we'll have a one time diff for every repo when this logic is applied, but not on each pull / commit when a repo is used in two different systems. |
We want to build an ecosystem where its easy to share and contribute to code. Eg. if I implement a cool Fibonacci algorithm in 702, then it should be possible to pull it to Steampunk, and vice versa, without causing too many diffs. Currently abapGit does not enforce/carry information as to which syntax or statements that are used, its a job for CI to check. Also, what are the recommendations from SAP on how to build nice systems, eg. I'd guess its nice to have ALV enforced via the software component? Whereas having mixed ALVs should not be a recommended setup? |
I had following situation in mind: One developer works in a system which supports ABAP language version (e.g. in the Cloud) and another developer in a system which doesn't support it (e.g. 7.50). This would lead to a diff for all affected object, wouldn't it? |
yea, which breaks the ecosystem, as the contribution from a developer on 750 with ALV=standard, cannot be accepted if the author develops on ALV=cloud, even though all syntax and API calls are compatible (assuming the developers use tooling from SAP, and there are no additional process steps) |
Recommendation is to go for "ABAP Cloud" and not mixed (per software component). ;) |
SAP offers max flexibility by allowing a different ALV for each object. Mixing ALVs in package/swc might be necessary to support SAP legacy scenarios but that does not mean it's a good practice for custom developments nor does it mean that abapGit must support such questionable practices. It's similar to the "original language" of objects. Sure you could mix English, German, and French objects in a package. But it's not a good idea. For abapGit we decided to define/fix the main language at repo level which enforces the good practice. Is there any reasonable use case where a repo must support mixed ALVs (note: different branches can still have different settings)? If not, there's no need for abapGit to support it. How about these options for a repository setting:
When serializing, objects with an ALV that does not match the repo settings are marked as "not supported" (handled the same as unsupported object types). When deserializing objects, ALV is set according to the following rules:
|
I can imagine users want to go for "ABAP Cloud", but it hasn't been possible (yet) to change all code to ABAP cloud. E.g., some objects still require to call functionality which is not released by SAP. I am not sure whether you want to move these to a dedicated repository (with a different language version).
Actually, ABAP language version "cloudDevelopment" works on-premise, too. This ABAP language version indicates this code can run in the cloud. It does not mean "cloud-only".
@mbtools If I I understand your proposal, "cross platform" means it is compatible with both, but you want to set the same ABAP language version for all objects in the repository. Right? |
I see the mixed case then as a customer-specific choice that is not relevant for the ecosystem or for moving code to steampunk (which needs "all cloud"). Pretty much "inner-source". Diffs to other systems won't matter. If that should be supported, ALV must be serialized for each object. Could be another repo setting "object-specific ALV". You might be right and we won't need "cross-platform". I'm not sure if all steampunk-compatible code runs on an on-prem of the same ABAP release. There's certainly a delay until new cloud features/object types/apis reach "on-prem". If there's compatibility today, is this something that SAP will keep up in the future? Any public statements from SAP about this? As a developer if I see "Cross-platform" (or "On-prem & BTP"), it's very clear, that it must run on both. If I see "Cloud", I have no expectation of what happens if I try to run it "On-prem"). A separate setting might make sense to have clear intentions and expectations. It would also help when searching for a solution across the ecosystem. |
When looking at the discussion I see that various versions of terms are used to describe the name of the ABAP language versions.
or in an ABAP style
|
Yes, I thought that scenario wouldn't apply as the 750 developer would have to "blindly" develop compatible code without accidentally using unreleased APIs or disabled ABAP statements. But I guess there is other tooling available to check for compatibility without the syntax check which would rely on the ABAP Language Version. |
@fabianlupa in general true and tooling would be a necessity. at the same time, there are also many "open-source ABAP libraries" to be invented which would not rely on any or only well known APIs. |
I agree, we shouldn't use different terms in the discussion. I suggest to use the same values as they are defined in the ABAP file formats |
Following blog states that ABAP Cloud was released also for the on premise edition of SAP S/4HANA 2022. However, you are right. Release cycles of the cloud editions is faster than the on-premise editions. Therefore, there are already APIs in the cloud editions which are not (yet) available in on-premise. |
todo, update https://docs.abapgit.org/development/serializers.html todo, split into concrete development tasks |
Just want to give you a short overview about the raised pull requests:
|
Looks good to me. There's also the case where you create a repo in AG with a new, not existing package. The package is created with the first pull and should inherit the repo ALaV setting. Need to check if this works. Which SAP releases contain |
Object types supporting ABAP language version: ADVC, AIFC, AOBJ, APLO, AUTH, BDEF, BGQC, CACC, CCAC, CDBO, CFDA, CGRC, CHDO, CHKC, CHKE, CHKO, CHKV, CLAS, DCLS, DDLS, DDLX, DEVC, DMON, DOBJ, DOMA, DRAS, DRTY, DSFD, DSFI, DTDC, DTEB, DTEL, EEEC, EEEP, ENHO, ENHS, ENQU, EVTB, FUGR, G4BA, G4BS, GCPM, GSMP, HTTP, ILMB, INA1, INTF, IWMO, IWOM, IWSG, IWSV, IWVB, LRCC, NONT, NROB, NTTA, NTTY, OA2S, PCFN, RONT, SAJC, SAJT, SKTD, SMBC, SMIM, SOD1, SOD2, SQL1, SRVB, SRVC, SRVD, SUSH, SUSO, TABL, TOBJ, TRPR, TTYP, UIAD, WAPA, WB2J, WMPC, XINX, XSLT |
Included in #6476: Supported by abapGit but will need ALAV handling: |
Ref abapGit/docs.abapgit.org#184 Issues:
Suggestion:
|
After some internal discussions on how to deal with this repo-setting on Steampunk, we came to a similar proposal like the "Lars Mode":
We are aware that the 2nd part leaves a bad taste in the mouth but it still seems the better alternative. Otherwise developers intending to use tier 1 extensibility (ABAP Cloud compliant) also in SAP S/4HANA Private Cloud Edition or on-premise would have to be mindful to explicitly set their abapGit repo to "Cloud". If they forgot this small but important step, the ALaV setting on individual objects will be missing on the target system and the whole application will not be usable. |
Closing this with #6689 as a follow-up Any problems, just create a new issue |
Dear abapGit community,
With the 7.52 release, SAP provides the usage of the ALV (ABAP language version) information in the onPrem world.
In order to support a consistent handling of the ALV across the different abapGit "flavours" (Open Source / part of SAP BTP ABAP), we are currently working on a concept/proposal (also referring to issue #5921).
The idea is to use this issue to discuss the topic and its boundary conditions as well as collect feedback.
Further links:
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenabap_versions.htm
https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenabap_versions.htm
https://blogs.sap.com/2022/09/09/abap-language-versions-faqs/
The text was updated successfully, but these errors were encountered: