Skip to content

Commit c6b210f

Browse files
committed
File Format for SRVD (Service Definition)
1 parent 158e208 commit c6b210f

File tree

6 files changed

+267
-0
lines changed

6 files changed

+267
-0
lines changed

file-formats/srvd/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Service Definitions File Format
2+
3+
## Object Type Information
4+
5+
Object Type | Description | Group
6+
:--- | :--- | :---
7+
SRVD | Service Definitions | Business Services
8+
9+
## File Structure
10+
11+
File | Cardinality | Definition | Schema | Example
12+
:--- | :--- | :--- | :--- | :---
13+
`<name>.srvd.json` | 1 | [`zif_aff_srvd_v1.intf.abap`](./type/zif_aff_srvd_v1.intf.abap) | [`srvd-v1.json`](./srvd-v1.json) | [`z_aff_example_srvd.srvd.json`](./examples/z_aff_example_srvd.srvd.json)
14+
`<name>.srvd.acds` | 1 | [CDS](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm) | | [`z_aff_example_srvd.srvd.acds`](./examples/z_aff_example_srvd.srvd.acds)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@EndUserText.label: 'Example'
2+
define service z_aff_example_srvd {
3+
expose z_aff_example_ddls as myEntity;
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"formatVersion": "1",
3+
"header": {
4+
"description": "Example",
5+
"originalLanguage": "en"
6+
},
7+
"generalInformation": {
8+
"sourceOrigin": "abapDevelopmentTools",
9+
"sourceType": "definition"
10+
}
11+
}

file-formats/srvd/srvd-v1.json

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
{
2+
"$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/srvd/srvd-v1.json",
5+
"title": "Service Definition Properties",
6+
"description": "Properties of a Service Definition",
7+
"type": "object",
8+
"properties": {
9+
"formatVersion": {
10+
"title": "ABAP File Format Version",
11+
"description": "The ABAP file format version",
12+
"type": "string",
13+
"const": "1"
14+
},
15+
"header": {
16+
"title": "Header",
17+
"description": "Header",
18+
"type": "object",
19+
"properties": {
20+
"description": {
21+
"title": "Description",
22+
"description": "Description of the ABAP object",
23+
"type": "string",
24+
"maxLength": 60
25+
},
26+
"originalLanguage": {
27+
"title": "Original Language",
28+
"description": "Original language of the ABAP object",
29+
"type": "string",
30+
"minLength": 2
31+
},
32+
"abapLanguageVersion": {
33+
"title": "ABAP Language Version",
34+
"description": "ABAP language version",
35+
"type": "string",
36+
"enum": [
37+
"standard",
38+
"keyUser",
39+
"cloudDevelopment"
40+
],
41+
"enumTitles": [
42+
"Standard",
43+
"ABAP for Key Users",
44+
"ABAP Cloud Development"
45+
],
46+
"enumDescriptions": [
47+
"Standard",
48+
"ABAP for key user extensibility",
49+
"ABAP cloud development"
50+
],
51+
"default": "standard"
52+
}
53+
},
54+
"additionalProperties": false,
55+
"required": [
56+
"description",
57+
"originalLanguage"
58+
]
59+
},
60+
"generalInformation": {
61+
"title": "General Info",
62+
"description": "General metadata",
63+
"type": "object",
64+
"properties": {
65+
"sourceOrigin": {
66+
"title": "Source Origin",
67+
"description": "Source origin",
68+
"type": "string",
69+
"enum": [
70+
"abapDevelopmentTools",
71+
"customCdsViews",
72+
"customAnalyticalQueries",
73+
"customBusinessObject",
74+
"customCodeList",
75+
"customCdsViewsVariantConfg",
76+
"customFields",
77+
"extensionsForDataSources",
78+
"customSearchModeler",
79+
"serviceConsumptionModel"
80+
],
81+
"enumTitles": [
82+
"ABAP Development Tools",
83+
"Custom CDS Views",
84+
"Custom Analytical Queries",
85+
"Custom Business Object",
86+
"Custom Code List",
87+
"Custom CDS Views for Variant Configurations",
88+
"Custom Fields",
89+
"Extensions for Data Sources",
90+
"Custom Search Modeler",
91+
"Service Consumption Model"
92+
],
93+
"enumDescriptions": [
94+
"ABAP Development Tools",
95+
"Custom CDS views",
96+
"Custom analytical queries",
97+
"Custom business object",
98+
"Custom code list",
99+
"Custom CDS views for variant configurations",
100+
"Custom fields",
101+
"Extensions for data sources",
102+
"Custom search modeler",
103+
"Service Consumption Model"
104+
],
105+
"default": "customFields"
106+
},
107+
"sourceType": {
108+
"title": "Source Type",
109+
"description": "Source Type",
110+
"type": "string",
111+
"enum": [
112+
"definition",
113+
"extension"
114+
],
115+
"enumTitles": [
116+
"Definition",
117+
"Extension"
118+
],
119+
"enumDescriptions": [
120+
"Definition",
121+
"Extension"
122+
],
123+
"default": "definition"
124+
}
125+
},
126+
"additionalProperties": false
127+
}
128+
},
129+
"additionalProperties": false,
130+
"required": [
131+
"formatVersion",
132+
"header",
133+
"generalInformation"
134+
]
135+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
INTERFACE zif_aff_srvd_v1
2+
PUBLIC.
3+
4+
"! <p class="shorttext">Source Type</p>
5+
"! States which statement is used in the service definition
6+
"! $values {@link zif_aff_srvd_v1.data:co_source_type}
7+
"! $default {@link zif_aff_srvd_v1.data:co_source_type.definition}
8+
TYPES ty_source_type TYPE c LENGTH 1.
9+
10+
"! <p class="shorttext">Source Origin</p>
11+
"! States which tool was used to created the service definition
12+
"! $values {@link zif_aff_srvd_v1.data:co_source_origin}
13+
"! $default {@link zif_aff_srvd_v1.data:co_source_origin.custom_fields}
14+
TYPES ty_source_origin TYPE c LENGTH 1.
15+
16+
CONSTANTS:
17+
"! <p class="shorttext">Source Type Values</p>
18+
"! Allowed values for source type
19+
BEGIN OF co_source_type,
20+
"! <p class="shorttext">Definition</p>
21+
"! Definition
22+
definition TYPE ty_source_type VALUE 'S',
23+
"! <p class="shorttext">Extension</p>
24+
"! Extension
25+
extension TYPE ty_source_type VALUE 'X',
26+
END OF co_source_type,
27+
28+
"! <p class="shorttext">Source Origin Values</p>
29+
"! Allowed values for source origin
30+
BEGIN OF co_source_origin,
31+
"! <p class="shorttext">ABAP Development Tools</p>
32+
"! ABAP Development Tools
33+
abap_development_tools TYPE ty_source_origin VALUE '0',
34+
"! <p class="shorttext">Custom CDS Views</p>
35+
"! Custom CDS views
36+
custom_cds_views TYPE ty_source_origin VALUE '1',
37+
"! <p class="shorttext">Custom Analytical Queries</p>
38+
"! Custom analytical queries
39+
custom_analytical_queries TYPE ty_source_origin VALUE '2',
40+
"! <p class="shorttext">Custom Business Object</p>
41+
"! Custom business object
42+
custom_business_object TYPE ty_source_origin VALUE '3',
43+
"! <p class="shorttext">Custom Code List</p>
44+
"! Custom code list
45+
custom_code_list TYPE ty_source_origin VALUE '4',
46+
"! <p class="shorttext">Custom CDS Views for Variant Configurations</p>
47+
"! Custom CDS views for variant configurations
48+
custom_cds_views_variant_confg TYPE ty_source_origin VALUE '5',
49+
"! <p class="shorttext">Custom Fields</p>
50+
"! Custom fields
51+
custom_fields TYPE ty_source_origin VALUE '6',
52+
"! <p class="shorttext">Extensions for Data Sources</p>
53+
"! Extensions for data sources
54+
extensions_for_data_sources TYPE ty_source_origin VALUE '7',
55+
"! <p class="shorttext">Custom Search Modeler</p>
56+
"! Custom search modeler
57+
custom_search_modeler TYPE ty_source_origin VALUE '8',
58+
"! <p class="shorttext">Service Consumption Model</p>
59+
"! Service Consumption Model
60+
service_consumption_model TYPE ty_source_origin VALUE '9',
61+
END OF co_source_origin.
62+
63+
64+
TYPES:
65+
"! <p class="shorttext">General Information</p>
66+
"! Metadata for the service definition
67+
BEGIN OF ty_general,
68+
"! <p class="shorttext">Source Origin</p>
69+
"! Source origin
70+
"! $values {@link zif_aff_srvd_v1.data:co_source_origin}
71+
"! $default {@link zif_aff_srvd_v1.data:co_source_origin.custom_fields}
72+
source_origin TYPE ty_source_origin,
73+
"! <p class="shorttext">Source Type</p>
74+
"! Source Type
75+
"! $values {@link zif_aff_srvd_v1.data:co_source_type}
76+
"! $default {@link zif_aff_srvd_v1.data:co_source_type.definition}
77+
source_type TYPE ty_source_type,
78+
END OF ty_general,
79+
80+
"! <p class="shorttext">Service Definition Properties</p>
81+
"! Properties of a Service Definition
82+
BEGIN OF ty_main,
83+
"! $required
84+
format_version TYPE zif_aff_types_v1=>ty_format_version,
85+
"! <p class="shorttext">Header</p>
86+
"! Header
87+
"! $required
88+
header TYPE zif_aff_types_v1=>ty_header_60,
89+
"! <p class="shorttext">General Info</p>
90+
"! General metadata
91+
"! $required
92+
general_information TYPE ty_general,
93+
94+
END OF ty_main.
95+
96+
ENDINTERFACE.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"formatVersion": "1",
3+
"header": {
4+
"description": "AFF type for SRVD objects",
5+
"originalLanguage": "en"
6+
}
7+
}

0 commit comments

Comments
 (0)