Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 14 additions & 0 deletions file-formats/srvd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Service Definitions File Format

## Object Type Information

Object Type | Description | Group
:--- | :--- | :---
SRVD | Service Definitions | Business Services

## File Structure

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<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)
`<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)
4 changes: 4 additions & 0 deletions file-formats/srvd/examples/z_aff_example_srvd.srvd.acds
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@EndUserText.label: 'Example'
define service z_aff_example_srvd {
expose z_aff_example_ddls as myEntity;
}
11 changes: 11 additions & 0 deletions file-formats/srvd/examples/z_aff_example_srvd.srvd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"formatVersion": "1",
"header": {
"description": "Example",
"originalLanguage": "en"
},
"generalInformation": {
"sourceOrigin": "abapDevelopmentTools",
"sourceType": "definition"
}
}
135 changes: 135 additions & 0 deletions file-formats/srvd/srvd-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"$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/srvd/srvd-v1.json",
"title": "Service Definition Properties",
"description": "Properties of a Service Definition",
"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"
]
},
"generalInformation": {
"title": "General Information",
"description": "General information",
"type": "object",
"properties": {
"sourceOrigin": {
"title": "Source Origin",
"description": "Source Origin states which tool was used to create the service definition",
"type": "string",
"enum": [
"abapDevelopmentTools",
"customCdsViews",
"customAnalyticalQueries",
"customBusinessObject",
"customCodeList",
"customCdsViewsVariantConfg",
"customFields",
"extensionsForDataSources",
"customSearchModeler",
"serviceConsumptionModel"
],
"enumTitles": [
"ABAP Development Tools",
"Custom CDS Views",
"Custom Analytical Queries",
"Custom Business Object",
"Custom Code List",
"Custom CDS Views for Variant Configurations",
"Custom Fields",
"Extensions for Data Sources",
"Custom Search Modeler",
"Service Consumption Model"
],
"enumDescriptions": [
"ABAP Development Tools",
"Custom CDS views",
"Custom analytical queries",
"Custom business object",
"Custom code list",
"Custom CDS views for variant configurations",
"Custom fields",
"Extensions for data sources",
"Custom search modeler",
"Service Consumption Model"
],
"default": "abapDevelopmentTools"
},
"sourceType": {
"title": "Source Type",
"description": "Source type states which statement is in the service definition.",
"type": "string",
"enum": [
"definition",
"extension"
],
"enumTitles": [
"Definition",
"Extension"
],
"enumDescriptions": [
"Definition",
"Extension"
],
"default": "definition"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"generalInformation"
]
}
96 changes: 96 additions & 0 deletions file-formats/srvd/type/zif_aff_srvd_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
INTERFACE zif_aff_srvd_v1
PUBLIC.

"! <p class="shorttext">Source Type</p>
"! States which statement is used in the service definition
"! $values {@link zif_aff_srvd_v1.data:co_source_type}
"! $default {@link zif_aff_srvd_v1.data:co_source_type.definition}
TYPES ty_source_type TYPE c LENGTH 1.

"! <p class="shorttext">Source Origin</p>
"! States which tool was used to create the service definition
"! $values {@link zif_aff_srvd_v1.data:co_source_origin}
"! $default {@link zif_aff_srvd_v1.data:co_source_origin.abap_development_tools}
TYPES ty_source_origin TYPE c LENGTH 1.

CONSTANTS:
"! <p class="shorttext">Source Type Values</p>
"! Allowed values for source type
BEGIN OF co_source_type,
"! <p class="shorttext">Definition</p>
"! Definition
definition TYPE ty_source_type VALUE 'S',
"! <p class="shorttext">Extension</p>
"! Extension
extension TYPE ty_source_type VALUE 'X',
END OF co_source_type,

"! <p class="shorttext">Source Origin Values</p>
"! Allowed values for source origin
BEGIN OF co_source_origin,
"! <p class="shorttext">ABAP Development Tools</p>
"! ABAP Development Tools
abap_development_tools TYPE ty_source_origin VALUE '0',
"! <p class="shorttext">Custom CDS Views</p>
"! Custom CDS views
custom_cds_views TYPE ty_source_origin VALUE '1',
"! <p class="shorttext">Custom Analytical Queries</p>
"! Custom analytical queries
custom_analytical_queries TYPE ty_source_origin VALUE '2',
"! <p class="shorttext">Custom Business Object</p>
"! Custom business object
custom_business_object TYPE ty_source_origin VALUE '3',
"! <p class="shorttext">Custom Code List</p>
"! Custom code list
custom_code_list TYPE ty_source_origin VALUE '4',
"! <p class="shorttext">Custom CDS Views for Variant Configurations</p>
"! Custom CDS views for variant configurations
custom_cds_views_variant_confg TYPE ty_source_origin VALUE '5',
"! <p class="shorttext">Custom Fields</p>
"! Custom fields
custom_fields TYPE ty_source_origin VALUE '6',
"! <p class="shorttext">Extensions for Data Sources</p>
"! Extensions for data sources
extensions_for_data_sources TYPE ty_source_origin VALUE '7',
"! <p class="shorttext">Custom Search Modeler</p>
"! Custom search modeler
custom_search_modeler TYPE ty_source_origin VALUE '8',
"! <p class="shorttext">Service Consumption Model</p>
"! Service Consumption Model
service_consumption_model TYPE ty_source_origin VALUE '9',
END OF co_source_origin.


TYPES:
"! <p class="shorttext">General Information</p>
"! Metadata for the service definition
BEGIN OF ty_general_information,
"! <p class="shorttext">Source Origin</p>
"! Source Origin states which tool was used to create the service definition
"! $values {@link zif_aff_srvd_v1.data:co_source_origin}
"! $default {@link zif_aff_srvd_v1.data:co_source_origin.abap_development_tools}
source_origin TYPE ty_source_origin,
"! <p class="shorttext">Source Type</p>
"! Source type states which statement is in the service definition.
"! $values {@link zif_aff_srvd_v1.data:co_source_type}
"! $default {@link zif_aff_srvd_v1.data:co_source_type.definition}
source_type TYPE ty_source_type,
END OF ty_general_information,

"! <p class="shorttext">Service Definition Properties</p>
"! Properties of a Service Definition
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,
"! <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/srvd/type/zif_aff_srvd_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "AFF type for SRVD objects",
"originalLanguage": "en"
}
}
Loading