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