Skip to content

Commit

Permalink
Merge branch 'feature/ints' of https://github.com/raghav6686/abap-fil…
Browse files Browse the repository at this point in the history
…e-formats into feature/ints
  • Loading branch information
raghav6686 committed Nov 5, 2024
2 parents 3c452b4 + 6fcf1a0 commit 1f1a227
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 0 deletions.
5 changes: 5 additions & 0 deletions file-formats/suco/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SUCO File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.suco.json` | 1 | [`zif_aff_suco_v1.intf.abap`](./type/zif_aff_suco_v1.intf.abap) | [`suco-v1.json`](./suco-v1.json) | [`z_aff_example_suco.suco.json`](./examples/z_aff_example_suco.suco.json)
11 changes: 11 additions & 0 deletions file-formats/suco/examples/z_aff_example_suco.suco.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"formatVersion": "1",
"header": {
"description": "",
"originalLanguage": "en"
},
"leadingApplication": {
"objectType": "TRAN",
"objectName": "SACF"
}
}
106 changes: 106 additions & 0 deletions file-formats/suco/suco-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"$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/suco/suco-v1.json",
"title": "Object Type SUCO (Authorization Default Variant)",
"description": "Object type SUCO (authorization default variant)",
"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": 80
},
"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",
"cloudDevelopment"
],
"enumTitles": [
"Standard",
"ABAP Cloud Development"
],
"enumDescriptions": [
"Standard",
"ABAP cloud development"
],
"default": "standard"
}
},
"additionalProperties": false,
"required": [
"description",
"originalLanguage"
]
},
"leadingApplication": {
"title": "Leading Application",
"description": "Leading application",
"type": "object",
"properties": {
"programId": {
"title": "Program ID",
"description": "Program ID",
"type": "string",
"maxLength": 4,
"default": "R3TR"
},
"objectType": {
"title": "Object Type",
"description": "Object type",
"type": "string",
"maxLength": 4
},
"objectName": {
"title": "Object Name",
"description": "Object name",
"type": "string",
"maxLength": 40
},
"serviceType": {
"title": "Service Type",
"description": "Service type",
"type": "string",
"maxLength": 16
},
"serviceName": {
"title": "Service Name",
"description": "Service name",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"objectType",
"objectName"
]
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"leadingApplication"
]
}
44 changes: 44 additions & 0 deletions file-formats/suco/type/zif_aff_suco_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"! AFF Type for SUCO (Authorization Default Variant)
INTERFACE zif_aff_suco_v1
PUBLIC.

TYPES:
"! <p class="shorttext">Leading Application</p>
"! Leading application
BEGIN OF ty_leading_application,
"! <p class="shorttext">Program ID</p>
"! Program ID
"! $default 'R3TR'
program_id TYPE c LENGTH 4,
"! <p class="shorttext">Object Type</p>
"! Object type
"! $required
object_type TYPE c LENGTH 4,
"! <p class="shorttext">Object Name</p>
"! Object name
"! $required
object_name TYPE c LENGTH 40,
"! <p class="shorttext">Service Type</p>
"! Service type
service_type TYPE c LENGTH 16,
"! <p class="shorttext">Service Name</p>
"! Service name
service_name TYPE string,
END OF ty_leading_application.

TYPES:
"! <p class="shorttext">Object Type SUCO (Authorization Default Variant)</p>
"! Object type SUCO (authorization default variant)
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_80_cloud,
"! <p class="shorttext">Leading Application</p>
"! Leading application
"! $required
leading_application TYPE ty_leading_application,
END OF ty_main.
ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/suco/type/zif_aff_suco_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "AFF type for SUCO (Authorization Default Variant)",
"originalLanguage": "en"
}
}
11 changes: 11 additions & 0 deletions file-formats/zif_aff_types_v1.intf.abap
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,17 @@ INTERFACE zif_aff_types_v1 PUBLIC.
abap_language_version TYPE ty_abap_language_version,
END OF ty_header_80.

TYPES:
"! <p class="shorttext">Header(no key user)</p>
"! The header for an ABAP main object (without source code) with a description of 80 characters (no key user)
BEGIN OF ty_header_80_cloud,
"! $required
description TYPE ty_description_80,
"! $required
original_language TYPE ty_original_language,
abap_language_version TYPE ty_abap_language_version_cloud,
END OF ty_header_80_cloud.

TYPES:
"! <p class="shorttext">Header</p>
"! The header for an ABAP main object (without source code) with a description of 100 characters
Expand Down

0 comments on commit 1f1a227

Please sign in to comment.