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

[RVBC] Add new object type RVBC #677

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
af85a4a
Add files of RVBC
RuixingYangSAP Dec 5, 2024
a324124
correct field names
RuixingYangSAP Dec 5, 2024
f2bc15e
Update file-formats/rvbc/type/zif_aff_rvbc_v1.intf.abap
RuixingYangSAP Dec 5, 2024
e160107
align fields via abap cleaner
RuixingYangSAP Dec 5, 2024
22ca0d8
remove dependent external type
RuixingYangSAP Dec 5, 2024
2a871e1
correct type ty_extensibility_mode
RuixingYangSAP Dec 5, 2024
fffb0a1
correct other external types
RuixingYangSAP Dec 5, 2024
f3cdc04
fix external type spras
RuixingYangSAP Dec 5, 2024
ee0138f
replace spras with ty_main_language
RuixingYangSAP Dec 5, 2024
c00980a
adapt AFF according to the review suggetions
RuixingYangSAP Dec 9, 2024
b4ccb92
change predefined_ina1_service description
RuixingYangSAP Dec 10, 2024
4f7d654
add id field; remove unnecessary annotation $required for several fields
RuixingYangSAP Dec 11, 2024
278d422
change the header description in the json file
RuixingYangSAP Dec 11, 2024
e2da001
change type ty_source, ty_status, ty_consistency_status from code typ…
RuixingYangSAP Dec 11, 2024
07528c2
correct the types from text type back to code type; add necessary con…
RuixingYangSAP Dec 12, 2024
3fbd1d4
delete unnecessary type ty_booklet_id
RuixingYangSAP Dec 12, 2024
fbd17c7
remove ID and type field of INA service and related types
RuixingYangSAP Dec 19, 2024
41a06c7
change back INA related fields to structure on root level
RuixingYangSAP Dec 19, 2024
8df33e0
add example
RuixingYangSAP Dec 19, 2024
5464239
change CRLF to LF in example json file
RuixingYangSAP Dec 19, 2024
2c1064d
add ending LF to example json
RuixingYangSAP Dec 19, 2024
87f68db
delete unnecessary abaplanguageversion field
RuixingYangSAP Dec 19, 2024
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
5 changes: 5 additions & 0 deletions file-formats/rvbc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# RVBC File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.rvbc.json` | 1 | [`zif_aff_rvbc_v1.intf.abap`](./type/zif_aff_rvbc_v1.intf.abap) | [`rvbc-v1.json`](./rvbc-v1.json)
Copy link
Contributor

Choose a reason for hiding this comment

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

Link to the example file is missing

20 changes: 20 additions & 0 deletions file-formats/rvbc/examples/z_aff_example_rvbc.rvbc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"formatVersion": "1",
"header": {
"description": "Example RVBC for ABAP File Formats",
"originalLanguage": "en"
},
"bookletDefinition": {
"application": "test.app.adt.editor",
"source": "predefined",
"status": "draft",
Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned in our call, I am wondering whether the draft is the same as active/inactive handling in ABAP

"consistencyStatus": "consistent",
Copy link
Contributor

Choose a reason for hiding this comment

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

similar question here:
Usually, in ABAP tools, consistency is checked using syntax-check or (maybe) ATC checks. It is nothing which is stored in the object data. Could I just change it to "inconsistent" in the editor ;)

"extensibilityMode": "supportedPredefinedQueries"
},
"predefinedIna1Service": {
"ina1Service": "UI_INA_TST_FLIGHT_SERVBIND"
},
"customIna1Service": {
"ina1Service": "YY1_TEST_INA1"
}
}
196 changes: 196 additions & 0 deletions file-formats/rvbc/rvbc-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
{
"$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/rvbc/rvbc-v1.json",
"title": "Object Type RVBC",
"description": "Object type RVBC",
"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"
]
},
"bookletDefinition": {
"title": "Booklet Definition",
"description": "Booklet definition",
"type": "object",
"properties": {
"application": {
"title": "Application ID",
"description": "Application ID",
"type": "string",
"maxLength": 70
},
"source": {
"title": "Source",
"description": "Source",
"type": "string",
"enum": [
"predefined",
"custom"
],
"enumTitles": [
"Predefined",
"Custom"
],
"enumDescriptions": [
"Predefined",
"Custom"
],
"default": "predefined"
},
"status": {
"title": "Status",
"description": "Status",
"type": "string",
"enum": [
"draft",
"final"
],
"enumTitles": [
"Draft",
"Final"
],
"enumDescriptions": [
"Draft",
"Final"
],
"default": "draft"
},
"consistencyStatus": {
"title": "Consistency Status",
"description": "Consistency status",
"type": "string",
"enum": [
"checkRequired",
"consistent",
"error"
],
"enumTitles": [
"Consistency Check Is Required",
"Consistent",
"Error"
],
"enumDescriptions": [
"Consistency check is required",
"Consistent",
"Error"
],
"default": "checkRequired"
},
"extensibilityMode": {
"title": "Extensibility Mode",
"description": "Extensibility mode",
"type": "string",
"enum": [
"fullySupported",
"supportedPredefinedQueries",
"notSupported"
],
"enumTitles": [
"Fully Supported Including Custom Analytical Queries",
"Supported Only for Predefined Analytical Queries",
"Not Supported"
],
"enumDescriptions": [
"Fully supported including custom analytical queries",
"Supported only for predefined analytical queries",
"Not supported"
],
"default": "notSupported"
}
},
"additionalProperties": false,
"required": [
"application",
"extensibilityMode"
]
},
"predefinedIna1Service": {
"title": "Predefined InA Service",
"description": "Predefined InA service",
"type": "object",
"properties": {
"ina1Service": {
"title": "Service Name",
"description": "Service name",
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false,
"required": [
"ina1Service"
]
},
"customIna1Service": {
"title": "Custom InA Service",
"description": "Custom InA service",
"type": "object",
"properties": {
"ina1Service": {
"title": "Service Name",
"description": "Service name",
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false,
"required": [
"ina1Service"
]
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header"
]
}
122 changes: 122 additions & 0 deletions file-formats/rvbc/type/zif_aff_rvbc_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
"! AFF type for the object RVBC ( Review Booklets )
INTERFACE zif_aff_rvbc_v1
PUBLIC.

TYPES ty_app_id TYPE c LENGTH 70.
TYPES ty_ina1_service_name TYPE c LENGTH 40.
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure. Is the service name really 40 characters long. Most objects only support 30 characters.


"! $values { @link zif_aff_rvbc_v1.data:co_extensibility_mode }
"! $default { @link zif_aff_rvbc_v1.data:co_extensibility_mode.not_supported }
TYPES ty_extensibility_mode TYPE n LENGTH 2.
CONSTANTS:
BEGIN OF co_extensibility_mode,
"! <p class="shorttext">Fully Supported Including Custom Analytical Queries</p>
"! Fully supported including custom analytical queries
fully_supported TYPE ty_extensibility_mode VALUE 0,
"! <p class="shorttext">Supported Only for Predefined Analytical Queries</p>
"! Supported only for predefined analytical queries
supported_predefined_queries TYPE ty_extensibility_mode VALUE 1,
"! <p class="shorttext">Not Supported</p>
"! Not supported
not_supported TYPE ty_extensibility_mode VALUE 2,
END OF co_extensibility_mode.

"! $values { @link zif_aff_rvbc_v1.data:co_source }
"! $default { @link zif_aff_rvbc_v1.data:co_source.predefined }
TYPES ty_source TYPE n LENGTH 1.
CONSTANTS:
BEGIN OF co_source,
"! <p class="shorttext">Predefined</p>
"! Predefined
predefined TYPE ty_source VALUE 1,
"! <p class="shorttext">Custom</p>
"! Custom
custom TYPE ty_source VALUE 2,
END OF co_source.

Comment on lines +24 to +36
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the type and the constant is obsolete, now, isn't it?

"! $values { @link zif_aff_rvbc_v1.data:co_status }
"! $default { @link zif_aff_rvbc_v1.data:co_status.draft }
TYPES ty_status TYPE n LENGTH 1.
CONSTANTS:
BEGIN OF co_status,
"! <p class="shorttext">Draft</p>
"! Draft
draft TYPE ty_status VALUE 1,
"! <p class="shorttext">Final</p>
"! Final
final TYPE ty_status VALUE 2,
END OF co_status.

"! $values { @link zif_aff_rvbc_v1.data:co_consistency_status }
"! $default { @link zif_aff_rvbc_v1.data:co_consistency_status.check_required }
TYPES ty_consistency_status TYPE n LENGTH 1.
CONSTANTS:
BEGIN OF co_consistency_status,
"! <p class="shorttext">Consistency Check Is Required</p>
"! Consistency check is required
check_required TYPE ty_consistency_status VALUE 0,
"! <p class="shorttext">Consistent</p>
"! Consistent
consistent TYPE ty_consistency_status VALUE 1,
"! <p class="shorttext">Error</p>
"! Error
error TYPE ty_consistency_status VALUE 2,
END OF co_consistency_status.

TYPES:
"! <p class="shorttext">Review Booklet Definition</p>
"! Review booklet definition
BEGIN OF ty_booklet_definition,
"! <p class="shorttext">Application ID</p>
"! Application ID
"! $required
application TYPE ty_app_id,
"! <p class="shorttext">Source</p>
"! Source
source TYPE ty_source,
"! <p class="shorttext">Status</p>
"! Status
status TYPE ty_status,
RuixingYangSAP marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Consistency Status</p>
"! Consistency status
consistency_status TYPE ty_consistency_status,
RuixingYangSAP marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Extensibility Mode</p>
"! Extensibility mode
"! $required
extensibility_mode TYPE ty_extensibility_mode,
RuixingYangSAP marked this conversation as resolved.
Show resolved Hide resolved
END OF ty_booklet_definition.

TYPES:
"! <p class="shorttext">InA Service</p>
"! InA Service
BEGIN OF ty_ina1_service,
schneidermic0 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Service Name</p>
"! Service name
"! $required
ina1_service TYPE ty_ina1_service_name,
Comment on lines +93 to +96
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually, we try to keep the name of the tile and the field name identical. So either "Service Name" or "INA1 Service".

END OF ty_ina1_service.

TYPES:
"! <p class="shorttext">Object Type RVBC</p>
"! Object type RVBC
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">Booklet Definition</p>
"! Booklet definition
booklet_definition TYPE ty_booklet_definition,
"! <p class="shorttext">Predefined InA Service</p>
"! Predefined InA service
predefined_ina1_service TYPE ty_ina1_service,
"! <p class="shorttext">Custom InA Service</p>
"! Custom InA service
custom_ina1_service TYPE ty_ina1_service,
END OF ty_main.

ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/rvbc/type/zif_aff_rvbc_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "AFF type for RVBC ( Review Booklets )",
"originalLanguage": "en"
}
}
Loading