From 049f71eb8944ac1410c22a3024f412b6384e7a2d Mon Sep 17 00:00:00 2001 From: Dominik Fuchs Date: Tue, 1 Jul 2025 11:34:52 +0200 Subject: [PATCH 1/2] dcls abap file format --- file-formats/dcls/README.md | 14 +++++ file-formats/dcls/dcls-v1.json | 56 +++++++++++++++++++ .../examples/z_aff_example_dcls.dcls.acds | 5 ++ .../examples/z_aff_example_dcls.dcls.json | 7 +++ .../dcls/type/zif_aff_dcls_v1.intf.abap | 16 ++++++ .../dcls/type/zif_aff_dcls_v1.intf.json | 7 +++ 6 files changed, 105 insertions(+) create mode 100644 file-formats/dcls/README.md create mode 100644 file-formats/dcls/dcls-v1.json create mode 100644 file-formats/dcls/examples/z_aff_example_dcls.dcls.acds create mode 100644 file-formats/dcls/examples/z_aff_example_dcls.dcls.json create mode 100644 file-formats/dcls/type/zif_aff_dcls_v1.intf.abap create mode 100644 file-formats/dcls/type/zif_aff_dcls_v1.intf.json diff --git a/file-formats/dcls/README.md b/file-formats/dcls/README.md new file mode 100644 index 000000000..7518c716a --- /dev/null +++ b/file-formats/dcls/README.md @@ -0,0 +1,14 @@ +# ABAP Data Control Language Source File Format + +## Object Type Information + +Object Type | Description | Group +:--- | :--- | :--- +DCLS | ABAP Data Control Language Source | Core Data Services + +## File Structure + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.dcls.json` | 1 | [`zif_aff_dcls_v1.intf.abap`](./type/zif_aff_dcls_v1.intf.abap) | [`dcls-v1.json`](./dcls-v1.json) | [`z_aff_example_dcls.dcls.json`](./examples/zdf_dcl1.dcls.json) +`.ddla.acds` | 1 | [CDS](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm) | | [`z_aff_example_dcls.dcls.acds`](./examples/abapcatalog.ddla.acds) diff --git a/file-formats/dcls/dcls-v1.json b/file-formats/dcls/dcls-v1.json new file mode 100644 index 000000000..c7daf1719 --- /dev/null +++ b/file-formats/dcls/dcls-v1.json @@ -0,0 +1,56 @@ +{ + "$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/dcls/dcls-v1.json", + "title": "ABAP Data Control Language Source", + "description": "Attributes of the Data Control Language Source", + "type": "object", + "properties": { + "formatVersion": { + "title": "ABAP File Format Version", + "description": "The ABAP file format version", + "type": "string", + "const": "1" + }, + "header": { + "title": "Header", + "description": "Header", + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "Description of the ABAP object", + "type": "string", + "maxLength": 60 + }, + "originalLanguage": { + "title": "Original Language", + "description": "Original language of the ABAP object", + "type": "string", + "minLength": 2 + }, + "abapLanguageVersion": { + "title": "ABAP Language Version", + "description": "ABAP language version", + "type": "string", + "enum": ["standard", "keyUser", "cloudDevelopment"], + "enumTitles": [ + "Standard", + "ABAP for Key Users", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP for key user extensibility", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": ["description", "originalLanguage"] + } + }, + "additionalProperties": false, + "required": ["formatVersion", "header"] +} diff --git a/file-formats/dcls/examples/z_aff_example_dcls.dcls.acds b/file-formats/dcls/examples/z_aff_example_dcls.dcls.acds new file mode 100644 index 000000000..be21bc4a2 --- /dev/null +++ b/file-formats/dcls/examples/z_aff_example_dcls.dcls.acds @@ -0,0 +1,5 @@ +define role z_aff_example_dcls { + grant select on z_aff_example_ddls + where + z_aff_example_ddls.carrid = 'LH'; +} diff --git a/file-formats/dcls/examples/z_aff_example_dcls.dcls.json b/file-formats/dcls/examples/z_aff_example_dcls.dcls.json new file mode 100644 index 000000000..699101eb0 --- /dev/null +++ b/file-formats/dcls/examples/z_aff_example_dcls.dcls.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "Example DCLS for ABAP file formats", + "originalLanguage": "en" + } +} diff --git a/file-formats/dcls/type/zif_aff_dcls_v1.intf.abap b/file-formats/dcls/type/zif_aff_dcls_v1.intf.abap new file mode 100644 index 000000000..588a6497d --- /dev/null +++ b/file-formats/dcls/type/zif_aff_dcls_v1.intf.abap @@ -0,0 +1,16 @@ +INTERFACE zif_aff_dcls_v1 + PUBLIC. + + TYPES: + "!

ABAP Data Control Language Source

+ "! Attributes of the Data Control Language Source + BEGIN OF ty_main, + "! $required + format_version TYPE zif_aff_types_v1=>ty_format_version, + "!

Header

+ "! Header + "! $required + header TYPE zif_aff_types_v1=>ty_header_60, + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/dcls/type/zif_aff_dcls_v1.intf.json b/file-formats/dcls/type/zif_aff_dcls_v1.intf.json new file mode 100644 index 000000000..30a8c0045 --- /dev/null +++ b/file-formats/dcls/type/zif_aff_dcls_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "AFF type for DCLS objects", + "originalLanguage": "en" + } +} From 9f6cde54d81d8b5fd89578906fafed0fa59c64c3 Mon Sep 17 00:00:00 2001 From: Dominik Fuchs Date: Thu, 3 Jul 2025 10:20:24 +0200 Subject: [PATCH 2/2] corrections --- file-formats/dcls/README.md | 4 ++-- file-formats/dcls/dcls-v1.json | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/file-formats/dcls/README.md b/file-formats/dcls/README.md index 7518c716a..9dcabdfc1 100644 --- a/file-formats/dcls/README.md +++ b/file-formats/dcls/README.md @@ -10,5 +10,5 @@ DCLS | ABAP Data Control Language Source | Core Data Services File | Cardinality | Definition | Schema | Example :--- | :--- | :--- | :--- | :--- -`.dcls.json` | 1 | [`zif_aff_dcls_v1.intf.abap`](./type/zif_aff_dcls_v1.intf.abap) | [`dcls-v1.json`](./dcls-v1.json) | [`z_aff_example_dcls.dcls.json`](./examples/zdf_dcl1.dcls.json) -`.ddla.acds` | 1 | [CDS](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm) | | [`z_aff_example_dcls.dcls.acds`](./examples/abapcatalog.ddla.acds) +`.dcls.json` | 1 | [`zif_aff_dcls_v1.intf.abap`](./type/zif_aff_dcls_v1.intf.abap) | [`dcls-v1.json`](./dcls-v1.json) | [`z_aff_example_dcls.dcls.json`](./examples/z_aff_example_dcls.dcls.json) +`.ddla.acds` | 1 | [CDS](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm) | | [`z_aff_example_dcls.dcls.acds`](./examples/z_aff_example_dcls.dcls.acds) diff --git a/file-formats/dcls/dcls-v1.json b/file-formats/dcls/dcls-v1.json index c7daf1719..2d267bac1 100644 --- a/file-formats/dcls/dcls-v1.json +++ b/file-formats/dcls/dcls-v1.json @@ -33,7 +33,11 @@ "title": "ABAP Language Version", "description": "ABAP language version", "type": "string", - "enum": ["standard", "keyUser", "cloudDevelopment"], + "enum": [ + "standard", + "keyUser", + "cloudDevelopment" + ], "enumTitles": [ "Standard", "ABAP for Key Users", @@ -48,9 +52,15 @@ } }, "additionalProperties": false, - "required": ["description", "originalLanguage"] + "required": [ + "description", + "originalLanguage" + ] } }, "additionalProperties": false, - "required": ["formatVersion", "header"] + "required": [ + "formatVersion", + "header" + ] }