Skip to content

SAP/abap-file-formats-tools

Repository files navigation

Tools for ABAP File Formats

REUSE status

Description

ABAP file formats rely heavily on JSON Schema that are generated out of ABAP types. This repository provides the tooling to generate such JSON Schema.

Contributing

Comments and suggestions for improvements are most welcome.

More details are found at Contributing.

Licensing

Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

Download & Installation

Pull the source code with abapGit into your ABAP system. The latest abapGit build can be downloaded here.

The development of the ABAP file formats tools takes place in the Z namespace. Coding policies are stated and verified by abaplint, see configuration file here, that run on every pull request.

How to Use

This repository mainly consists of two programs:

  • z_generate_json_schema generates JSON Schemas (minimal requirement is v7.54) from ABAP types
  • z_generate_repo generates files and folder hierarchy for uploading and maintaining the abap-file-formats repository (requires ABAP file format framework)

To add more information to the JSON Schema than that provided by the ABAP type, ABAP Doc is parsed. Different possibilities for adding more information via annotations are listed here.

Additionally to the ABAP-file-formats-related annotations, one can also use the following:

Content Media Type

To specify the content media type of the content of a string field, the annotation

"! $contentMediaType 'mediaType'

followed by the media type surrounded by single quotation marks is used. This annotation can only be used for characters like ABAP types, i.e., types that are mapped to JSON type string.

Content Encoding

The encoding used to store the content of a string field can be specified with the annotation

"! $contentEncoding 'encoding'

followed by the encoding surrounded by single quotation marks. Possible values for the encoding are 7bit, 8bit, binary, quoted-printable, base16, base32 and base64. This annotation can also only be used for characters like ABAP types, i.e., types that are mapped to JSON type string.

How to Obtain Support

Feel free to raise issues to ask questions or report bugs.