From e915de7a4a17d1e0e4c26a288354091ea1310de4 Mon Sep 17 00:00:00 2001 From: Lars Hvam Date: Thu, 30 Jul 2026 08:06:13 +0200 Subject: [PATCH 1/2] new doc AFF support --- .../public/img/aff-support-approach.svg | 71 +++++++++++++++++++ src/development-guide/README.md | 1 + src/development-guide/serializers/README.md | 1 + src/development-guide/serializers/aff.md | 21 ++++++ .../serializers/task-list.md | 10 +-- 5 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 src/.vuepress/public/img/aff-support-approach.svg create mode 100644 src/development-guide/serializers/aff.md diff --git a/src/.vuepress/public/img/aff-support-approach.svg b/src/.vuepress/public/img/aff-support-approach.svg new file mode 100644 index 000000000..b39afebc7 --- /dev/null +++ b/src/.vuepress/public/img/aff-support-approach.svg @@ -0,0 +1,71 @@ + + Suggested approach for adding AFF support + A four-stage flow reads legacy XML into an AFF interface structure, persists the SAP object, and serializes it as AFF JSON while preserving backwards compatibility. + + + + + + + + + + + + Backwards-compatible migration to AFF + + + + + + + + + <XML /> + Legacy abapGit file + Keep readable + for existing repositories + + { AFF } + INTF data structure + Map every field + without data loss + + + + + + + SAP object + Create or update + + { JSON } + AFF file + Write the new + canonical format + + + + + + + + READ + + SAVE + + WRITE + + + + + Compatibility guarantee + Read old formats · write AFF · preserve all data + diff --git a/src/development-guide/README.md b/src/development-guide/README.md index e38637d3c..63c57f87a 100644 --- a/src/development-guide/README.md +++ b/src/development-guide/README.md @@ -22,6 +22,7 @@ Development related information - [Overview](serializers/overview.md) - [Serializer Class](serializers/serializers.md) - [New Serializers](serializers/task-list.md) +- [Adding AFF support](serializers/aff.md) - [File Naming and Formats](serializers/file-formats.md) ### Testing diff --git a/src/development-guide/serializers/README.md b/src/development-guide/serializers/README.md index 2c0198a44..2084b2dee 100644 --- a/src/development-guide/serializers/README.md +++ b/src/development-guide/serializers/README.md @@ -12,4 +12,5 @@ dir: - [Overview](overview.md) - [Serializer Class](serializers.md) - [New Serializers](task-list.md) +- [Adding AFF support](aff.md) - [File Naming and Formats](file-formats.md) diff --git a/src/development-guide/serializers/aff.md b/src/development-guide/serializers/aff.md new file mode 100644 index 000000000..91f7458bd --- /dev/null +++ b/src/development-guide/serializers/aff.md @@ -0,0 +1,21 @@ +--- +title: Adding AFF support +category: serializers +order: 35 +--- + +The [ABAP File Format (AFF)](https://github.com/SAP/abap-file-formats) is the preferred +format for object types for which SAP provides an AFF object handler. + +For implementing AFF support for new object types already supported by AFF see the examples in the repository. + +abapGit has been backwards compatible for 10+ years, and whishes to continue to support all users going forward. +This means reading old formats and writing new formats, and not breaking existing users, and users should not loose any data when switching to a new format. + +Suggested approach: + +* Read the old XML into the new AFF format carried by the INTF, https://github.com/abapGit/abapGit/tree/main/src/objects/aff_types +* Persist the object given the data in the INTF +* Serialize the object to AFF format + +Make sure to test and keep old and new examples in https://github.com/orgs/abapGit-tests diff --git a/src/development-guide/serializers/task-list.md b/src/development-guide/serializers/task-list.md index c5d4cdbed..7f01ef869 100644 --- a/src/development-guide/serializers/task-list.md +++ b/src/development-guide/serializers/task-list.md @@ -22,9 +22,11 @@ The following list includes the mandatory and recommended tasks for adding a new abapGit maintainers will add your issue to a [central list](https://github.com/abapGit/abapGit/issues/5912) and, if there's no further discussion required, close it. ::: -3. Implement the serializer class - - Follow the instructions below. Often, it makes sense to use an existing serializer class as a template. This can save a lot of work especially if the new object type is similar to others. +3. Implement the serializer class + + Follow the instructions below. Often, it makes sense to use an existing serializer class as a template. This can save a lot of work especially if the new object type is similar to others. + + If SAP provides an ABAP File Format object handler for the object type, follow [Adding AFF support](aff.md). ::: warning Your code must comply with the [development guidelines](/development-guide/read-first/guidelines.md) for abapGit. Most notably your code must be compatible with 7.02 ABAP syntax and available standard SAP objects, use prefixing of variables, be pretty-printed, and pass all abaplint checks. @@ -48,7 +50,7 @@ You might get lots of abaplint errors. If you are uncertain how to resolve these Fork the abapGit repository and add a branch for your serializer class. Commit your implementation (the `zcl_abapgit_object_` class) to the branch, and create a pull request to the abapGit repository. Reference your issue in the pull request and add a link to the test repository. - Note: Object types using the ABAP File Format must be added to the [AFF Registry](https://github.com/abapGit/abapGit/blob/d0167ff97dcf6f90ed2721c40d194a5fb34f3ea0/src/objects/aff/zcl_abapgit_aff_registry.clas.abap#L51-L61) as well. + Note: Object types using the ABAP File Format must be added to the [AFF Registry](aff.md#register-the-object-type) as well. 7. Update documentation From 605af15774fdc1199a591858d8dd77375b800827 Mon Sep 17 00:00:00 2001 From: Lars Hvam <5888506+larshp@users.noreply.github.com> Date: Thu, 30 Jul 2026 08:23:26 +0200 Subject: [PATCH 2/2] Delete src/.vuepress/public/img/aff-support-approach.svg --- .../public/img/aff-support-approach.svg | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 src/.vuepress/public/img/aff-support-approach.svg diff --git a/src/.vuepress/public/img/aff-support-approach.svg b/src/.vuepress/public/img/aff-support-approach.svg deleted file mode 100644 index b39afebc7..000000000 --- a/src/.vuepress/public/img/aff-support-approach.svg +++ /dev/null @@ -1,71 +0,0 @@ - - Suggested approach for adding AFF support - A four-stage flow reads legacy XML into an AFF interface structure, persists the SAP object, and serializes it as AFF JSON while preserving backwards compatibility. - - - - - - - - - - - - Backwards-compatible migration to AFF - - - - - - - - - <XML /> - Legacy abapGit file - Keep readable - for existing repositories - - { AFF } - INTF data structure - Map every field - without data loss - - - - - - - SAP object - Create or update - - { JSON } - AFF file - Write the new - canonical format - - - - - - - - READ - - SAVE - - WRITE - - - - - Compatibility guarantee - Read old formats · write AFF · preserve all data -