You are on page 1of 38

SAP Note 2930511

eDocument Greece Tax Register Books


(eBooks): Manual Post-Implementation Steps

Manual Activity

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
Contents
1. eDocument Customizations .................................................................................................................. 3
1.1. General Settings ............................................................................................................................ 3
2. AIF Customizations.............................................................................................................................. 12
2.1. Activate BC Set for AIF customizations ....................................................................................... 12
2.2. Change configuration in AIF Fix Values for Transaction Keys ..................................................... 12
3. AIF BAdI implementations .................................................................................................................. 14
3.1. Create implementation of BAdI EDOC_ADAPTOR ...................................................................... 14
3.2. Create implementation of BAdI EDOC_INTERFACE_CONNECTOR.............................................. 24
3.3. Create implementation of BAdI ES_EDOCUMENT_GR for matching logic ................................. 31
4. Greece Specific Customizations .......................................................................................................... 33
5. Configurations for SAP Cloud Platform Integration – Greece............................................................. 37

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
1. eDocument Customizations
To enable the eDocument for Greece and use the SAP Document Compliance for Greece solution, you
can make the generic Customizing settings described below.

1.1. General Settings

You make the following settings in Customizing for Cross-Application Components under General
Application Functions eDocument General Settings

1.1.1. Activate Source Type Documents for Company Code


For a company code, you activate the types of source documents for which you want
eDocuments to be created in the Activate Source Type Documents for Company Code
(EDOCOMPANYACTIV) Customizing activity. In the eDocument solution for Greece, the
source document type can be of the following types:

Company Code Source Type Active


<Customer-specific> EDOC_LIST
<Customer-specific> FI_INVOICE
<Customer-specific> INV_VERIF
<Customer-specific> SD_INVOICE
<Customer-specific> SRC_FILE

1.1.2. Define Interface Type for eDocument


You select the interface type that you want to use for the generation of eDocuments in the Define
Interface Type for eDocument (EDOINTTYPEV) Customizing activity. You can configurate this
Customizing activity as the table shown below.

Note: For S/4 HANA maintain interface type as “Standard”, instead of “AIF Proxy”.

Company Code eDocument Type eDocument Type Interface Type


Description

<Customer-specific> GR_EXPENSE Greece eBooks AIF Proxy


ExClassification
<Customer-specific> GR_INV Greece eBooks AIF Proxy
<Customer-specific> GR_INVI_IM Greece Incoming AIF Proxy
eBooks Import
<Customer-specific> GR_INV_CR Greece Credit Note AIF Proxy
<Customer-specific> GR_INV_IN Greece Incoming AIF Proxy
eBooks
<Customer-specific> GR_INV_MD Greece myDATA AIF Proxy
eBooks

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
<Customer-specific> GR_INV_SUM Greece eBooks AIF Proxy
Summary
<Customer-specific> GR_MD_SUM Greece myDATA AIF Proxy
eBooks Summary

1.1.3. Assign eDocument Type to Accounting Document Type


You can assign the eDocument type to the Accounting Document Type in the Assign eDocument
Type to Accounting Document Type (T003EDOCV) view through SM30 transaction. You can
configurate this Customizing activity as the table shown below.

Type Description eDocument Type eDocument


Description
D7 Debit Note CO GR_INV Greece eBooks

DG Customer Credit Memo GR_INV_CR Greece Credit Note

DH Customer Debit Memo GR_INV Greece eBooks

DR Customer Invoice GR_INV Greece eBooks

RV Billing doc.transfer GR_INV Greece eBooks

1.1.4. Define SOA Services for Communication


You can define the SOA service ports for the eDocuments in the Define SOA Services for
Communication (EDOSOASERV) Customizing activity. You can configurate this Customizing
activity as the table shown below.

SOA Service Name Company Logical Port SOA Service


Code Description
GR_CANCEL_INVOICE <Customer- EDO_GR_CANCEL_INVOICE Greece -
specific> Cancel Invoice
GR_EXCLASSIF_INVOICE <Customer- EDO_GR_EXPENSE_CLASSIFICATION Greece -
specific> ExClassification
Invoice
GR_INCOMING_INVOICE <Customer- EDO_GR_SEND_INVOICE Greece -
specific> Incoming
Invoice
GR_MDSUM_INVOICE <Customer- EDO_GR_REQUEST_DOCUMENTS Greece -
specific> myDATA
eBooks
Summary
GR_SEND_INVOICE <Customer- EDO_GR_SEND_INVOICE Greece - Send
specific> Invoice
GR_SUMMARY_INVOICE <Customer- EDO_GR_SEND_INVOICE Greece -
specific> Summary
Invoice

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
1.1.5. Assign SOA Services to eDocument Interfaces
You can assign SOA Services to eDocument Interfaces in the Assign SOA Services to
eDocument Interfaces (EDOINTV) Customizing activity. You can configurate this Customizing
activity as the table shown below.

Interface ID SOA Service Name Direction Interface


Description
GR_CANCEL_REQUEST GR_CANCEL_INVOICE Outbound Cancel Request
GR_CANCEL_RESPONSE GR_CANCEL_INVOICE Inbound Cancel Response
GR_EXCLASSIFICATION_REQUEST GR_EXCLASSIF_INVOICE Outbound ExClassification
Request
GR_EXCLASSIFICATION_RESPONSE GR_EXCLASSIF_INVOICE Inbound ExClassification
Response
GR_INCOMING_REQUEST GR_INCOMING_INVOICE Outbound Incoming Request
GR_INV_MDSUM_REQUEST GR_MDSUM_INVOICE Outbound myDATA Summary
Request
GR_INV_MDSUM_RESPONSE GR_MDSUM_INVOICE Inbound myDATA Summary
Response
GR_SEND_REQUEST GR_SEND_INVOICE Outbound Send Request
GR_SEND_RESPONSE GR_SEND_INVOICE Inbound Send Response
GR_SUMMARY_REQUEST GR_SUMMARY_INVOICE Outbound Summary Request

1.1.6. Assign AIF Interface and Version to ERP Interface


You can assign AIF interface and version to the ERP interface in the Assign AIF Interface and
Version to ERP Interface (EDOINTAIFV) view through transaction SM30. You can configurate
this view as the table below.

1) Execute transaction SM30.


2) Enter EDOINTAIFV in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the below entries.

Interface ID V Version AIF AIF AIF Direction Interface


er Descrip Names Interface Version Description
s tion pace

GR_CANCEL_REQU 1 Version /EDOG CANCELI 1 Outbound Cancel Request


EST 1.0 R NV
GR_CANCEL_RESP 1 Version /EDOG CANCELI 1 Inbound Cancel Response
ONSE 1.0 R NVR
GR_EXCLASSIFICATI 1 Version /EDOG INVEXPC 1 Outbound ExClassification
ON_REQUEST 1.0 R LS Request
GR_EXCLASSIFICATI 1 Version /EDOG INVEXPC 1 Inbound ExClassification
ON_RESPONSE 1.0 R LSR Response
GR_INCOMING_REQ 1 Version /EDOG INVVERF 1 Outbound Incoming Request
UEST 1.0 R OUT

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
GR_INV_MDSUM_RE 1 Version /EDOG PULLMDI 1 Outbound myDATA
QUEST 1.0 R NV Summary Request
GR_INV_MDSUM_RE 1 Version /EDOG PULLMDI 1 Inbound myDATA
SPONSE 1.0 R NVR Summary
Response
GR_SEND_REQUES 1 Version /EDOG INVOUT 1 Outbound Send Request
T 1.0 R
GR_SEND_RESPON 1 Version /EDOG INVOUTR 1 Inbound Send Response
SE 1.0 R
GR_SUMMARY_REQ 1 Version /EDOG INVSUMO 1 Outbound Summary Request
UEST 1.0 R UT

1.1.7. Maintain eDocument Interfaces Version


You can assign Interface version in the eDocument Interfaces Version (EDOINTVERSIONV)
view through transaction SM30. You can configurate this view as the table below.

1) Execute transaction SM30.


2) Enter EDOINTVERSIONV in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the below entries.

Version
Interface ID Version Description Active From Direction Interface Desc

GR_CANCEL_REQUEST 1 Version 1.0 DD.MM.YYYY Outbound Cancel Request


DD.MM.YYYY Cancel
GR_CANCEL_RESPONSE 1 Version 1.0 Inbound Response
DD.MM.YYYY ExClassification
GR_EXCLASSIFICATION_REQUEST 1 Version 1.0 Outbound Request
DD.MM.YYYY ExClassification
GR_EXCLASSIFICATION_RESPONSE 1 Version 1.0 Inbound Response
DD.MM.YYYY Incoming
GR_INCOMING_REQUEST 1 Version 1.0 Outbound Request
GR_SEND_REQUEST 1 Version 1.0 DD.MM.YYYY Outbound Send Request
GR_SEND_RESPONSE 1 Version 1.0 DD.MM.YYYY Inbound Send Response
DD.MM.YYYY Summary
GR_SUMMARY_REQUEST 1 Version 1.0 Outbound Request
DD.MM.YYYY myDATA
Summary
GR_INV_MDSUM_REQUEST 1 Version 1.0 Outbound Request
DD.MM.YYYY myDATA
Summary
GR_INV_MDSUM_RESPONSE 1 Version 1.0 Inbound Response

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
1.1.8. Assignment of eDocument Status to Process Status
You can assign eDocument Status to the Process Status in the Assignment of eDocument
Status to Process Status (EDOMETASTATUSV) by activating provided BC SET. You can
configurate this view below.

1) Execute transaction SCPR20


2) Enter ‘EDO_GR_METASTATUS’ in field BC set
3) Click on Activate button
4) Enter transport request to save the changes

1.1.9. Process Step Determ.: Interface shall execute this step


You can assign the Process Step to the Interface Id in the Process Step Determ.: Interface shall
execute this step (EDOPROCSTEPDETV) view through transaction SM30. You can configurate
this view as the table below.

1) Execute transaction SM30.


2) Enter EDOPROCSTEPDETV in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the below entries.

Interface
eDoc. Ve eDoc. Source Process Directi Descriptio
Process rs Interface ID Type Type Step on n
Outbo Cancel
GRINV 1 GR_CANCEL_REQUEST GR_INV und Request
GR_INV_C Outbo Cancel
GRINV 1 GR_CANCEL_REQUEST R und Request
CANA_R Inboun Cancel
GRINV 1 GR_CANCEL_RESPONSE GR_INV ESP d Response
GR_INV_C CANA_R Inboun Cancel
GRINV 1 GR_CANCEL_RESPONSE R ESP d Response
FI_INVOI SENDED Outbo Send
GRINV 1 GR_SEND_REQUEST GR_INV CE OC und Request
SD_INVO SENDED Outbo Send
GRINV 1 GR_SEND_REQUEST GR_INV ICE OC und Request
GR_INV_C FI_INVOI SENDED Outbo Send
GRINV 1 GR_SEND_REQUEST R CE OC und Request
GR_INV_C SD_INVO SENDED Outbo Send
GRINV 1 GR_SEND_REQUEST R ICE OC und Request

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
FI_INVOI PROC_R Inboun Send
GRINV 1 GR_SEND_RESPONSE GR_INV CE ESP d Response
SD_INVO PROC_R Inboun Send
GRINV 1 GR_SEND_RESPONSE GR_INV ICE ESP d Response
GR_INV_C FI_INVOI PROC_R Inboun Send
GRINV 1 GR_SEND_RESPONSE R CE ESP d Response
GR_INV_C SD_INVO PROC_R Inboun Send
GRINV 1 GR_SEND_RESPONSE R ICE ESP d Response
ExClassific
GRINVCL GR_EXCLASSIFICATION_R GR_EXPE EDOC_LI SENDED Outbo ation
ASS 1 EQUEST NSE ST OC und Request
ExClassific
GRINVCL GR_EXCLASSIFICATION_R GR_EXPE EDOC_LI PROC_R Inboun ation
ASS 1 ESPONSE NSE ST ESP d Response
GRINVRE GR_INVI_I Outbo Cancel
GIN 1 GR_CANCEL_REQUEST M und Request
GRINVRE GR_INVI_I CANA_R Inboun Cancel
GIN 1 GR_CANCEL_RESPONSE M ESP d Response
GRINVRE GR_INVI_I FI_INVOI SENDED Outbo Incoming
GIN 1 GR_INCOMING_REQUEST M CE OC und Request
GRINVRE GR_INVI_I INV_VER SENDED Outbo Incoming
GIN 1 GR_INCOMING_REQUEST M IF OC und Request
GRINVRE GR_INV_I FI_INVOI SENDED Outbo Incoming
GIN 1 GR_INCOMING_REQUEST N CE OC und Request
GRINVRE GR_INV_I INV_VER SENDED Outbo Incoming
GIN 1 GR_INCOMING_REQUEST N IF OC und Request
GRINVRE GR_INVI_I FI_INVOI PROC_R Inboun Send
GIN 1 GR_SEND_RESPONSE M CE ESP d Response
GRINVRE GR_INVI_I INV_VER PROC_R Inboun Send
GIN 1 GR_SEND_RESPONSE M IF ESP d Response
GRINVRE GR_INV_I FI_INVOI PROC_R Inboun Send
GIN 1 GR_SEND_RESPONSE N CE ESP d Response
GRINVRE GR_INV_I INV_VER PROC_R Inboun Send
GIN 1 GR_SEND_RESPONSE N IF ESP d Response
GRINVSU GR_INV_S EDOC_LI PROC_R Inboun Send
M 1 GR_SEND_RESPONSE UM ST ESP d Response
GRINVSU GR_INV_S EDOC_LI SENDED Outbo Summary
M 1 GR_SUMMARY_REQUEST UM ST OC und Request

1.1.10. Process Step Interface determination


You can assign the Interface Id to the Process Step in the Process Step Interface determination
(EDOPROCSPINTDETV) view through transaction SM30. You can configurate this view as the
table below.

1) Execute transaction SM30.


2) Enter EDOPROCSPINTDETV in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the below entries.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
Proc
.
Step Interface
eDoc. Ve Process eDoc Source Vari Direct Descripti
Process rs Step Type Type ant Interface ID ion on
Outbo Cancel
GRINV 1 CANCEL GR_INV GR_CANCEL_REQUEST und Request
GR_INV_ Outbo Cancel
GRINV 1 CANCEL CR GR_CANCEL_REQUEST und Request
PROC_R FI_INVO Inbou Send
GRINV 1 ESP GR_INV ICE GR_SEND_RESPONSE nd Response
PROC_R SD_INV Inbou Send
GRINV 1 ESP GR_INV OICE GR_SEND_RESPONSE nd Response
PROC_R GR_INV_ FI_INVO Inbou Send
GRINV 1 ESP CR ICE GR_SEND_RESPONSE nd Response
PROC_R GR_INV_ SD_INV Inbou Send
GRINV 1 ESP CR OICE GR_SEND_RESPONSE nd Response
REQ_SE FI_INVO Outbo Send
GRINV 1 ND GR_INV ICE GR_SEND_REQUEST und Request
REQ_SE SD_INV Outbo Send
GRINV 1 ND GR_INV OICE GR_SEND_REQUEST und Request
REQ_SE GR_INV_ FI_INVO Outbo Send
GRINV 1 ND CR ICE GR_SEND_REQUEST und Request
REQ_SE GR_INV_ SD_INV Outbo Send
GRINV 1 ND CR OICE GR_SEND_REQUEST und Request
SENDED FI_INVO Outbo Send
GRINV 1 OC GR_INV ICE GR_SEND_REQUEST und Request
SENDED SD_INV Outbo Send
GRINV 1 OC GR_INV OICE GR_SEND_REQUEST und Request
SENDED GR_INV_ FI_INVO Outbo Send
GRINV 1 OC CR ICE GR_SEND_REQUEST und Request
SENDED GR_INV_ SD_INV Outbo Send
GRINV 1 OC CR OICE GR_SEND_REQUEST und Request
ExClassifi
GRINVC PROC_R GR_EXP EDOC_L GR_EXCLASSIFICATION_ Inbou cation
LASS 1 ESP ENSE IST RESPONSE nd Response
ExClassifi
GRINVC REQ_SE GR_EXP EDOC_L GR_EXCLASSIFICATION_ Outbo cation
LASS 1 ND ENSE IST REQUEST und Request
ExClassifi
GRINVC SENDED GR_EXP EDOC_L GR_EXCLASSIFICATION_ Outbo cation
LASS 1 OC ENSE IST REQUEST und Request
GRINVR GR_INVI_ Outbo Cancel
EGIN 1 CANCEL IM GR_CANCEL_REQUEST und Request
GRINVR GR_INV_I Outbo Cancel
EGIN 1 CANCEL N GR_CANCEL_REQUEST und Request
GRINVR PROC_R GR_INVI_ FI_INVO Inbou Send
EGIN 1 ESP IM ICE GR_SEND_RESPONSE nd Response
GRINVR PROC_R GR_INVI_ INV_VE Inbou Send
EGIN 1 ESP IM RIF GR_SEND_RESPONSE nd Response

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
GRINVR PROC_R GR_INV_I FI_INVO Inbou Send
EGIN 1 ESP N ICE GR_SEND_RESPONSE nd Response
GRINVR PROC_R GR_INV_I INV_VE Inbou Send
EGIN 1 ESP N RIF GR_SEND_RESPONSE nd Response
GRINVR REQ_SE GR_INVI_ FI_INVO GR_INCOMING_REQUES Outbo Incoming
EGIN 1 ND IM ICE T und Request
GRINVR REQ_SE GR_INVI_ INV_VE GR_INCOMING_REQUES Outbo Incoming
EGIN 1 ND IM RIF T und Request
GRINVR REQ_SE GR_INV_I FI_INVO GR_INCOMING_REQUES Outbo Incoming
EGIN 1 ND N ICE T und Request
GRINVR REQ_SE GR_INV_I INV_VE GR_INCOMING_REQUES Outbo Incoming
EGIN 1 ND N RIF T und Request
GRINVR SENDED GR_INVI_ FI_INVO GR_INCOMING_REQUES Outbo Incoming
EGIN 1 OC IM ICE T und Request
GRINVR SENDED GR_INVI_ INV_VE GR_INCOMING_REQUES Outbo Incoming
EGIN 1 OC IM RIF T und Request
GRINVR SENDED GR_INV_I FI_INVO GR_INCOMING_REQUES Outbo Incoming
EGIN 1 OC N ICE T und Request
GRINVR SENDED GR_INV_I INV_VE GR_INCOMING_REQUES Outbo Incoming
EGIN 1 OC N RIF T und Request
GRINVS PROC_R GR_INV_ EDOC_L Inbou Send
UM 1 ESP SUM IST GR_SEND_RESPONSE nd Response
GRINVS REQ_SE GR_INV_ EDOC_L GR_SUMMARY_REQUES Outbo Summary
UM 1 ND SUM IST T und Request
GRINVS SENDED GR_INV_ EDOC_L GR_SUMMARY_REQUES Outbo Summary
UM 1 OC SUM IST T und Request

1.1.11. Mapping Class Determination


You can assign the Mapping Class to the Interface Id in the Mapping Class Determination
(EDOMAPCLASSDETV) view through transaction SM30. You can configurate this view as the
table below.

1) Execute transaction SM30.


2) Enter EDOMAPCLASSDETV in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the below entries.

eDoc. Ve eDoc. Source Direct Interface


Process rs Interface ID Type Type Mapping Class ion Direction
GR_CANCEL_REQUES CL_EDOC_MAP_G Outbo Cancel
GRINV 1 T GR_INV R und Request
GR_CANCEL_REQUES GR_INV_ CL_EDOC_MAP_G Outbo Cancel
GRINV 1 T CR R und Request
GR_CANCEL_RESPON CL_EDOC_MAP_G Inbou Cancel
GRINV 1 SE GR_INV R nd Response
GR_CANCEL_RESPON GR_INV_ CL_EDOC_MAP_G Inbou Cancel
GRINV 1 SE CR R nd Response

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
FI_INVO CL_EDOC_MAP_G Outbo Send
GRINV 1 GR_SEND_REQUEST GR_INV ICE R_FI und Request
SD_INV CL_EDOC_MAP_G Outbo Send
GRINV 1 GR_SEND_REQUEST GR_INV OICE R_SD und Request
GR_INV_ FI_INVO CL_EDOC_MAP_G Outbo Send
GRINV 1 GR_SEND_REQUEST CR ICE R_FI und Request
GR_INV_ SD_INV CL_EDOC_MAP_G Outbo Send
GRINV 1 GR_SEND_REQUEST CR OICE R_SD und Request
CL_EDOC_MAP_G Inbou Send
GRINV 1 GR_SEND_RESPONSE GR_INV R nd Response
GR_INV_ CL_EDOC_MAP_G Inbou Send
GRINV 1 GR_SEND_RESPONSE CR R nd Response
ExClassifi
GRINVC GR_EXCLASSIFICATIO GR_EXP EDOC_ CL_EDOC_MAP_G Outbo cation
LASS 1 N_REQUEST ENSE LIST R_LIST und Request
ExClassifi
GRINVC GR_EXCLASSIFICATIO
GR_EXP EDOC_ CL_EDOC_MAP_G Inbou cation
LASS 1 N_RESPONSE ENSE LIST R_LIST nd Response
GRINVR GR_CANCEL_REQUES GR_INVI CL_EDOC_MAP_G Outbo Cancel
EGIN 1 T _IM R und Request
GRINVR GR_CANCEL_RESPON GR_INVI CL_EDOC_MAP_G Inbou Cancel
EGIN 1 SE _IM R nd Response
GRINVR GR_INCOMING_REQUEGR_INVI FI_INVO CL_EDOC_MAP_G Outbo Incoming
EGIN 1 ST _IM ICE R_FI und Request
GRINVR GR_INCOMING_REQUEGR_INVI INV_VE CL_EDOC_MAP_G Outbo Incoming
EGIN 1 ST _IM RIF R_INVVERF und Request
GRINVR GR_INCOMING_REQUEGR_INV_ FI_INVO CL_EDOC_MAP_G Outbo Incoming
EGIN 1 ST IN ICE R_FI und Request
GRINVR GR_INCOMING_REQUEGR_INV_ INV_VE CL_EDOC_MAP_G Outbo Incoming
EGIN 1 ST IN RIF R_INVVERF und Request
GRINVR GR_INVI CL_EDOC_MAP_G Inbou Send
EGIN 1 GR_SEND_RESPONSE _IM R nd Response
GRINVR GR_INV_ CL_EDOC_MAP_G Inbou Send
EGIN 1 GR_SEND_RESPONSE IN R nd Response
GRINVS GR_INV_ EDOC_ CL_EDOC_MAP_G Inbou Send
UM 1 GR_SEND_RESPONSE SUM LIST R_LIST nd Response
GRINVS GR_SUMMARY_REQUE GR_INV_ EDOC_ CL_EDOC_MAP_G Outbo Summary
UM 1 ST SUM LIST R_LIST und Request

1.1.12. Other Important Configurations


1) Enable eDocument creation via transaction code FB01
Complete below configuration to create eDocument for direct FI posting
➢ Go to transaction code FIBF
➢ Go to Settings → Identification → SAP application
➢ Search for EDOC application component
➢ Enable the check box

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
2. AIF Customizations
Customer Package

Objects to be created below are required to be maintained in customer namespace.


In order to transport them across customer landscape, please create a customer package for objects
created in this note or choose and existing customer package.

You need to configure Application Interface Framework for the solution to work.

2.1. Activate BC Set for AIF customizations


AIF customizations can be activated by activating BC Set. Follow below steps to activate BC
Set,

1) Execute transaction SCPR20.


2) Enter BC set - ‘EDO_GR_AIF’ for ECC or ‘EDO_GR_AIF_S4’ for S/4 HANA.
3) Click on Activate button.
4) Enter transport request to save the changes.

2.2. Change configuration in AIF Fix Values for Transaction Keys

Maintain values in AIF Fix Values Mapping for the Transaction Keys related to VAT relevant items.
1) Go to below SPRO path
SPRO -> IMG -> Cross-Application Components -> General Application Functions-> SAP
Application Interface framework -> Interface Development -> Define Fix Values
2) Enter Namespace as /EDOGR
3) If Fix Value GR_TKEY_VAT_RELEVANT does not exist, then go to step 4, else go to step 5
4) Click New Entry button and enter below details and Save

Name: GR_TKEY_VAT_RELEVANT
Description: eDocument Greece: Transaction Keys Relevant for VAT

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
5) Go to below SPRO path and Maintain entry for below Transaction keys against Fix Value
Name GR_TKEY_VAT_RELEVANT

SPRO -> IMG -> Cross-Application Components -> General Application Functions -> SAP
Application Interface framework -> Interface Development -> Define Fix Values -> Define Fix
Value Table

Namespace Name of Fix Value Row Number Value


/EDOGR GR_TKEY_VAT_RELEVANT 1 MWS
/EDOGR GR_TKEY_VAT_RELEVANT 2 VST
/EDOGR GR_TKEY_VAT_RELEVANT 3 ESA
/EDOGR GR_TKEY_VAT_RELEVANT 4 ESE
/EDOGR GR_TKEY_VAT_RELEVANT 5 NVV
/EDOGR GR_TKEY_VAT_RELEVANT 6 NAV

Note: All valid transaction keys which are used in transaction posting for the invoice line
items which are VAT relevant can be maintained in this customization.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
3. AIF BAdI implementations
3.1. Create implementation of BAdI EDOC_ADAPTOR
Customer Package

Objects to be created below are required to be maintained in customer namespace.


In order to transport them across customer landscape, please create a customer package for objects
created in this note or choose and existing customer package.

The following steps explain how to fill or change fields of the request after the AIF mapping; in more
detail method SET_OUTPUT_DATA of BAdI EDOC_ADAPTOR can be used to fill additional fields of the
electronic invoice or to change existing ones.

3.1.1. Enhancement Implementation ZEI_EDOC_ADAPTOR_GR

1) Go to transaction SE19.
2) Select the New BAdI radio button in the Create Implementation group box and enter
ES_EDOCUMENT as the Enhancement Spot.

3) Choose the Create push button.


4) Enter ZEI_EDOC_ADAPTOR_GR as the Enhancement Implementation.
Enter ‘eDocument Adaptor for Greece’ as the Short Text. Choose the ok button

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
5) Create BAdI implementation for existing BAdI definitions
6) Enter ZEI_EDOC_ADAPTOR_GR as the BAdI Implementation.

7) Enter ZCL_EDOC_ADAPTOR_GR as the Implementation Class.

8) Choose in BAdI definition: EDOC_ADAPTOR

9) Choose the ok button.


10) Activate your changes.

11) Expand the tree of the BAdI Implementation you have just created.
12) Double-click on the Filter Val. sub-tree.
© 2020 by SAP AG. All rights reserved.
SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
13) Double-click on the Filter Val. option and create a filter with the value COUNTRY = GR.

14) Save and activate your changes.

3.1.2. Implementation of Class ZCL_EDOC_ADAPTOR_GR

1) Go to transaction SE24.
2) Enter Object Type ZCL_EDOC_ADAPTOR_GR
3) Chose the Change push button
4) Double-click on the method IF_EDOC_ADAPTOR~IS_RELEVANT to implement it.
You can leave the code empty.
This method is used in case you have a special functionality for which the eDocument
should be or should not be created.
5) Save and activate your changes.
6) Choose the Back push button.
7) Double click on the method IF_EDOC_ADAPTOR~SET_OUTPUT_DATA to implement it.
You can leave the code empty.
This method is used in case you need to change the eDocument data after the mapping
and before sending. This has been described in detail in next section.
8) Save and activate your changes.
9) Choose the Back push button.

3.1.3. Method SET_OUTPUT_DATA of the BAdI EDOC_ADAPTOR (Optional Step)

**Only to implement the custom logic for changing request data, follow the below instruction else no
need to implement this method logic**

You can implement the method SET_OUTPUT_DATA to fill or change the content of any field in the
request that you need, after the standard AIF mapping.

In particular, you have to implement this method to fill certain fields that cannot be filled during the AIF
mapping because they are customer-dependent (every customer will decide where to store the values
for these fields in the system). Therefore, you will need to implement this method to fill the fields as
explained below.

1) Go to transaction SE24 and edit the implementation class ‘ZCL_EDOC_ADAPTOR_GR’


created for the BAdI EDOC_ADAPTOR in the step 2.
© 2020 by SAP AG. All rights reserved.
SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
2) Implement the method SET_OUTPUT_DATA with coding as explained in the following
sections.

3) The fields must be filled depending on the source type of the eDocument.

To extract the data based on the source document type, you can implement a logic like this:

DATA: ls_fi_invoice TYPE edoc_src_data_fi_invoice,


ls_sd_invoice TYPE edoc_src_data_sd_invoice,
ls_mm_invoice TYPE edoc_src_data_invoice_verif,
ls_src_data_file TYPE edoc_src_data_file.

FIELD-SYMBOLS: <ls_source_data> TYPE any.

CASE io_source->mv_source_type.

WHEN 'FI_INVOICE'.
ASSIGN ls_fi_invoice TO <ls_source_data>.
* get data of source document
io_source->get_data( IMPORTING es_data = <ls_source_data> ).
******* implement your busisness logic here TO GET the VALUE FROM the SOUR
CE DATA
******* STRUCTURE ls_fi_invoice OR ANY CUSTOMER TABLE IN your SYSTEM

WHEN 'SD_INVOICE'.
ASSIGN ls_sd_invoice TO <ls_source_data>.
* get data of source document
io_source->get_data( IMPORTING es_data = <ls_source_data> ).
******* implement your busisness logic here TO GET the VALUE FROM the SOUR
CE DATA
******* STRUCTURE ls_sd_invoice OR ANY CUSTOMER TABLE IN your SYSTEM

WHEN 'INV_VERIF'.
ASSIGN ls_mm_invoice TO <ls_source_data>.
* get data of source document
io_source->get_data( IMPORTING es_data = <ls_source_data> ).
******* implement your busisness logic here TO GET the VALUE FROM the SOUR
CE DATA
******* STRUCTURE ls_mm_invoice OR ANY CUSTOMER TABLE IN your SYSTEM

WHEN 'SRC_FILE'.
ASSIGN ls_src_data_file TO <ls_source_data>.
* get data of source document
io_source->get_data( IMPORTING es_data = <ls_source_data> ).
******* implement your busisness logic here TO GET the VALUE FROM the SOUR
CE DATA
******* STRUCTURE ls_src_data_file OR ANY CUSTOMER TABLE IN your SYSTEM

ENDCASE.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
4) Also, the fields might be relevant only for a certain type of electronic document (Sales Invoice
or Credit Note Invoice or Import Vendor Invoice).

To fill the data in the electronic document based on the eDocument type, you can implement a logic
like this:

FIELD-SYMBOLS : <fs_invoice> TYPE edo_gr_invoice_envelope,


<fs_exclass> TYPE edo_gr_expenses_classificatio1.

* Fill the field in the output structure with the value that has been selecte
d
CASE iv_edoc_type.

WHEN 'GR_INV'.
ASSIGN cs_output_data TO <fs_invoice>.
******* IMPLEMENT YOUR BUSISNESS LOGIC HERE TO GET THE PREVIOUSLY SELECTED VA
LUE
******* AND ASSIGN IT TO THE TARGET FIELD IN <FS_INVOICE>
WHEN 'GR_INV_CR'.
ASSIGN cs_output_data TO <fs_invoice>.
******* IMPLEMENT YOUR BUSISNESS LOGIC HERE TO GET THE PREVIOUSLY SELECTED VA
LUE
******* AND ASSIGN IT TO THE TARGET FIELD IN <FS_INVOICE>

WHEN 'GR_INVI_IM'.
ASSIGN cs_output_data TO <fs_invoice>.
******* IMPLEMENT YOUR BUSISNESS LOGIC HERE TO GET THE PREVIOUSLY SELECTED VA
LUE
******* AND ASSIGN IT TO THE TARGET FIELD IN <FS_INVOICE>

WHEN 'GR_INV_SUM'.
ASSIGN cs_output_data TO <fs_invoice>.
******* IMPLEMENT YOUR BUSISNESS LOGIC HERE TO GET THE PREVIOUSLY SELECTED VA
LUE
******* AND ASSIGN IT TO THE TARGET FIELD IN <FS_INVOICE>

WHEN 'GR_EXPENSE'.
ASSIGN cs_output_data TO <fs_exclass>.
******* IMPLEMENT YOUR BUSISNESS LOGIC HERE TO GET THE PREVIOUSLY SELECTED VA
LUE
******* AND ASSIGN IT TO THE TARGET FIELD IN <fs_exclass>

* WHEN ... * Other eDocument types

ENDCASE.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
3.1.4. Mandatory Fields

If you need to create eDocuments from Invoice, you will need to fill the following fields of the request
after the AIF mapping using the method SET_OUTPUT_DATA of the BAdI EDOC_ADAPTOR.

Default mapping has been provided for the below mandatory fields for the standard solution to work.
You need to implement your custom logic if standard logic does not meet your requirement.

1) Payment Method Details (Mandatory Implementation is Obsolete)

Field in XML: /Invoice/PaymentMethodDetails/

Payment Method Details is a mandatory information and custom logic should be


implemented by the customer if required.

Remark: For standard solution to work, default mapping has been provided in,
Class: CL_EDOC_MAP_GR~ FILL_PAYMENT_METHODS, where
Payment Type = ‘5’
Payment Amount = TOTAL GROSS VALUE from Invoice Summary Section

To modify the data in Payment Method Details, you can implement logic like this:

METHOD if_edoc_adaptor~set_output_data.

DATA: lt_payment TYPE TABLE OF edo_gr_payment_method_detail_t,


ls_payment TYPE edo_gr_payment_method_detail_t,
lt_invoice TYPE edo_gr_aade_book_invoice_t_tab,
ls_output_data TYPE edo_gr_invoice_envelope.
FIELD-SYMBOLS: <ls_invoice> TYPE edo_gr_aade_book_invoice_type.

* Fill Payment data


IF iv_edoc_type = 'GR_INV'.
ls_output_data = cs_output_data.
CLEAR cs_output_data.

lt_invoice[] = ls_output_data-invoice[].

LOOP AT lt_invoice ASSIGNING <ls_invoice>.


"Insert customer specific business logic here
ls_payment-type = <required_value>.
ls_payment-amount = <required_amount>.
APPEND ls_payment TO lt_payment.
<ls_invoice>-payment_methods-payment_method_details[] = lt_payment[].
CLEAR lt_payment.
ENDLOOP.

ls_output_data-invoice = lt_invoice[].
cs_output_data = ls_output_data.

ENDIF.

ENDMETHOD.
© 2020 by SAP AG. All rights reserved.
SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
2) VAT Exemption Category (Mandatory Implementation is Obsolete)

Field in XML: /Invoice/InvoiceDetails/vatExemptionCategory

VAT exemption category is a mandatory information for VAT Category 7.


Currently, this is defaulted to ‘1’ and custom logic should be implemented by the customer
if required.

Remark: For standard solution to work, default mapping has been provided in,
Class: CL_EDOC_MAP_GR~ FILL_INVOICE_DETAILS_*, where
If VAT Category = ‘7’, then
VAT Exemption Category = ‘1’.

To modify the value of VAT Exemption Category, you can implement logic like this:

METHOD if_edoc_adaptor~set_output_data.

DATA: lt_inv_detail TYPE edo_gr_invoice_row_type_tab,


lt_invoice TYPE edo_gr_aade_book_invoice_t_tab,
ls_output_data TYPE edo_gr_invoice_envelope.
FIELD-SYMBOLS: <ls_invoice> TYPE edo_gr_aade_book_invoice_type,
<ls_inv_detail> TYPE edo_gr_invoice_row_type.

* Fill VAT Exemption Catgeory


IF iv_edoc_type = 'GR_INV'.
ls_output_data = cs_output_data.
CLEAR cs_output_data.

lt_invoice[] = ls_output_data-invoice[].

LOOP AT lt_invoice ASSIGNING <ls_invoice>.


LOOP AT <ls_invoice>-invoice_details ASSIGNING <ls_inv_detail>.
IF <ls_inv_detail>-vat_category = '7'.
"Insert customer specific business logic here
<ls_inv_detail>-vat_exemption_category = <required_value>.
ENDIF.
ENDLOOP.
ENDLOOP.

ls_output_data-invoice = lt_invoice[].
cs_output_data = ls_output_data.

ENDIF.

ENDMETHOD.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
3) VAT Classification Type for Expense Classification (Mandatory Implementation will
be Obsolete)

Field in XML: /Invoice/InvoiceDetails/expensesClassification/classificationType

VAT classification type is a mandatory information in case of expense classification but


there is no information in myDATA API documentation. Currently, this is defaulted to
VAT_366 and custom logic should be implemented by the customer if required.

Below is the list of allowed VAT classification type which can be submitted to myDATA.
Code Description EN Description EL
VAT_361 Purchases and Expenses Αγορές & δαπάνες στο
Domestic εσωτερικό της χώρας
VAT_362 Purchases and Expenses Αγορές & εισαγωγές επενδ.
(Assets) Αγαθών (πάγια)
VAT_363 Other Purchases and Λοιπές εισαγωγές εκτός
Expenses (Assets) επενδ. Αγαθών (πάγια)
VAT_364 EU Purchases of Goods Ενδοκοινοτικές αποκτήσεις
αγαθών
VAT_365 EU Services Provision Ενδοκοινοτικές λήψεις
Article 14.2.a υπηρεσιών άρθρ. 14.2.α
VAT_366 Other recipients acts Λοιπές πράξεις λήπτη

Remark: For standard solution to work, default mapping has been provided in,
Class: CL_EDOC_MAP_GR~ FILL_INVOICE_DETAILS_*, where
For each expense classification line item against a VAT Category, insert a VAT
classification line item with,
Classification Type = ‘VAT_366’,
Classification Category = Same as expense classification line item
Amount = Same as expense classification line item
Id = Id from expense classification line item + 1

To modify the value of VAT Classification Type you can implement logic like this:

METHOD if_edoc_adaptor~set_output_data.

DATA: lt_inv_detail TYPE edo_gr_invoice_row_type_tab,


lt_invoice TYPE edo_gr_aade_book_invoice_t_tab,
ls_output_data TYPE edo_gr_invoice_envelope.
FIELD-SYMBOLS: <ls_invoice> TYPE edo_gr_aade_book_invoice_type,
<ls_inv_detail> TYPE edo_gr_invoice_row_type,
<ls_exp_clas> TYPE edo_gr_expenses_classificatio2.

* Fill VAT Classification Type


IF iv_edoc_type = 'GR_INVI_IM'.
ls_output_data = cs_output_data.
CLEAR cs_output_data.

lt_invoice[] = ls_output_data-invoice[].

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
LOOP AT lt_invoice ASSIGNING <ls_invoice>.
LOOP AT <ls_invoice>-invoice_details ASSIGNING <ls_inv_detail>.
LOOP AT <ls_inv_detail>-
expenses_classification ASSIGNING <ls_exp_clas>.
IF <ls_exp_clas>-classification_type = 'VAT_366'.
"Read previous record from <ls_inv_detail>-
expenses_classification
"in case you need expense classification type/category
"Insert customer specific business logic here
<ls_exp_clas>-classification_type = <required_value>.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDLOOP.

ls_output_data-invoice = lt_invoice[].
cs_output_data = ls_output_data.

ENDIF.

ENDMETHOD.

Remark: Consider below data type and corresponding change in logic if it is a case of submission of the
expense classification for the matched Invoices through Summary Report.

METHOD if_edoc_adaptor~set_output_data.

DATA: ls_output_data TYPE edo_gr_expenses_classificatio1.

* Fill VAT Classification Type


IF iv_edoc_type = 'GR_EXPENSE'.
ls_output_data = cs_output_data.
CLEAR cs_output_data.

"Insert customer specific business logic here to modify ls_output_data


cs_output_data = ls_output_data.

ENDIF.

ENDMETHOD.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
4) Invoice Detail Type

Field in XML: /Invoice/InvoiceDetails/invoiceDetailType

Invoice Detail Type is a mandatory information in case of invoice type 1.5.


Currently, this is defaulted to “2” and custom logic should be implemented by the customer
if required.

Below is the list of allowed Invoice Detail Type for invoice type 1.5 which can be submitted
to myDATA.
Code Description
1 Settlement of 3rd party sales
2 Income from 3rd party sales

Remark: For standard solution to work, default mapping has been provided in,
Class: CL_EDOC_MAP_GR~ FILL_INVOICE_DETAILS_*, where
If Invoice Type = ‘1.5’, then
Invoice Detail Type = ‘2’.

To modify the value of Invoice Detail Type, you can implement logic like this:

METHOD if_edoc_adaptor~set_output_data.

DATA: lt_inv_detail TYPE edo_gr_invoice_row_type_tab,


lt_invoice TYPE edo_gr_aade_book_invoice_t_tab,
ls_output_data TYPE edo_gr_invoice_envelope.
FIELD-SYMBOLS: <ls_invoice> TYPE edo_gr_aade_book_invoice_type,
<ls_inv_detail> TYPE edo_gr_invoice_row_type.

* Fill Invoice Detail Type


IF iv_edoc_type = 'GR_INV'.
ls_output_data = cs_output_data.
CLEAR cs_output_data.

lt_invoice[] = ls_output_data-invoice[].

LOOP AT lt_invoice ASSIGNING <ls_invoice>.


IF <ls_invoice>-invoice_header-invoice_type = '1.5'.
LOOP AT <ls_invoice>-invoice_details ASSIGNING <ls_inv_detail>.
"Insert customer specific business logic here
<ls_inv_detail>-invoice_detail_type = <required_value>.
ENDLOOP.
ENDIF.
ENDLOOP.

ls_output_data-invoice = lt_invoice[].
cs_output_data = ls_output_data.

ENDIF.

ENDMETHOD.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
3.2. Create implementation of BAdI EDOC_INTERFACE_CONNECTOR

**Only applicable for ECC. Standard BAdI implementation is available in S/4 HANA**
Customer Package

Objects to be created below are required to be maintained in customer namespace.


In order to transport them across customer landscape, please create a customer package for objects
created in this note or choose and existing customer package.

The next steps explain the implementation of AIF Connector; in more detail BAdI
EDOC_INTERFACE_CONNECTOR is used to connect to AIF:

1. Enhancement Implementation ZEI_EDOC_INTF_CONN_GR

➢ Go to transaction SE19.
➢ Select the New BAdI radio button in the Create Implementation group box and enter
ES_EDOCUMENT as the Enhancement Spot.

➢ Choose the Create push button.


➢ Enter ZEI_EDOC_INTF_CONN_GR as the Enhancement Implementation.
Enter ‘eDocument Interface Connector Greece’ as the Short Text. Choose the ok button

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
➢ Create BAdI implementation for existing BAdI definitions
➢ Enter ZEI_EDOC_INTF_CONN_GR as the BAdI Implementation.

➢ Enter ZCL_EDOC_INTF_CONN_GR as the Implementation Class.

➢ Choose in BAdI definition: EDOC_INTERFACE_CONNECTOR

➢ Choose the ok button.


➢ Activate your changes.

➢ Expand the tree of the BAdI Implementation you have just created.
➢ Double-click on the Filter Val. sub-tree.
➢ In the Filter Values group box on the right-hand side, choose the Combination push-
button.
➢ In the Choose Filter dialog, select the lines for both INTERFACE_TYPE and COUNTRY.
➢ Choose the ok button.
➢ Double-click on the COUNTRY filter.
➢ In the Display Filter Value dialog, enter GR as Value 1 and select = as Comparator 1.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
➢ Choose the ok button.
➢ Double-click on the INTERFACE_TYPE filter.
➢ In the Display Filter Value dialog, enter AIF_PROXY as Value 1 and select = as
Comparator 1.
➢ Choose the ok button.
➢ The filter combination you have just created will look like this:

➢ Save and activate your changes.

2. Implementation of Class ZCL_EDOC_INTF_CONN_GR

➢ Go to transaction SE24.
➢ Enter Object Type ZCL_EDOC_INTF_CONN_GR
➢ Chose the Change push button
➢ Go to Interfaces tab and Insert Interface IF_EDOC_INTF_CONN_IMPL. Entry should look
like this,

➢ Go to Attributes tab and Insert Attribute GT_COMM_ACTION and MO_SOURCE. Entry


should look like this,

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
➢ Go to Types tab and Insert Type TY_COMM_ACTION and TY_COMM_ACTION_TAB.
Entry should look like this,

Associated Type for TY_COMM_ACTION_TAB is defined in source code of Public Section as


below,
TYPES: TY_COMM_ACTION_TAB TYPE STANDARD TABLE OF TY_COMM_ACTION.

➢ Add a method GENERATE_REQUEST_XML with below parameters,

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD GENERATE_REQUEST_XML.
INCLUDE EDOC_GR_GENERATE_REQUEST_XML.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method IF_EDOC_INTF_CONN_IMPL~IS_PREVIEW


➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTF_CONN_IMPL~IS_PREVIEW.
INCLUDE EDOC_GR_IS_PREVIEW.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method IF_EDOC_INTF_CONN_IMPL~GET_SOURCE_DATA


➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTF_CONN_IMPL~GET_SOURCE_DATA.
INCLUDE EDOC_GR_GET_SOURCE_DATA.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method IF_EDOC_INTF_CONN_IMPL~GET_XML_FOR_DISPLAY


➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTF_CONN_IMPL~GET_XML_FOR_DISPLAY.
INCLUDE EDOC_GR_GET_XML_FOR_DISPLAY.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method
IF_EDOC_INTF_CONN_IMPL~GET_INTERFACE_FOR_PREVIEW
➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTF_CONN_IMPL~GET_INTERFACE_FOR_PREVIEW
INCLUDE EDOC_GR_INTERFACE_FOR_PREVIEW.
ENDMETHOD.

➢ Save and activate your changes.


➢ Choose the Back push button.

➢ Double-click on method IF_EDOC_INTF_CONN_IMPL~GET_PROCESS_STEP_DATA


© 2020 by SAP AG. All rights reserved.
SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTF_CONN_IMPL~GET_PROCESS_STEP_DATA.
INCLUDE EDOC_GR_GET_PROCESS_STEP_DATA.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method IF_EDOC_INTERFACE_CONNECTOR~CANCEL


➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTERFACE_CONNECTOR~CANCEL
INCLUDE EDOC_AIF_PROXY_CANCEL.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method
IF_EDOC_INTERFACE_CONNECTOR~COMMUNICATE_ACTION
➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTERFACE_CONNECTOR~COMMUNICATE_ACTION.
INCLUDE EDOC_INTF_CONN_COMMUNICATE.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method IF_EDOC_INTERFACE_CONNECTOR~


DISPLAY_EDOCUMENT
➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTERFACE_CONNECTOR~DISPLAY_EDOCUMENT.
INCLUDE EDOC_INTF_CONN_DISPLAY.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method
IF_EDOC_INTERFACE_CONNECTOR~NAVIGATE_TO_MONITOR
➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTERFACE_CONNECTOR~NAVIGATE_TO_MONITOR.
INCLUDE EDOC_INTF_CONN_NAVIGATE.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Double-click on method IF_EDOC_INTERFACE_CONNECTOR~ PULL_MESSAGES


➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTERFACE_CONNECTOR~PULL_MESSAGES.
INCLUDE EDOC_GR_PULL_MESSAGES.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.
➢ Double-click on method IF_EDOC_INTERFACE_CONNECTOR~TRIGGER
➢ Insert the following statement between ‘METHOD…’ and ‘ENDMETHOD’:
METHOD IF_EDOC_INTERFACE_CONNECTOR~TRIGGER.
© 2020 by SAP AG. All rights reserved.
SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
INCLUDE EDOC_GR_TRIGGER.
ENDMETHOD.
➢ Save and activate your changes.
➢ Choose the Back push button.

➢ Remark: There is no standard delivery for the methods:


IF_EDOC_INTF_CONN_IMPL~PREPARE_TARGET_FOR_PREVIEW
IF_EDOC_INTERFACE_CONNECTOR~CLEAN_UP_MESSAGES
IF_EDOC_INTERFACE_CONNECTOR~DELETE_REQUEST
IF_EDOC_INTERFACE_CONNECTOR~PREPARE_MESSAGES
IF_EDOC_INTERFACE_CONNECTOR~PULL_REQUEST
IF_EDOC_INTERFACE_CONNECTOR~RESUBMIT
IF_EDOC_INTERFACE_CONNECTOR~DOWNLOAD_XML

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
3.3. Create implementation of BAdI ES_EDOCUMENT_GR for matching logic

**Only to implement the custom logic for matching, follow the below instruction else no need to
implement the BADI**

Standard matching logic is based on the fields Series, AA, invoice date, Vat Number between the ‘Greece
Incoming eBooks’ and data received from tax authorities for incoming invoice data (Buyer invoice).

Below are the places where the BADI methods needs to be implemented with custom logic.

1. While pulling incoming data from Tax Authorities


2. While creating the MIRO invoice

Sample (Standard logic):


<Series> – N1
<AA>– 111111107

Expected pattern(standard): <Series> – <AA>


N1-111111107

Using above pattern along with invoice date, vat number the standard logic has been written to match
the incoming documents to the Greece incoming eBooks.

Below scenario can be achieved using the BADI

Add ‘Total gross amount’ as a part of matching logic along with other parameters

Implement the BADI ‘ES_EDOCUMENT_GR’ and follow below steps to add additional matching logic.

1. While pulling invoices from Tax Authority system (Triggered while running the
EDOC_MESSAGE_HANDLING report).

Use method ‘MATCH_WITH_VENDOR_INVOICE’ of the BADI ‘ES_EDOCUMENT_GR’ with


additional fields available below.

• IV_SERIES
• IV_AA
• IV_CUSTOMER_VAT_ID
• IV_VENDOR_VAT_ID
• IV_INVOICE_DATE
• IV_TOTAL_GROSS_AMOUNT
• IV_TOTAL_PAYABLE_AMOUNT

By using above fields find the unique EDOC_GUID from the tables EDOGRINV, EDOCUMENT and
return CV_MATCHED_EDOCUMENT_ID.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
Sample code:
Data : lv_edoc_guid TYPE edoc_guid,

*Form the reference field pattern using IV_SERIES, IV_AA or you can use your own pattern followed
while creating the Greece Incoming eBooks.

CONCATENATE lv_series '-' lv_aa INTO lv_legal_doc.


SELECT edocument~edoc_guid
FROM edogrinv INNER JOIN edocument ON edogrinv~edoc_guid EQ
edocument~edoc_guid INTO cv_matched_edocument_id
WHERE edogrinv~legaldoc = lv_legal_doc AND edogrinv~invoice_date = iv_invoice_date
AND edogrinv~vendor_vat_reg_id = iv_vendor_vat_id
AND edogrinv~ total_gross_amount = iv_total_gross_amount AND ( edocument~proc_status =
'CREA' OR edocument~proc_status = 'MATCH_ERR' ) AND
edocument~edoc_type = ‘GR_INV_IN’

2. While creating the MIRO invoice

Use the method ‘MATCH_WITH_MYDATA_DOCUMENT’ of the BADI ‘ES_EDOCUMENT_GR’ with


additional fields available below.

• IV_COMPANY_CODE
• IV_DOCUMENT_NUMBER
• IV_DOCUMENT_YEAR
• IV_LEGALDOC
• IV_CUSTOMER_VAT_ID
• IV_VENDOR_VAT_ID
• IV_INVOICE_DATE

*Find the total gross amount using document number and find the eDocument to update.

Sample Code:
Data : lv_total_gross_amount type edoc_gr_amount.

SPLIT iv_legal_doc AT '-' INTO lv_series lv_aa. “( you can use custom split logic If the identifier is
“different)
SELECT edogrinv~edoc_guid FROM edogrinv INNER JOIN edocument ON edogrinv~edoc_guid EQ
edocument~edoc_guid INTO cv_matched_edocument_id
WHERE edogrinv~series = lv_series AND edogrinv~numbr = iv_aa AND
edogrinv~invoice_date = iv_invoice_date AND
edogrinv~vendor_vat_reg_id = iv_vendor_vat_id AND
edogrinv~ total_gross_amount = lv_total_gross_amount
( document~proc_status = 'CREA' OR edocument~proc_status =
'MATCH_ERR' ) AND edocument~edoc_type = 'GR_INV_MD'.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
4. Greece Specific Customizations

Maintain Entries for the Greece Specific Views

The entries for the Invoice Type, Income Classification, Income Category, Expense Classification and the
Expense Category can be maintained referring the attached Excel sheet (Invoice and Classification type
Mapping).

You can maintain the entries for the Greece Specific views as mentioned below.

4.1. Maintain Invoice Type and Descriptions


You can maintain the Invoice Type and its descriptions in this view.
1) Execute transaction SM30.
2) Enter EDOGRINVTYPE in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert entries from the tab Invoice Type of the “Invoice and Classification type Mapping”
Excel.

4.2. Maintain Invoice Type for Print Task Code


The Invoice type is determined based on Document Type, Print Task Code and Country Type.
You can maintain the Document Type, Print Task Code, Country Type and its corresponding
Invoice Type in this view.

1) Execute transaction SM30.


2) Enter EDOGRINVTYPEPTC in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the required entries.

4.3. Maintain Invoice Type for GL Account


The Invoice type is determined based on Document type, Company Code, Country Type, From
G/L Account and To G/L Account.
You can maintain Document type, Company Code, Country Type, From G/L Account, To G/L
Account and its corresponding Invoice Type in this view.

1) Execute transaction SM30.


2) Enter EDOGRINVTYPEACC in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the required entries.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
4.4. Maintain Classification Category and Descriptions
Classification category is determined based on G/L Account and Company code.
You can maintain Classification category and its Description in this view.

1) Execute transaction SM30.


2) Enter EDOGRCLASSCATEG in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert entries from the tabs Income Category and Expense Category of the “Invoice and
Classification type Mapping” Excel.

4.5. Maintain Income/Expense Classification Type and Descriptions


Classification type is determined based on G/L Account and Company code.
You can maintain Income / Expense Classification Type and Classification Type Description in
this view.

1) Execute transaction SM30.


2) Enter EDOGRCLASSTYPE in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert entries from the tabs Income Classification and Expense Classification of the
“Invoice and Classification type Mapping” Excel.

4.6. Maintain Classification Type with G/L Acc


You can maintain Company code, Country Type, From G/L Account, To G/L Account and its
corresponding Classification Category and Income/Expense Classification Type in this view.

1) Execute transaction SM30.


2) Enter EDOGRCLASSTYPEGL in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the required entries.

4.7. Maintain Withhold Tax Category


You can maintain Withholding Tax Code and its corresponding Tax Type, Withhold Tax
Category, Stamp Duty Percentage, Fee Percentage Category, Other Tax Percentage Category
in this view.

1) Execute transaction SM30.


2) Enter EDOGRWTCATE in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the required entries.

Remark: The following restrictions are to be followed for maintaining the view
If TAX TYPE is ‘Withholding Tax ‘, then only Withhold Tax Category is allowed.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
If TAX TYPE is ‘Fees ‘, then only Fee Percentage Category is allowed.
If TAX TYPE is ‘Other Taxes ‘, then only Other Tax Percentage Category is allowed.
If TAX TYPE is ‘Stamp Duty’, then only Stamp Duty Percentage Category is allowed.
TAX TYPE ‘Excluded’ OR ‘Deductions’ OR ‘VAT’ is not allowed.

4.8. Maintain Categories for Tax Codes


You can maintain Tax on Sales/Purchases Code and its corresponding Tax Type, Withhold Tax
Category, Stamp Duty Percentage, VAT Category, Fee Percentage Category, Other Tax
Percentage Category in this view.

1) Execute transaction SM30.


2) Enter EDOGRCATEMWSKZ in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the required entries.

Remark: The following restrictions are to be followed for maintaining the view
If TAX TYPE is ‘VAT’, then only VAT Category is allowed.
If TAX TYPE is ‘Withholding Tax’, then only Withhold Tax Category is allowed.
If TAX TYPE is ‘Fees’, then only Fee Percentage Category is allowed.
If TAX TYPE is ‘Other Taxes’, then only Other Tax Percentage Category is allowed.
If TAX TYPE is ‘Stamp Duty’, then only Stamp Duty Percentage Category is allowed.
TAX TYPE ‘Excluded’ OR ‘Deductions’ is not allowed.

Remark: Tax codes those are created with VAT relevant transaction keys should be maintained
for VAT Category only.
VAT relevant transaction keys are maintained in the AIF customizing,
SPRO -> IMG -> Cross-Application Components -> General Application Functions -> SAP
Application Interface framework -> Interface Development -> Define Fix Values -> Define Fix
Value Table.

4.9. Maintain Categories for G/L Accounts


You can maintain Tax on Company Code, From G/L Account, To G/L Account and its
corresponding Tax Type, Withhold Tax Category, Stamp Duty Percentage, Fee Percentage
Category, Other Tax Percentage Category in this view.

1) Execute transaction SM30.


2) Enter EDOGRCATEHKONT in the Table/View field.
3) Choose the Edit/Maintain push button.
4) Choose the New Entries push button.
5) Insert the required entries.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
Remark: The following restrictions are to be followed for maintaining the view
If TAX TYPE is ‘Withholding Tax’, then only Withhold Tax Category is allowed.
If TAX TYPE is ‘Fees’, then only Fee Percentage Category is allowed.
If TAX TYPE is ‘Other Taxes’, then only Other Tax Percentage Category is allowed.
If TAX TYPE is ‘Stamp Duty’, then only Stamp Duty Percentage Category is allowed.
If TAX TYPE is ‘Excluded’, or ‘Deductions’, then no category be allowed.
TAX TYPE ‘VAT’ is not allowed.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
5. Configurations for SAP Cloud Platform Integration – Greece

Document Compliance uses the SAP Cloud Platform Integration to communicate with external systems via
web services. For that, you do the following:

• Connect your back-end system and Application Interface Framework with SAP Cloud Platform
Integration.
• Set up of SAP Cloud Platform Integration for connecting to the external systems.

The prerequisite to access the SAP Cloud Platform Integration implementation for a given local version is
to have an SDN account that enables you to access SAP Cloud Platform Integration. To find the Integration
package, do the following.

1. Access the SAP Cloud Platform Integration page using this link: https://api.sap.com/.
2. Choose Integration.
3. Choose All.
4. Search for the integration package you’re looking for. If you don’t know the exact name of the
integration package, search for eDocument and a list of integration packages for eDocument is
displayed and you can choose the one you’re interested in.
5. Go to Documents and open the integration documentation. The document guides you through the
settings you do in SAP Cloud Platform Integration to enable eDocuments for your local version.

Once you access the SAP Cloud Platform Integration catalog page, you find the eDocument: electronic
Invoice for Greece package. By clicking on this package, you are directed to the page specific for
eDocument Greece. On this page, click on the Documents icon to find the Greece Electronic Tax Register
Books (e-Books): Setting Up SAP Cloud Platform Integration. This document guides you through all the
necessary settings you need to make in SAP Cloud Platform Integration to enable the Full eDocument
solution for Greece.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.
Disclaimer: © 2020 SAP an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without
the express permission of SAP SE or an SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other
countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software
components of other software vendors. National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only,
without representation or warranty of any kind, and SAP SE or its affiliated companies shall not be liable
for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate
company products and services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be construed as constituting an
additional warranty.

SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this
document or any related presentation, or to develop or release any functionality mentioned therein.
This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and
possible future developments, products, and/or platform directions and functionality are all subject to
change and may be changed by SAP SE or its affiliated companies at any time for any reason without
notice. The information in this document is not a commitment, promise, or legal obligation to deliver
any material, code, or functionality. All forward-looking statements are subject to various risks and
uncertainties that could cause actual results to differ materially from expectations. Readers are
cautioned not to place undue reliance on these forward-looking statements, which speak only as of their
dates, and they should not be relied upon in making purchasing decisions.

© 2020 by SAP AG. All rights reserved.


SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries.

You might also like