diff --git a/file-formats/ddlx/README.md b/file-formats/ddlx/README.md new file mode 100644 index 000000000..ed7f01ed6 --- /dev/null +++ b/file-formats/ddlx/README.md @@ -0,0 +1,7 @@ +# DDLX File Format + + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.ddlx.json` | 1 | [`zif_aff_ddlx_v1.intf.abap`](./type/zif_aff_ddlx_v1.intf.abap) | [`ddlx-v1.json`](./ddlx-v1.json) | [`z_aff_example_ddlx.ddlx.json`](./examples/z_aff_example_ddlx.ddlx.json) +`.ddlx.acds` | 1 | [CDS](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm) | | [`z_aff_example_ddlx.ddlx.acds`](./examples/z_aff_example_ddlx.ddlx.acds) diff --git a/file-formats/ddlx/ddlx-v1.json b/file-formats/ddlx/ddlx-v1.json new file mode 100644 index 000000000..e9eb7872d --- /dev/null +++ b/file-formats/ddlx/ddlx-v1.json @@ -0,0 +1,68 @@ +{ + "$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/ddlx/ddlx-v1.json", + "title": "Object Type DDLX", + "description": "DDLX object type", + "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, + "maxLength": 2, + "pattern": "^[a-z]+$" + }, + "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/ddlx/examples/z_aff_example_ddlx.ddlx.acds b/file-formats/ddlx/examples/z_aff_example_ddlx.ddlx.acds new file mode 100644 index 000000000..daed7a254 --- /dev/null +++ b/file-formats/ddlx/examples/z_aff_example_ddlx.ddlx.acds @@ -0,0 +1,5 @@ +@Metadata.layer: #CORE +annotate entity Z_AFF_EXAMPLE_DDLX with { + @EndUserText.label: 'Carrier ID' + Carrid; +} diff --git a/file-formats/ddlx/examples/z_aff_example_ddlx.ddlx.json b/file-formats/ddlx/examples/z_aff_example_ddlx.ddlx.json new file mode 100644 index 000000000..f5e12ea8f --- /dev/null +++ b/file-formats/ddlx/examples/z_aff_example_ddlx.ddlx.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "Example DDLX for AFF", + "originalLanguage": "en" + } +} diff --git a/file-formats/ddlx/type/zif_aff_ddlx_v1.intf.abap b/file-formats/ddlx/type/zif_aff_ddlx_v1.intf.abap new file mode 100644 index 000000000..fd05fda11 --- /dev/null +++ b/file-formats/ddlx/type/zif_aff_ddlx_v1.intf.abap @@ -0,0 +1,16 @@ +INTERFACE zif_aff_ddlx_v1 + PUBLIC. + + TYPES: + "!

Object Type DDLX

+ "! DDLX object type + 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/ddlx/type/zif_aff_ddlx_v1.intf.json b/file-formats/ddlx/type/zif_aff_ddlx_v1.intf.json new file mode 100644 index 000000000..557f5f872 --- /dev/null +++ b/file-formats/ddlx/type/zif_aff_ddlx_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "Aff type for DDLX objects", + "originalLanguage": "en" + } +}