Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SMTG] Add new object type SMTG #633

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
5 changes: 5 additions & 0 deletions file-formats/smtg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SMTG File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.smtg.json` | 1 | [`zif_aff_smtg_v1.intf.abap`](./type/zif_aff_smtg_v1.intf.abap) | [`smtg-v1.json`](./smtg-v1.json)
106 changes: 106 additions & 0 deletions file-formats/smtg/smtg-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"$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/smtg/smtg-v1.json",
"title": "Email Template",
"description": "Email Template",
"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": "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"
]
},
"generalInformation": {
"title": "General Information",
"description": "General information",
"type": "object",
"properties": {
"comment": {
"title": "Comment",
"description": "Comment to that email template",
"type": "string",
"maxLength": 255
},
"isPredelivered": {
"title": "Predelivered",
"description": "Indicator if the template is predelivered",
"type": "boolean"
},
"isPlaintextAutoGenerated": {
"title": "Automatic Text Generation",
"description": "Indicator if the template text body is generated automatically from html body",
"type": "boolean"
},
"cdsView": {
"title": "CDS View",
"description": "The corresponding CDS view name for the template",
"type": "string",
"maxLength": 30
},
"emailSubject": {
"title": "Subject",
"description": "The subject of the email template",
"type": "string",
"maxLength": 1024
}
},
"additionalProperties": false,
"required": [
"cdsView"
]
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"generalInformation"
]
}
45 changes: 45 additions & 0 deletions file-formats/smtg/type/zif_aff_smtg_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
INTERFACE zif_aff_smtg_v1
PUBLIC.

TYPES:
"! <p class="shorttext">General Information</p>
"! Combines template header and administrative data.
BEGIN OF ty_general_information,
"! <p class="shorttext">Comment</p>
"! Comment to that email template
comment TYPE c LENGTH 255,
"! <p class="shorttext">Predelivered</p>
"! Indicator if the template is predelivered
is_predelivered TYPE abap_bool,
"! <p class="shorttext">Automatic Text Generation</p>
"! Indicator if the template text body is generated automatically from html body
is_plaintext_auto_generated TYPE abap_bool,
"! <p class="shorttext">CDS View</p>
"! The corresponding CDS view name for the template
"! $required
cds_view TYPE zif_aff_types_v1=>ty_object_name_30,
"! <p class="shorttext">Subject</p>
"! The subject of the email template
email_subject TYPE c LENGTH 1024,
Markus1812 marked this conversation as resolved.
Show resolved Hide resolved
END OF ty_general_information.


TYPES:
"! <p class="shorttext">Email Template</p>
"! Email Template
BEGIN OF ty_main,
"! <p class="shorttext">Format Version</p>
"! Format version
"! $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,
"! <p class="shorttext">General Information</p>
"! General information
"! $required
general_information TYPE ty_general_information,
END OF ty_main.

ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/smtg/type/zif_aff_smtg_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "test email template file format",
"originalLanguage": "en"
}
}
Loading