Skip to content

Commit

Permalink
Merge branch 'main' into feature/swcr
Browse files Browse the repository at this point in the history
  • Loading branch information
schneidermic0 authored Jul 31, 2023
2 parents e6114ba + def4cca commit fc2c6f7
Show file tree
Hide file tree
Showing 6 changed files with 441 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The mapping of objects to file names follows the pattern
```
with the mandatory elements object_name, object_type and file_extension.
Namespaces are converted into brackets, for instance `/NMSPC/CL_OBJECT` becomes `(nmspc)cl_object`.
For every objects there is a file `<object_name>.<object_type>.json`, referred to as metadata file with content such as description text, original language and other (non-redundant) metadata.

### Object Name and Type
The object name (R3TR) and object type are derived from the object itself, as stored in the ABAP object directory (aka TADIR).
Expand All @@ -34,29 +35,28 @@ E.g., for function module FUNCTION_EXISTS in function group SUNI, the file name

### Content Type
If an object needs multiple files which are not represented by transport objects, the content type is used to differentiate between the different file types.
Examples for classes are the test-classes or text elements:
```
cl_oo_clif_source.clas.abap
cl_oo_clif_source.clas.testclasses.abap
cl_oo_clif_source.clas.texts.en.properties
```

### Language
Files with language-specific content (such as translatable texts) also have an identifier for the language in the filename to distinguish between the different translations.
The language of the texts is encoded by the element `language` following [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
```
cl_oo_clif_source.clas.texts.en.properties
cl_oo_clif_source.clas.texts.de.properties
cl_oo_clif_source.clas.texts.fr.properties
```
For property files, no language is added, even if they contain translatable texts.
These files are stored in the original language of the object and the original language is specified in the property file itself.
For the text elements of classes, this language will be the original language (provided by the metadata file).


## File Extensions

ABAP file formats define three file types:
ABAP file formats define the file types:
* **`.abap`** stores ABAP source code as plain text
* **`.acds`** stores source code of ABAP Core Data Services (CDS) as plain text
* **`.json`** stores content of form-based editors or properties of objects, such as `originalLanguage`, `abapLanguageVersion` and others.
Details are found in [JSON Files in ABAP File Formats](./json.md)
* **`.properties`** stores translation relevant text elements as plain text
* **`.properties`** stores text elements as plain text


## Formatting Conventions
Expand Down
5 changes: 5 additions & 0 deletions file-formats/susi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SUSI File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.susi.json` | 1 | [`zif_aff_susi_v1.intf.abap`](./type/zif_aff_susi_v1.intf.abap) | [`susi-v1.json`](./susi-v1.json) | [`55fae0107acd2ee619d9f869c651edhs.susi.json`](./examples/55fae0107acd2ee619d9f869c651edhs.susi.json)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"formatVersion": "1",
"header": {
"description": "WS SRT_TEST_WEBI/REQUEST_RESPONSE",
"originalLanguage": "en"
},
"generalInformation": {
"applicationName": "SRT_TEST_WEBI/REQUEST_RESPONSE",
"applicationType": "WebService",
"maintenanceMode": "manual"
},
"authorizationObjects": [
{
"object": "S_SERVICE",
"maintenanceStatus": "noDefault"
},
{
"object": "S_DATASET",
"maintenanceStatus": "defaultWithValues",
"fields": [
{
"field": "ACTVT",
"low": "33"
},
{
"field": "ACTVT",
"low": "34"
},
{
"field": "PROGRAM",
"low": "SAPLSTRF"
},
{
"field": "FILENAME",
"low": ""
}
]
},
{
"object": "S_TABU_RFC",
"maintenanceStatus": "defaultWithValues",
"fields": [
{
"field": "ACTVT",
"low": "03"
}
]
}
]
}
207 changes: 207 additions & 0 deletions file-formats/susi/susi-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
{
"$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/susi/susi-v1.json",
"title": "SUSI Object Type",
"description": "Object type SUSI",
"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"
]
},
"generalInformation": {
"title": "General Information",
"description": "General information",
"type": "object",
"properties": {
"applicationName": {
"title": "Application Name",
"description": "Application name of authorization defaults",
"type": "string",
"maxLength": 132
},
"applicationType": {
"title": "Application Type",
"description": "Type of authorization defaults",
"type": "string",
"maxLength": 80
},
"maintenanceMode": {
"title": "Maintenance Mode",
"description": "Maintenance mode",
"type": "string",
"enum": [
"manual",
"automatic",
"automaticBasisObjects",
"noDefaultValues",
"deprecated",
"obsolete"
],
"enumTitles": [
"Manual Maintenance",
"Automatic Maintenance (All Objects)",
"Automatic Maintenance (Basis Authorization Objects Only)",
"Application Does Not Require Default Values",
"Application Is Deprecated",
"Application Is Obsolete"
],
"enumDescriptions": [
"Manual maintenance",
"Automatic maintenance (all objects)",
"Automatic maintenance (basis authorization objects only)",
"Application does not require default values",
"Application is deprecated",
"Application is obsolete"
],
"default": "manual"
},
"description": {
"title": "Description",
"description": "Description of authorization default values",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"applicationName",
"applicationType"
]
},
"authorizationObjects": {
"title": "Authorization Objects",
"description": "Authorization objects",
"type": "array",
"items": {
"title": "Authorization Object Details",
"description": "Details of Authorization object",
"type": "object",
"properties": {
"object": {
"title": "Object",
"description": "Name of Authorization Object",
"type": "string",
"maxLength": 10
},
"maintenanceStatus": {
"title": "Maintenance Status",
"description": "Maintenance Status",
"type": "string",
"enum": [
"noDefault",
"defaultWithValues",
"defaultWithoutValues",
"inactiveValues"
],
"enumTitles": [
"No Default",
"Default With Field Values",
"Default Without Field Values",
"Default Inactive"
],
"enumDescriptions": [
"No default",
"Default with field values",
"Default without field values",
"Default inactive"
],
"default": "defaultWithValues"
},
"description": {
"title": "Description",
"description": "Description of authorization defaults of object",
"type": "string"
},
"fields": {
"title": "Authorization Field Values",
"description": "Authorization field values",
"type": "array",
"items": {
"title": "Authorization Field Values",
"description": "Authorization field values",
"type": "object",
"properties": {
"field": {
"title": "Authorization Field",
"description": "Authorization field",
"type": "string",
"maxLength": 10
},
"low": {
"title": "From",
"description": "From value",
"type": "string",
"maxLength": 40
},
"high": {
"title": "To",
"description": "To values",
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"object"
]
}
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"generalInformation"
]
}
Loading

0 comments on commit fc2c6f7

Please sign in to comment.