Skip to content

Commit

Permalink
Transport Object Type
Browse files Browse the repository at this point in the history
  • Loading branch information
sepp4me committed Oct 2, 2023
1 parent 2cd0a39 commit 39dbca7
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 0 deletions.
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)
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"
}
]
}
93 changes: 93 additions & 0 deletions file-formats/tobj/tobj-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"$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",
"type": "object",
"properties": {
"formatVersion": {
"title": "ABAP File Format Version",
"description": "The ABAP file format version",
"type": "string",
"const": "1"
},
"header": {
"title": "Header",
"description": "The header for an ABAP main object (without source code) with a description of 60 characters",
"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",
"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"
]
},
"tables": {
"title": "Tables",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Table",
"type": "object",
"properties": {
"tableName": {
"title": "Table Name",
"type": "string",
"maxLength": 30
},
"primaryTable": {
"title": "Primary Table",
"description": "At least one entry within the list needs to be the primary one.",
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"tableName"
]
}
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"tables"
]
}
29 changes: 29 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,29 @@
INTERFACE zif_aff_tobj_v1
PUBLIC.

TYPES:
"! <p class="shorttext">Table</p>
BEGIN OF ty_table,
"! <p class="shorttext">Table Name</p>
"! $required
table_name TYPE c LENGTH 30,
"! <p class="shorttext">Primary Table</p>
"! At least one entry within the list needs to be the primary one.
primary_table TYPE abap_bool,
END OF ty_table,
"! <p class="shorttext">Tables</p>
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>
BEGIN OF ty_main,
"! $required
format_version TYPE zif_aff_types_v1=>ty_format_version,
"! $required
header TYPE zif_aff_types_v1=>ty_header_60,
"! $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"
}
}

0 comments on commit 39dbca7

Please sign in to comment.