Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions file-formats/msag/README.md
Original file line number Diff line number Diff line change
@@ -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
:--- | :--- | :--- | :--- | :---
`<name>.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.
17 changes: 17 additions & 0 deletions file-formats/msag/examples/z_aff_example_msag.msag.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
92 changes: 92 additions & 0 deletions file-formats/msag/msag-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"$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
},
"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"
]
},
"messages": {
"title": "Messages",
"description": "Messages",
"type": "array",
"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"
]
}
36 changes: 36 additions & 0 deletions file-formats/msag/type/zif_aff_msag_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
INTERFACE zif_aff_msag_v1
PUBLIC.

TYPES:
"! <p class="shorttext">Message Properties</p>
"! Message properties
BEGIN OF ty_message,
"! <p class="shorttext">Message Number</p>
"! Message number
number TYPE c LENGTH 3,
"! <p class="shorttext">Short Text</p>
"! Short text
text TYPE c LENGTH 73,
END OF ty_message.

"! <p class="shorttext">Internal table to store messages</p>
"! Internal table to store messages
TYPES ty_messages TYPE STANDARD TABLE OF ty_message WITH DEFAULT KEY.

TYPES:
"! <p class="shorttext">Message Class Properties</p>
"! Message class properties
BEGIN OF ty_main,
"! $required
format_version TYPE zif_aff_types_v1=>ty_format_version,
"! <p class="shorttext">Header</p>
"! Header
"! $required
header TYPE zif_aff_types_v1=>ty_header_60,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more question: What ABAP language versions do you support? ty_header_60 implies the support of language versions standard, key user and cloud development. Is key user supported?

"! <p class="shorttext">Messages</p>
"! Messages
"! $required
messages TYPE ty_messages,
END OF ty_main.

ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/msag/type/zif_aff_msag_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "AFF type for Message Class Object",
"originalLanguage": "en"
}
}
Loading