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

[TOBJ] Add new: Transport Object Type #560

Closed
wants to merge 10 commits into from
Closed
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
6 changes: 6 additions & 0 deletions file-formats/tobj/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# TOBJ File Format
This AFF is only complete with regard to ABAP Language Version 'ABAP for Cloud Development'

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.tobj.json` | 1 | [`zif_aff_tobj_v1.intf.abap`](./type/zif_aff_tobj_v1.intf.abap) | [`tobj-v1.json`](./tobj-v1.json) | [z_aff_example_tobjt.tobj.json](./examples/z_aff_example_tobjt.tobj.json)
albertmink marked this conversation as resolved.
Show resolved Hide resolved
17 changes: 17 additions & 0 deletions file-formats/tobj/examples/z_aff_example_tobjt.tobj.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"formatVersion": "1",
"header": {
"description": "Maintain Configuration",
"originalLanguage": "en",
"abapLanguageVersion": "cloudDevelopment"
},
"tables": [
{
"tableName": "ZPW_T1",
"primaryTable": true
},
{
"tableName": "ZPW_T1_TXT"
}
]
}
94 changes: 94 additions & 0 deletions file-formats/tobj/tobj-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"$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/tobj/tobj-v1.json",
"title": "Transport Object Type",
"description": "Transport Object Type",
"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,
"maxLength": 2,
"pattern": "^[a-z]+$"
},
"abapLanguageVersion": {
"title": "ABAP Language Version",
"description": "ABAP language version",
"type": "string",
"enum": [
"standard",
"cloudDevelopment"
],
"enumTitles": [
"Standard",
"ABAP Cloud Development"
],
"enumDescriptions": [
"Standard",
"ABAP cloud development"
],
"default": "standard"
}
},
"additionalProperties": false,
"required": [
"description",
"originalLanguage"
]
},
"tables": {
"title": "Tables",
"description": "The contents of these tables are transported",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Table",
"description": "Table",
"type": "object",
"properties": {
"tableName": {
"title": "Table Name",
"description": "Table Name",
"type": "string",
"maxLength": 30
},
"primaryTable": {
"title": "Primary Table",
"description": "Indicates that this table is the leading processing table. Exactly one entry in the list must be the primary",
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"tableName"
]
}
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"tables"
]
}
36 changes: 36 additions & 0 deletions file-formats/tobj/type/zif_aff_tobj_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
INTERFACE zif_aff_tobj_v1
PUBLIC.

TYPES:
"! <p class="shorttext">Table</p>
"! Table
BEGIN OF ty_table,
"! <p class="shorttext">Table Name</p>
"! Table Name
"! $required
table_name TYPE c LENGTH 30,
"! <p class="shorttext">Primary Table</p>
"! Indicates that this table is the leading processing table.
"! Exactly one entry in the list must be the primary
primary_table TYPE abap_bool,
END OF ty_table,
"! <p class="shorttext">Tables</p>
"! The contents of these tables are transported
ty_tables TYPE SORTED TABLE OF ty_table WITH UNIQUE KEY table_name.

TYPES:
" This AFF is only complete with regard to ABAP Language Version 'ABAP for Cloud Development'
"! <p class="shorttext">Transport Object Type</p>
"! Transport Object Type
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_cloud,
"! $required
tables TYPE ty_tables,
END OF ty_main.

ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/tobj/type/zif_aff_tobj_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "TOBJ AFF Type",
"originalLanguage": "en"
}
}