From 2cd0a39c93c00482d91d3c93039ea5d8e44b53e3 Mon Sep 17 00:00:00 2001 From: srnawaz <119303175+srnawaz@users.noreply.github.com> Date: Tue, 26 Sep 2023 11:47:29 +0530 Subject: [PATCH] [ILMB] Add New Object ILMB (#536) * Add Files For ILMB * React to AbapLint * React to Abaplint * React to abaplint * Add Files - Changes to merge direct and indirect condition fields into one entry * ILMB - Added Indirect Value Determination for Condition fields * Remove example * UX review changes * Uploading unzipped files as per UX review * UX Review changes * Add files via upload * Add files via upload * Add files via upload * Remove unnessecary files * Redo change of README.md --------- Co-authored-by: Michael Schneider Co-authored-by: Katharina Wurz Co-authored-by: KARSUV <145652202+KARSUV@users.noreply.github.com> --- file-formats/ilmb/README.md | 5 + file-formats/ilmb/ilmb-v1.json | 198 ++++++++++++++++++ .../ilmb/type/zif_aff_ilmb_v1.intf.abap | 108 ++++++++++ .../ilmb/type/zif_aff_ilmb_v1.intf.json | 7 + 4 files changed, 318 insertions(+) create mode 100644 file-formats/ilmb/README.md create mode 100644 file-formats/ilmb/ilmb-v1.json create mode 100644 file-formats/ilmb/type/zif_aff_ilmb_v1.intf.abap create mode 100644 file-formats/ilmb/type/zif_aff_ilmb_v1.intf.json diff --git a/file-formats/ilmb/README.md b/file-formats/ilmb/README.md new file mode 100644 index 000000000..ab84e5765 --- /dev/null +++ b/file-formats/ilmb/README.md @@ -0,0 +1,5 @@ +# ILMB File Format + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.ilmb.json` | 1 | [`zif_aff_ilmb_v1.intf.abap`](./type/zif_aff_ilmb_v1.intf.abap) | [`ilmb-v1.json`](./ilmb-v1.json) diff --git a/file-formats/ilmb/ilmb-v1.json b/file-formats/ilmb/ilmb-v1.json new file mode 100644 index 000000000..23f7f9c4e --- /dev/null +++ b/file-formats/ilmb/ilmb-v1.json @@ -0,0 +1,198 @@ +{ + "$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/ilmb/ilmb-v1.json", + "title": "ILM Object", + "description": "ILM object (ILMB) v1", + "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", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "destructionObject": { + "title": "Destruction Object", + "description": "Mapping ILM object to data destruction object", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name", + "type": "string", + "maxLength": 30 + } + }, + "additionalProperties": false + }, + "timeReferences": { + "title": "Time References", + "description": "Value determination for time references", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Time Reference Details", + "description": "Time reference details", + "type": "object", + "properties": { + "timeReference": { + "title": "Time Reference", + "description": "Time reference", + "type": "string", + "maxLength": 30 + }, + "sourceTable": { + "title": "Source Table", + "description": "Source table", + "type": "string", + "maxLength": 30 + }, + "sourceField": { + "title": "Source Field", + "description": "Source field", + "type": "string", + "maxLength": 30 + }, + "indirectValue": { + "title": "Indirect Value Determination", + "description": "Indirect Value Determination", + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "timeReference", + "sourceTable", + "sourceField" + ] + } + }, + "conditionFields": { + "title": "Condition Fields", + "description": "Condition fields for direct value determination", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Condition Field Details", + "description": "Condition field details", + "type": "object", + "properties": { + "conditionField": { + "title": "Condition Field", + "description": "Condition field", + "type": "string", + "maxLength": 30 + }, + "description": { + "title": "Description", + "description": "Description of condition field", + "type": "string", + "maxLength": 60 + }, + "dataElement": { + "title": "Data Element", + "description": "Data element", + "type": "string", + "maxLength": 30 + }, + "sourceTable": { + "title": "Source Table", + "description": "Source table", + "type": "string", + "maxLength": 30 + }, + "sourceField": { + "title": "Source Field", + "description": "Source field", + "type": "string", + "maxLength": 30 + }, + "indirectValue": { + "title": "Indirect Value Determination", + "description": "Indirect Value Determination", + "type": "boolean" + }, + "noIntervals": { + "title": "No Intervals", + "description": "No intervals", + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "conditionField", + "sourceTable", + "sourceField" + ] + } + }, + "callbackClass": { + "title": "Value Determination Callback Class", + "description": "Value determination callback class", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name", + "type": "string", + "maxLength": 30 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "destructionObject", + "timeReferences", + "conditionFields", + "callbackClass" + ] +} diff --git a/file-formats/ilmb/type/zif_aff_ilmb_v1.intf.abap b/file-formats/ilmb/type/zif_aff_ilmb_v1.intf.abap new file mode 100644 index 000000000..42d1547d3 --- /dev/null +++ b/file-formats/ilmb/type/zif_aff_ilmb_v1.intf.abap @@ -0,0 +1,108 @@ +INTERFACE zif_aff_ilmb_v1 + PUBLIC. + + TYPES: + "!

Condition Field Details

+ "! Condition field details + BEGIN OF ty_cond_field, + "!

Condition Field

+ "! Condition field + "! $required + condition_field TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Description

+ "! Description of condition field + description TYPE zif_aff_types_v1=>ty_description_60, + "!

Data Element

+ "! Data element + data_element TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Source Table

+ "! Source table + "! $required + source_table TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Source Field

+ "! Source field + "! $required + source_field TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Indirect Value Determination

+ "! Indirect Value Determination + indirect_value TYPE abap_bool, + "!

No Intervals

+ "! No intervals + no_intervals TYPE abap_bool, + END OF ty_cond_field, + "!

Condition Fields

+ "! Condition fields + ty_cond_fields TYPE SORTED TABLE OF ty_cond_field WITH UNIQUE KEY condition_field source_table source_field. + + TYPES: + "!

ILM

+ "! Destruction object + BEGIN OF ty_destruction_object, + "!

Name

+ "! Name + name TYPE zif_aff_types_v1=>ty_object_name_30, + END OF ty_destruction_object. + + TYPES: + "!

Class

+ "! Callback class + BEGIN OF ty_callback_class, + "!

Name

+ "! Name + name TYPE zif_aff_types_v1=>ty_object_name_30, + END OF ty_callback_class. + + TYPES: + "!

Time Reference Details

+ "! Time reference details + BEGIN OF ty_time_reference, + "!

Time Reference

+ "! Time reference + "! $required + time_reference TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Source Table

+ "! Source table + "! $required + source_table TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Source Field

+ "! Source field + "! $required + source_field TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Indirect Value Determination

+ "! Indirect Value Determination + indirect_value TYPE abap_bool, + END OF ty_time_reference, + "!

Time References

+ "! Time references + ty_time_references TYPE SORTED TABLE OF ty_time_reference WITH UNIQUE KEY time_reference source_table + source_field. + + TYPES: + "!

ILM Object

+ "! ILM object (ILMB) v1 + 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_cloud, + "!

Destruction Object

+ "! Mapping ILM object to data destruction object + "! $required + destruction_object TYPE ty_destruction_object, + "!

Time References

+ "! Value determination for time references + "! $required + time_references TYPE ty_time_references, + "!

Condition Fields

+ "! Condition fields for direct value determination + "! $required + condition_fields TYPE ty_cond_fields, + "!

Value Determination Callback Class

+ "! Value determination callback class + "! $required + callback_class TYPE ty_callback_class, + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/ilmb/type/zif_aff_ilmb_v1.intf.json b/file-formats/ilmb/type/zif_aff_ilmb_v1.intf.json new file mode 100644 index 000000000..a2fea941a --- /dev/null +++ b/file-formats/ilmb/type/zif_aff_ilmb_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "Interface with the ILMB AFF Type", + "originalLanguage": "en" + } +}