diff --git a/file-formats/edot/README.md b/file-formats/edot/README.md new file mode 100644 index 000000000..b45aae709 --- /dev/null +++ b/file-formats/edot/README.md @@ -0,0 +1,5 @@ +# EDOT File Format + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.edot.json` | 1 | [`zif_aff_edot_v1.intf.abap`](./type/zif_aff_edot_v1.intf.abap) | [`edot-v1.json`](./edot-v1.json) | [`z_aff_example_edot.edot.json`](./examples/z_aff_example_edot.edot.json) diff --git a/file-formats/edot/edot-v1.json b/file-formats/edot/edot-v1.json new file mode 100644 index 000000000..868ea6516 --- /dev/null +++ b/file-formats/edot/edot-v1.json @@ -0,0 +1,153 @@ +{ + "$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/edot/edot-v1.json", + "title": "eDocument Type", + "description": "eDocument type", + "type": "object", + "properties": { + "formatVersion": { + "title": "Format Version", + "description": "Format version", + "type": "string", + "const": "1" + }, + "header": { + "title": "Header", + "description": "Header", + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "eDocument type description", + "type": "string", + "maxLength": 30 + }, + "originalLanguage": { + "title": "Original Language", + "description": "Original language of the eDocument type", + "type": "string", + "minLength": 2 + }, + "abapLanguageVersion": { + "title": "ABAP Language Version", + "description": "ABAP language version", + "type": "string", + "enum": [ + "standard", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "generalInformation": { + "title": "General Information", + "description": "General information", + "type": "object", + "properties": { + "table": { + "title": "eDocument Table", + "description": "eDocument table", + "type": "string", + "maxLength": 30 + }, + "preprocessBeforeArchiving": { + "title": "Preprocess Before Archiving", + "description": "Preprocess before archiving", + "type": "boolean" + }, + "createdInContingencyMode": { + "title": "Created in Contingency Mode", + "description": "Created in contingency mode", + "type": "boolean" + }, + "contingencyEdocType": { + "title": "Contingency eDocument Type", + "description": "Contingency eDocument type", + "type": "string", + "maxLength": 10 + } + }, + "additionalProperties": false + }, + "readAccessLoggingSettings": { + "title": "Read Access Logging Settings", + "description": "Read access logging settings", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Read Access Loggging Settings", + "description": "Read access logging settings", + "type": "object", + "properties": { + "fileType": { + "title": "File Type", + "description": "File type", + "type": "string", + "maxLength": 10 + }, + "fileStructure": { + "title": "File Structure", + "description": "File structure", + "type": "string", + "maxLength": 30 + }, + "fileDescription": { + "title": "File Description", + "description": "File description", + "type": "string", + "maxLength": 60 + } + }, + "additionalProperties": false, + "required": [ + "fileType", + "fileStructure" + ] + } + }, + "additionalTables": { + "title": "Additional Tables", + "description": "Additional tables", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Additional Table", + "description": "Additional eDocument table", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "eDocument additional table name", + "type": "string", + "maxLength": 30 + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "generalInformation" + ] +} diff --git a/file-formats/edot/examples/z_aff_example_edot.edot.json b/file-formats/edot/examples/z_aff_example_edot.edot.json new file mode 100644 index 000000000..b4642dbe6 --- /dev/null +++ b/file-formats/edot/examples/z_aff_example_edot.edot.json @@ -0,0 +1,22 @@ +{ + "formatVersion": "1", + "header": { + "description": "Example EDOT for file formats", + "originalLanguage": "en" + }, + "generalInformation": { + "table": "EDOFRINV" + }, + "readAccessLoggingSettings": [ + { + "fileType": "REQUEST", + "fileStructure": "EDO_FR_INV_INVOICE_TYPE", + "fileDescription": "eDocument France: Invoice Request" + } + ], + "additionalTables": [ + { + "name": "EDOFRINV1" + } + ] +} diff --git a/file-formats/edot/type/zif_aff_edot_v1.intf.abap b/file-formats/edot/type/zif_aff_edot_v1.intf.abap new file mode 100644 index 000000000..ac2b89d9c --- /dev/null +++ b/file-formats/edot/type/zif_aff_edot_v1.intf.abap @@ -0,0 +1,95 @@ +"!

AFF for eDocument Type (EDOT)

+"! eDocument types that can be used in eInvoice process +INTERFACE zif_aff_edot_v1 + PUBLIC. + + TYPES: + "!

Read Access Loggging Settings

+ "! Read access logging settings + BEGIN OF ty_read_access_logging_setting, + "!

File Type

+ "! File type + "! $required + file_type TYPE c LENGTH 10, + "!

File Structure

+ "! File structure + "! $required + file_structure TYPE c LENGTH 30, + "!

File Description

+ "! File description + file_description TYPE c LENGTH 60, + END OF ty_read_access_logging_setting. + "!

Read Access Logging Settings

+ "! Read access logging settings + TYPES ty_read_acc_logging_settings TYPE SORTED TABLE OF ty_read_access_logging_setting WITH UNIQUE KEY file_type. + TYPES: + "!

Additional Table

+ "! Additional eDocument table + BEGIN OF ty_additional_table, + "!

Name

+ "! eDocument additional table name + "! $required + name TYPE zif_aff_types_v1=>ty_object_name_30, + END OF ty_additional_table. + "!

Additional Tables

+ "! Additional eDocument tables + TYPES ty_additional_tables TYPE SORTED TABLE OF ty_additional_table WITH UNIQUE KEY name. + TYPES: + "!

General Information

+ "! General information + BEGIN OF ty_general_information, + "!

eDocument Table

+ "! eDocument table + table TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Preprocess Before Archiving

+ "! Preprocess before archiving + preprocess_before_archiving TYPE abap_bool, + "!

Created in Contingency Mode

+ "! Created in contingency mode + created_in_contingency_mode TYPE abap_bool, + "!

Contingency eDocument Type

+ "! Contingency eDocument type + contingency_edoc_type TYPE c LENGTH 10, + END OF ty_general_information. + TYPES: + "!

Header for EDOT object

+ "! The header for an ABAP main object (without source code) with a description of 30 characters (no key user) + BEGIN OF ty_header_30_cloud, + "!

Description

+ "! eDocument type description + "! $required + description TYPE c LENGTH 30, + "!

Original Language

+ "! Original language of the eDocument type + "! $required + original_language TYPE sy-langu, + "!

ABAP Language Version

+ "! ABAP language version + "! $values {@link zif_aff_types_v1.data:co_abap_language_version_cloud} + "! $default {@link zif_aff_types_v1.data:co_abap_language_version_cloud.standard} + abap_language_version TYPE zif_aff_types_v1=>ty_abap_language_version_cloud, + END OF ty_header_30_cloud. + TYPES: + "!

eDocument Type

+ "! eDocument type + BEGIN OF ty_main, + "!

Format Version

+ "! Format version + "! $required + format_version TYPE zif_aff_types_v1=>ty_format_version, + "!

Header

+ "! Header + "! $required + header TYPE ty_header_30_cloud, + "!

General Information

+ "! General information + "! $required + general_information TYPE ty_general_information, + "!

Read Access Logging Settings

+ "! Read access logging settings + read_access_logging_settings TYPE ty_read_acc_logging_settings, + "!

Additional Tables

+ "! Additional tables + additional_tables TYPE ty_additional_tables, + END OF ty_main. +ENDINTERFACE. diff --git a/file-formats/edot/type/zif_aff_edot_v1.intf.json b/file-formats/edot/type/zif_aff_edot_v1.intf.json new file mode 100644 index 000000000..ab06b1e48 --- /dev/null +++ b/file-formats/edot/type/zif_aff_edot_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "AFF for eDocument Type (EDOT)", + "originalLanguage": "en" + } +}