diff --git a/file-formats/msag/README.md b/file-formats/msag/README.md new file mode 100644 index 000000000..500665c75 --- /dev/null +++ b/file-formats/msag/README.md @@ -0,0 +1,18 @@ +# Message Class File Format + +## Object Type Information + +Object Type | Description | Group +:--- | :--- | :--- +MSAG | Message Class | Texts + +## File Structure + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.msag.json` | 1 | [`zif_aff_msag_v1.intf.abap`](./type/zif_aff_msag_v1.intf.abap) | [`msag-v1.json`](./msag-v1.json) | [`z_aff_example_msag.msag.json`](./examples/z_aff_example_msag.msag.json) + +--- + +**Note:** +Long text support is not currently included in the ABAP file format. However, support for long text will be added in a future version. diff --git a/file-formats/msag/examples/z_aff_example_msag.msag.json b/file-formats/msag/examples/z_aff_example_msag.msag.json new file mode 100644 index 000000000..ae7e7624f --- /dev/null +++ b/file-formats/msag/examples/z_aff_example_msag.msag.json @@ -0,0 +1,17 @@ +{ + "formatVersion": "1", + "header": { + "description": "Example message class object for ABAP File Formats", + "originalLanguage": "en" + }, + "messages": [ + { + "number": "000", + "text": "Data saved successfully" + }, + { + "number": "001", + "text": "Invalid input: &1" + } + ] +} diff --git a/file-formats/msag/msag-v1.json b/file-formats/msag/msag-v1.json new file mode 100644 index 000000000..f5cee1639 --- /dev/null +++ b/file-formats/msag/msag-v1.json @@ -0,0 +1,72 @@ +{ + "$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/msag/msag-v1.json", + "title": "Message Class Properties", + "description": "Message class properties", + "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 + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "messages": { + "title": "Messages", + "description": "Messages", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Message Properties", + "description": "Message properties", + "type": "object", + "properties": { + "number": { + "title": "Message Number", + "description": "Message number", + "type": "string", + "maxLength": 3 + }, + "text": { + "title": "Short Text", + "description": "Short text", + "type": "string", + "maxLength": 73 + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "messages" + ] +} diff --git a/file-formats/msag/type/zif_aff_msag_v1.intf.abap b/file-formats/msag/type/zif_aff_msag_v1.intf.abap new file mode 100644 index 000000000..27c2a9c61 --- /dev/null +++ b/file-formats/msag/type/zif_aff_msag_v1.intf.abap @@ -0,0 +1,36 @@ +INTERFACE zif_aff_msag_v1 + PUBLIC. + + TYPES: + "!

Message Properties

+ "! Message properties + BEGIN OF ty_message, + "!

Message Number

+ "! Message number + number TYPE c LENGTH 3, + "!

Short Text

+ "! Short text + text TYPE c LENGTH 73, + END OF ty_message. + + "!

Internal table to store messages

+ "! Internal table to store messages + TYPES ty_messages TYPE SORTED TABLE OF ty_message WITH UNIQUE KEY number. + + TYPES: + "!

Message Class Properties

+ "! Message class properties + 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_no_abap_lv, + "!

Messages

+ "! Messages + "! $required + messages TYPE ty_messages, + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/msag/type/zif_aff_msag_v1.intf.json b/file-formats/msag/type/zif_aff_msag_v1.intf.json new file mode 100644 index 000000000..564f2bfe1 --- /dev/null +++ b/file-formats/msag/type/zif_aff_msag_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "AFF type for Message Class Object", + "originalLanguage": "en" + } +}