Skip to content

Commit 31636d3

Browse files
authored
New type was added to hold the table placeholders for content HTML and plain text
1 parent 5003eb0 commit 31636d3

File tree

2 files changed

+48
-17
lines changed

2 files changed

+48
-17
lines changed

file-formats/smtg/smtg-v1.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,24 @@
9696
"cdsView",
9797
"emailSubject"
9898
]
99+
},
100+
"emailTemplateContent": {
101+
"title": "Email Template Content",
102+
"description": "Email Template Content",
103+
"type": "array",
104+
"items": {
105+
"title": "Email Template Content",
106+
"description": "Displays the HTML und plain text template content.",
107+
"type": "object",
108+
"properties": {
109+
"name": {
110+
"title": "Name",
111+
"description": "Name",
112+
"type": "string"
113+
}
114+
},
115+
"additionalProperties": false
116+
}
99117
}
100118
},
101119
"additionalProperties": false,
Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,60 @@
1-
INTERFACE zif_aff_smtg_v1
2-
PUBLIC.
1+
interface zif_aff_smtg_v1
2+
public.
33

4-
TYPES:
4+
types:
55
"! <p class="shorttext">General Information</p>
66
"! Combines template header and administrative data.
7-
BEGIN OF ty_general_information,
7+
begin of ty_general_information,
88
"! <p class="shorttext">Template Description</p>
99
"! Long description to that email template
10-
template_description TYPE c LENGTH 255,
10+
template_description type c length 255,
1111
"! <p class="shorttext">CDS View</p>
1212
"! The corresponding CDS view name for the template
1313
"! $required
14-
cds_view TYPE zif_aff_types_v1=>ty_object_name_30,
14+
cds_view type zif_aff_types_v1=>ty_object_name_30,
1515
"! <p class="shorttext">Predelivered</p>
1616
"! Indicator if the template is predelivered
17-
is_predelivered TYPE abap_bool,
17+
is_predelivered type abap_bool,
1818
"! <p class="shorttext">Subject</p>
1919
"! The subject of the email template
2020
"! $required
21-
email_subject TYPE c LENGTH 255,
21+
email_subject type c length 255,
2222
"! <p class="shorttext">Generate Plain Text from HTML</p>
2323
"! Indicator if the template text body is generated automatically from html body
24-
is_plaintext_auto_generated TYPE abap_bool,
25-
END OF ty_general_information.
24+
is_plaintext_auto_generated type abap_bool,
25+
end of ty_general_information.
2626
" Corresponding content ist stored in a separate file and implemented as action
2727

28+
types:
29+
"! <p class="shorttext">Email Template Content</p>
30+
"! Displays the HTML und plain text template content.
31+
begin of ty_template_content,
32+
"! <p class="shorttext">Name</p>
33+
"! Name
34+
name type string,
35+
end of ty_template_content.
36+
types:
37+
tyt_template_content type standard table of ty_template_content with empty key.
2838

29-
TYPES:
39+
types:
3040
"! <p class="shorttext">Email Template</p>
3141
"! Email Template
32-
BEGIN OF ty_main,
42+
begin of ty_main,
3343
"! <p class="shorttext">Format Version</p>
3444
"! Format version
3545
"! $required
36-
format_version TYPE zif_aff_types_v1=>ty_format_version,
46+
format_version type zif_aff_types_v1=>ty_format_version,
3747
"! <p class="shorttext">Header</p>
3848
"! Header
3949
"! $required
40-
header TYPE zif_aff_types_v1=>ty_header_60,
50+
header type zif_aff_types_v1=>ty_header_60,
4151
"! <p class="shorttext">General Information</p>
4252
"! General information
4353
"! $required
44-
general_information TYPE ty_general_information,
45-
END OF ty_main.
54+
general_information type ty_general_information,
55+
"! <p class="shorttext">Email Template Content</p>
56+
"! Email Template Content
57+
email_template_content type tyt_template_content,
58+
end of ty_main.
4659

47-
ENDINTERFACE.
60+
endinterface.

0 commit comments

Comments
 (0)