diff --git a/file-formats/edcc/edcc-v1.json b/file-formats/edcc/edcc-v1.json index 290807f6d..1d4ad55d5 100644 --- a/file-formats/edcc/edcc-v1.json +++ b/file-formats/edcc/edcc-v1.json @@ -580,6 +580,189 @@ "representationTypes" ] } + }, + "events": { + "title": "Events Assignment", + "description": "Assign events to consistency scenario", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Assign Event", + "description": "Assign event to consistency scenario", + "type": "object", + "properties": { + "event": { + "title": "Event Name", + "description": "Event name", + "type": "string", + "maxLength": 25 + }, + "description": { + "title": "Description", + "description": "Description", + "type": "string", + "maxLength": 100 + }, + "assignedComparison": { + "title": "Assign Checks and Comparison Type", + "description": "Assign Checks and Comparison Type", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Assigned Comparison", + "description": "Assigned comparison", + "type": "object", + "properties": { + "comparisonType": { + "title": "Comparison Type", + "description": "Comparison type", + "type": "string", + "maxLength": 30 + }, + "checkId": { + "title": "Check Id", + "description": "Check id", + "type": "string", + "maxLength": 30 + } + }, + "additionalProperties": false + } + }, + "checkRelevance": { + "title": "Check Relevance", + "description": "Define relevance of checks", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Check Relevance", + "description": "Define relevance of check", + "type": "object", + "properties": { + "comparisonType": { + "title": "Comparison Type", + "description": "Comparison type", + "type": "string", + "maxLength": 30 + }, + "checkId": { + "title": "Check Id", + "description": "Check id", + "type": "string", + "maxLength": 30 + }, + "relevance": { + "title": "Relevance", + "description": "Relevance", + "type": "string", + "enum": [ + "relevant", + "notRelevant", + "unchanged" + ], + "enumTitles": [ + "Relevant", + "Not Relevant", + "Unchanged" + ], + "enumDescriptions": [ + "Relevant", + "Not relevant", + "Unchanged" + ], + "default": "unchanged" + } + }, + "additionalProperties": false, + "required": [ + "comparisonType", + "checkId" + ] + } + } + }, + "additionalProperties": false + } + }, + "relationshipAttribute": { + "title": "Representation Types", + "description": "Assign representation types associated with comsistency scenario", + "type": "object", + "properties": { + "representationType": { + "title": "Representation Type", + "description": "Representation type", + "type": "string", + "maxLength": 30 + } + }, + "additionalProperties": false + }, + "edocumentType": { + "title": "eDocument Type Assignment", + "description": "Assign eDocument types associated with comsistency scenario", + "type": "array", + "uniqueItems": true, + "items": { + "title": "eDocument Type Assignment", + "description": "Assign eDocument types associated with comsistency scenario", + "type": "object", + "properties": { + "edocType": { + "title": "eDocument Type", + "description": "eDocument Type", + "type": "string", + "maxLength": 10 + } + }, + "additionalProperties": false + } + }, + "inconsistencyCategories": { + "title": "Inconsistency Categories", + "description": "Inconsistency categories", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Inconsistency Category", + "description": "Inconsistency category", + "type": "object", + "properties": { + "resultUiGroup": { + "title": "Inconsistency Category", + "description": "Inconsistency category", + "type": "string", + "maxLength": 20 + }, + "countryXtension": { + "title": "Country View Extension", + "description": "Country view extension", + "type": "string", + "maxLength": 30 + }, + "resultProcess": { + "title": "Result Processes", + "description": "Assign result process to the UI group", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Result Process", + "description": "Assign result process to the UI group", + "type": "object", + "properties": { + "resultProcess": { + "title": "Result Process", + "description": "Result process", + "type": "string", + "maxLength": 10 + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } } }, "additionalProperties": false, diff --git a/file-formats/edcc/examples/z_aff_example_edcc.edcc.json b/file-formats/edcc/examples/z_aff_example_edcc.edcc.json index 4026517ec..2b6455ef6 100644 --- a/file-formats/edcc/examples/z_aff_example_edcc.edcc.json +++ b/file-formats/edcc/examples/z_aff_example_edcc.edcc.json @@ -1,140 +1,131 @@ -{\rtf1\ansi\ansicpg1252\cocoartf2761 -\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\froman\fcharset0 Times-Roman;} -{\colortbl;\red255\green255\blue255;\red0\green0\blue0;} -{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;} -\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0 -\deftab720 -\pard\pardeftab720\sa240\partightenfactor0 - -\f0\fs24 \cf0 \expnd0\expndtw0\kerning0 -\{\ - "formatVersion": "1",\ - "header": \{\ - "description": "Example Scenario",\ - "originalLanguage": "en",\ - "abapLanguageVersion": "cloudDevelopment"\ - \},\ - "country": "ES",\ - "taxauthMessages": [\ - \{\ - "messageType": "TaxAuthorityInvPull",\ - "messageTypeDescription": "Pull Data from Tax Authority",\ - "taxauthDocumenttype": "ES_IN_V_DOC1",\ - "originalLanguage": "en"\ - \}\ - ],\ - "taxauthTables": [\ - \{\ - "tableName": "ES_TAXAUTH_TABLE"\ - \}\ - ],\ - "comparisonTypes": [\ - \{\ - "comparisonType": "TaxAuthVeDoc",\ - "description": "Compare Tax Authority Invoice with eDocument",\ - "positionNumber": "1",\ - "className": "CL_EDC_EXAMPLE_CLASS",\ - "dataSource": "I_EDC_EXAMPLE",\ - "existenceCheck": \{\ - "checkId": "Existence",\ - "description": "Example existence check",\ - "fieldName": "EDCEXIST",\ - "fieldValue": "X",\ - "resultProcess": "ZMISSING1"\ - \},\ - "statusCheck": [\ - \{\ - "checkId": "Example 1",\ - "description": "Example Status check",\ - "sequenceNumber": "1",\ - "sourceFieldname1": "InvoiceReportingStatus",\ - "sourceFieldvalue1": "ACCEPT",\ - "sourceFieldname2": "ACRStatus",\ - "sourceFieldvalue2": "REJECT",\ - "resultProcess": "ZPROCESS1"\ - \},\ - \{\ - "checkId": "Example 2",\ - "description": "Example Status check",\ - "sequenceNumber": "2",\ - "sourceFieldname1": "InvoiceSubmissionStatus",\ - "sourceFieldvalue1": "ACCEPT",\ - "sourceFieldname2": "eDocumentStatus",\ - "sourceFieldvalue2": "REJECT",\ - "resultProcess": "ZPROCESS2"\ - \}\ - ],\ - "contentCheck": [\ - \{\ - "checkId": "ExampleContentCheck1",\ - "description": "Content check of Invoices",\ - "checkNumber": "1",\ - "contentComparisonFieldgroup": [\ - \{\ - "fieldGroup": "InvoiceHeaderFields",\ - "description": "Example",\ - "fieldGroupLevel": "header",\ - "checkFormula": "field",\ - "resultProcess": "ZCONTENT1",\ - "comparisonField": [\ - \{\ - "representationType": "EDOCUMENT",\ - "fieldName": "TotalAmount",\ - "comparisonSequence": "1"\ - \},\ - \{\ - "representationType": "TAXAUTHDOC",\ - "fieldName": "TotalAmount",\ - "comparisonSequence": "2"\ - \}\ - ]\ - \}\ - ]\ - \}\ - ],\ - "checkAttributes": [\ - \{\ - "checkId": "Existence",\ - "positionNumber": "1",\ - "executionSequence": "1",\ - "executionControl": "proceed",\ - "checkFilter": [\ - \{\ - "filterOperation": "and",\ - "comparisonOperator": "equal",\ - "expressionIndicator": "beginof"\ - \}\ - ]\ - \},\ - \{\ - "checkId": "Example 1",\ - "positionNumber": "2",\ - "executionSequence": "2",\ - "executionControl": "proceed"\ - \},\ - \{\ - "checkId": "Example 2",\ - "positionNumber": "3",\ - "executionSequence": "3",\ - "executionControl": "proceed"\ - \},\ - \{\ - "checkId": "ExampleContentCheck1",\ - "positionNumber": "4",\ - "executionSequence": "4",\ - "executionControl": "noProceed"\ - \}\ - ],\ - "representationTypes": [\ - \{\ - "representationType": "EDOCUMENT",\ - "description": "example eDocument"\ - \},\ - \{\ - "representationType": "TAXAUTHDOC",\ - "description": "Tax Authority Document"\ - \}\ - ]\ - \}\ - ]\ -\}} \ No newline at end of file +{ + "formatVersion": "1", + "header": { + "description": "Example Scenario", + "originalLanguage": "en", + "abapLanguageVersion": "cloudDevelopment" + }, + "country": "ES", + "taxauthMessages": [ + { + "messageType": "TaxAuthorityInvPull", + "messageTypeDescription": "Pull Data from Tax Authority", + "taxauthDocumenttype": "ES_IN_V_DOC1", + "originalLanguage": "en" + } + ], + "taxauthTables": [ + { + "tableName": "ES_TAXAUTH_TABLE" + } + ], + "comparisonTypes": [ + { + "comparisonType": "TaxAuthVeDoc", + "description": "Compare Tax Authority Invoice with eDocument", + "positionNumber": "1", + "className": "CL_EDC_EXAMPLE_CLASS", + "dataSource": "I_EDC_EXAMPLE", + "existenceCheck": { + "checkId": "Existence", + "description": "Example existence check", + "fieldName": "EDCEXIST", + "fieldValue": "X", + "resultProcess": "ZMISSING1" + }, + "statusCheck": [ + { + "checkId": "Example 1", + "description": "Example Status check", + "sequenceNumber": "1", + "sourceFieldname1": "InvoiceReportingStatus", + "sourceFieldvalue1": "ACCEPT", + "sourceFieldname2": "ACRStatus", + "sourceFieldvalue2": "REJECT", + "resultProcess": "ZPROCESS1" + }, + { + "checkId": "Example 2", + "description": "Example Status check", + "sequenceNumber": "2", + "sourceFieldname1": "InvoiceSubmissionStatus", + "sourceFieldvalue1": "ACCEPT", + "sourceFieldname2": "eDocumentStatus", + "sourceFieldvalue2": "REJECT", + "resultProcess": "ZPROCESS2" + } + ], + "contentCheck": [ + { + "checkId": "ExampleContentCheck1", + "description": "Content check of Invoices", + "checkNumber": "1", + "contentComparisonFieldgroup": [ + { + "fieldGroup": "InvoiceHeaderFields", + "description": "Example", + "fieldGroupLevel": "header", + "checkFormula": "field", + "resultProcess": "ZCONTENT1", + "comparisonField": [ + { + "representationType": "EDOCUMENT", + "fieldName": "TotalAmount", + "comparisonSequence": "1" + }, + { + "representationType": "TAXAUTHDOC", + "fieldName": "TotalAmount", + "comparisonSequence": "2" + } + ] + } + ] + } + ], + "checkAttributes": [ + { + "checkId": "Existence", + "positionNumber": "1", + "executionSequence": "1", + "executionControl": "proceed", + "checkFilter": [ + { + "filterOperation": "and", + "comparisonOperator": "equal", + "expressionIndicator": "beginof" + } + ] + }, + { + "checkId": "Example 1", + "positionNumber": "2", + "executionSequence": "2", + "executionControl": "proceed" + }, + { + "checkId": "Example 2", + "positionNumber": "3", + "executionSequence": "3", + "executionControl": "proceed" + }, + { + "checkId": "ExampleContentCheck1", + "positionNumber": "4", + "executionSequence": "4", + "executionControl": "noProceed" + } + ], + "representationTypes": [ + { + "representationType": "EDOCUMENT", + "description": "example eDocument" + }, + { + "representationType": "TAXAUTHDOC", + "description": "Tax Authority Document" + } + ] + } + ] +} \ No newline at end of file diff --git a/file-formats/edcc/type/zif_aff_edcc_v1.intf.abap b/file-formats/edcc/type/zif_aff_edcc_v1.intf.abap index c10b70a5b..f71bc3925 100644 --- a/file-formats/edcc/type/zif_aff_edcc_v1.intf.abap +++ b/file-formats/edcc/type/zif_aff_edcc_v1.intf.abap @@ -9,7 +9,7 @@ INTERFACE zif_aff_edcc_v1 TYPES: "!
Tax Authority Message Type
"! Tax Authority Message type - BEGIN OF ty_messages, + BEGIN OF ty_message, "!Message Type
"! Message type message_type TYPE c LENGTH 20, @@ -20,10 +20,10 @@ INTERFACE zif_aff_edcc_v1 "! Tax authority document type taxauth_documenttype TYPE c LENGTH 20, original_language TYPE zif_aff_types_v1=>ty_original_language, - END OF ty_messages, + END OF ty_message, "!Tax Authority Message Types
"! Tax Authority Message types - tt_messages TYPE SORTED TABLE OF ty_messages WITH UNIQUE KEY message_type. + ty_messages TYPE SORTED TABLE OF ty_message WITH UNIQUE KEY message_type. TYPES: "!Additional Tax Authority Table
@@ -35,7 +35,7 @@ INTERFACE zif_aff_edcc_v1 END OF ty_taxauth_table, "!Additional Tax Authority Tables
"! Additional tax authority tables - tt_taxauth_table TYPE SORTED TABLE OF ty_taxauth_table WITH UNIQUE KEY table_name. + ty_taxauth_tables TYPE SORTED TABLE OF ty_taxauth_table WITH UNIQUE KEY table_name. TYPES: "!Position Number
@@ -413,6 +413,138 @@ INTERFACE zif_aff_edcc_v1 "! Define comparison types ty_comparison_types TYPE SORTED TABLE OF ty_comparison_type WITH UNIQUE KEY comparison_type. + TYPES: + "!Relevance
+ "! Relevance + "! $values {@link zif_aff_edcc_v1.data:co_relevance} + "! $default {@link zif_aff_edcc_v1.data:co_relevance.unchanged} + ty_relevance TYPE c LENGTH 1, + "!Event Name
+ "! Event name + ty_event_name TYPE c LENGTH 25, + "!Assigned Comparison
+ "! Assigned comparison + BEGIN OF ty_assigned_comparison, + "!Comparison Type
+ "! Comparison type + comparison_type TYPE zif_aff_types_v1=>ty_object_name_30, + "!Check Id
+ "! Check id + check_id TYPE zif_aff_types_v1=>ty_object_name_30, + END OF ty_assigned_comparison, + "!Assign Checks and Comparison Type
+ "! Assign Checks and Comparison Type + ty_assigned_comparisons TYPE SORTED TABLE OF ty_assigned_comparison WITH UNIQUE KEY + comparison_type check_id, + "!Check Relevance
+ "! Define relevance of check + BEGIN OF ty_check_relevance, + "!Comparison Type
+ "! Comparison type + "! $required + comparison_type TYPE zif_aff_types_v1=>ty_object_name_30, + "!Check Id
+ "! Check id + "! $required + check_id TYPE zif_aff_types_v1=>ty_object_name_30, + "!Relevance
+ "! Relevance + relevance TYPE ty_relevance, + END OF ty_check_relevance, + "!Check Relevance
+ "! Define relevance of checks + ty_check_relevances TYPE SORTED TABLE OF ty_check_relevance WITH UNIQUE KEY + comparison_type check_id. + + CONSTANTS: + "!Relevance
+ "! Relevance + BEGIN OF co_relevance, + "!Relevant
+ "! Relevant + relevant TYPE ty_relevance VALUE 'R', + "!Not Relevant
+ "! Not relevant + not_relevant TYPE ty_relevance VALUE 'N', + "!Unchanged
+ "! Unchanged + unchanged TYPE ty_relevance VALUE 'U', + END OF co_relevance. + + TYPES: + "!Assign Event
+ "! Assign event to consistency scenario + BEGIN OF ty_event, + "!Event Name
+ "! Event name + event TYPE ty_event_name, + "!Description
+ "! Description + description TYPE zif_aff_types_v1=>ty_description_100, + "!Assign Checks and Comparison Type
+ "! Assign Checks and Comparison Type + assigned_comparison TYPE ty_assigned_comparisons, + "!Check Relevance
+ "! Define relevance of checks + check_relevance TYPE ty_check_relevances, + END OF ty_event, + "!Assign Events
+ "! Assign events to consistency scenario + ty_events TYPE SORTED TABLE OF ty_event WITH UNIQUE KEY event. + + TYPES: + "!Representation Type
+ "! Assign representation type associated with comsistency scenario + BEGIN OF ty_relationship_attribute, + "!Representation Type
+ "! Representation type + representation_type TYPE zif_aff_types_v1=>ty_object_name_30, + END OF ty_relationship_attribute, + "!Representation Types
+ "! Assign representation types associated with comsistency scenario + ty_relationship_attributes TYPE SORTED TABLE OF ty_relationship_attribute WITH UNIQUE KEY + representation_type, + "!eDocument Type Assignment
+ "! Assign eDocument types associated with comsistency scenario + BEGIN OF ty_edoc_type, + "!eDocument Type
+ "! eDocument Type + edoc_type TYPE c LENGTH 10, + END OF ty_edoc_type, + "!eDocument Type Assignment
+ "! Assign eDocument types associated with comsistency scenario + ty_edoc_types TYPE SORTED TABLE OF ty_edoc_type WITH UNIQUE KEY edoc_type. + + TYPES: + "!Inconsistency Category
+ "! Inconsistency category + ty_resultgroup TYPE c LENGTH 20, + + "!Result Process
+ "! Assign result process to the UI group + BEGIN OF ty_results_process, + result_process TYPE ty_result_process, + END OF ty_results_process, + "!Result Processes
+ "! Assign result process to the UI group + ty_result_processes TYPE SORTED TABLE OF ty_results_process WITH UNIQUE KEY result_process, + "!Inconsistency Category
+ "! Inconsistency category + BEGIN OF ty_inconsistency_category, + "!Inconsistency Category
+ "! Inconsistency category + result_ui_group TYPE ty_resultgroup, + "!Country View Extension
+ "! Country view extension + country_xtension TYPE zif_aff_types_v1=>ty_object_name_30, + "!Result Processes
+ "! Assign result process to the UI group + result_process TYPE ty_result_processes, + END OF ty_inconsistency_category, + "!Inconsistency Categories
+ "! Inconsistency categories + ty_inconsistency_categories TYPE SORTED TABLE OF ty_inconsistency_category WITH UNIQUE KEY + result_ui_group. TYPES: "!Consistency Scenario
"! Consistency scenario @@ -428,16 +560,26 @@ INTERFACE zif_aff_edcc_v1 country TYPE ty_country, "!Tax Authority Message Types
"! Tax authority message types - taxauth_messages TYPE tt_messages, + taxauth_messages TYPE ty_messages, "!Additional Tax Authority Tables
"! Additional tax authority tables - taxauth_tables TYPE tt_taxauth_table, + taxauth_tables TYPE ty_taxauth_tables, "!Comparison Types
"! Define comparison types comparison_types TYPE ty_comparison_types, - - - END OF ty_main . + "!Events Assignment
+ "! Assign events to consistency scenario + events TYPE ty_events, + "!Representation Types
+ "! Assign representation types associated with comsistency scenario + relationship_attribute TYPE ty_relationship_attribute, + "!eDocument Type Assignment
+ "! Assign eDocument types associated with comsistency scenario + edocument_type TYPE ty_edoc_types, + "!Inconsistency Categories
+ "! Inconsistency categories + inconsistency_categories TYPE ty_inconsistency_categories, + END OF ty_main. ENDINTERFACE.