Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
5 changes: 5 additions & 0 deletions file-formats/edoi/README.md
Copy link
Contributor

Choose a reason for hiding this comment

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

The example is missing. The example (and its example data) would be really helpful for our reviews. In the end it is needed anyhow.

If this won't be feasible we should create at least an issue in this repository for adding the example later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now I haven't worked on preparing example

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, before we merge, we should create at least an issue for this in this repository. Pleas keep this comment as unresolved...

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# EDOI File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.edoi.json` | 1 | [`zif_aff_edoi_v1.intf.abap`](./type/zif_aff_edoi_v1.intf.abap) | [`edoi-v1.json`](./edoi-v1.json)
190 changes: 190 additions & 0 deletions file-formats/edoi/edoi-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
{
"$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/edoi/edoi-v1.json",
"title": "eDocument Interface",
"description": "eDocument interface",
"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": 100
},
"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"
]
},
"generalInformation": {
"title": "General Information",
"description": "General information",
"type": "object",
"properties": {
"interfaceDirection": {
"title": "Interface Direction",
"description": "Interface direction.",
"type": "string",
"enum": [
"outbound",
"inbound"
],
"enumTitles": [
"Outbound",
"Inbound"
],
"enumDescriptions": [
"Outbound",
"Inbound"
],
"default": "outbound"
},
"interfaceVersion": {
"title": "Interface Version",
"description": "Interface version",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Interface Version",
"description": "eDocument interface version",
"type": "object",
"properties": {
"intVersion": {
"title": "Interface Version",
"description": "Interface version",
"type": "string",
"maxLength": 4
},
"intVersionDesc": {
"title": "Interface Version Description",
"description": "Interface dersion description",
"type": "string",
"maxLength": 30
},
"activeFrom": {
"title": "Active From",
"description": "Active from",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"intVersion",
"intVersionDesc",
"activeFrom"
]
}
},
"edocSpecAdditionalTable": {
"title": "Attribute Determination for Communication with Cloud Edition",
"description": "Attribute determination for communication with cloud edition",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Attribute Determination for Communication with Cloud Edition",
"description": "Attribute determination for communication with cloud edition",
"type": "object",
"properties": {
"processType": {
"title": "Process Type",
"description": "DRC process type",
"type": "string",
"maxLength": 50
},
"processVersion": {
"title": "Process Version",
"description": "DRC process version",
"type": "string",
"maxLength": 20
},
"processSubtype": {
"title": "Process Subtype",
"description": "DRC process subtype",
"type": "string",
"maxLength": 50
},
"drcAction": {
"title": "Action",
"description": "DRC process action",
"type": "string",
"maxLength": 30
},
"respInterfaceId": {
"title": "Response Interface",
"description": "eDoc response interface",
"type": "string",
"maxLength": 30
},
"respIntVersion": {
"title": "Response Interface Version",
"description": "Response interface version",
"type": "string",
"maxLength": 4
}
},
"additionalProperties": false,
"required": [
"processType",
"processVersion",
"processSubtype",
"drcAction",
"respInterfaceId",
"respIntVersion"
]
}
}
},
"additionalProperties": false,
"required": [
"interfaceDirection",
"interfaceVersion",
"edocSpecAdditionalTable"
]
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"generalInformation"
]
}
108 changes: 108 additions & 0 deletions file-formats/edoi/type/zif_aff_edoi_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
INTERFACE zif_aff_edoi_v1 PUBLIC.

"! <p class="shorttext">Interface Direction</p>
"! Interface direction
"! $values {@link zif_aff_edoi_v1.data:co_edoc_int_direction}
"! $default {@link zif_aff_edoi_v1.data:co_edoc_int_direction.outbound}
TYPES ty_int_direction TYPE c LENGTH 1.
TYPES:
"! <p class="shorttext">Interface Version</p>
"! eDocument interface version
BEGIN OF ty_edoc_interface_version,
"! <p class="shorttext">Interface Version</p>
"! Interface version
"! $required
int_version TYPE c LENGTH 4,
"! <p class="shorttext">Interface Version Description</p>
"! Interface dersion description
"! $required
int_version_desc TYPE c LENGTH 30,
"! <p class="shorttext">Active From</p>
"! Active from
"! $required
active_from TYPE sy-datum,
END OF ty_edoc_interface_version.
"! <p class="shorttext">Interface Versions</p>
"! eDocument interface versions
TYPES ty_edoc_interface_versions TYPE SORTED TABLE OF ty_edoc_interface_version WITH UNIQUE KEY int_version.
TYPES:
"! <p class="shorttext">Attribute Determination for Communication with Cloud Edition</p>
"! Attribute determination for communication with cloud edition
BEGIN OF ty_edoc_int_drc_attr,
"! <p class="shorttext">Process Type</p>
"! DRC process type
"! $required
process_type TYPE c LENGTH 50,
"! <p class="shorttext">Process Version</p>
"! DRC process version
"! $required
process_version TYPE c LENGTH 20,
"! <p class="shorttext">Process Subtype</p>
"! DRC process subtype
"! $required
process_subtype TYPE c LENGTH 50,
"! <p class="shorttext">Action</p>
"! DRC process action
"! $required
drc_action TYPE c LENGTH 30,
"! <p class="shorttext">Response Interface</p>
"! eDoc response interface
"! $required
resp_interface_id TYPE c LENGTH 30,
"! <p class="shorttext">Response Interface Version</p>
"! Response interface version
"! $required
resp_int_version TYPE c LENGTH 4,

END OF ty_edoc_int_drc_attr.
"! <p class="shorttext">Interface Versions</p>
"! eDocument interface versions
TYPES ty_edoc_int_drc_attributes TYPE SORTED TABLE OF ty_edoc_int_drc_attr WITH UNIQUE KEY process_type.
TYPES:
"! <p class="shorttext">General Information</p>
"! General information
BEGIN OF ty_edoc_interface,
"! <p class="shorttext">Interface Direction</p>
"! Interface direction.
"! $required
interface_direction TYPE ty_int_direction,
"! <p class="shorttext">Interface Version</p>
"! Interface version
"! $required
interface_version TYPE ty_edoc_interface_versions,
"! <p class="shorttext">Attribute Determination for Communication with Cloud Edition</p>
"! Attribute determination for communication with cloud edition
"! $required
edoc_spec_additional_table TYPE ty_edoc_int_drc_attributes,
END OF ty_edoc_interface.
TYPES:
"! <p class="shorttext">eDocument Interface</p>
"! eDocument interface
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_100_cloud,
"! <p class="shorttext">General Information</p>
"! General information
"! $required
general_information TYPE ty_edoc_interface,

END OF ty_main.

CONSTANTS:
"! <p class="shorttext">Interface Direction</p>
"! Interface direction
BEGIN OF co_edoc_int_direction,
"! <p class="shorttext">Outbound</p>
"! Outbound
outbound TYPE ty_int_direction VALUE 'O',
"! <p class="shorttext">Inbound</p>
"! Inbound
inbound TYPE ty_int_direction VALUE 'I',
END OF co_edoc_int_direction.
ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/edoi/type/zif_aff_edoi_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "Create eDocument Types",
"originalLanguage": "en"
}
}
Loading