Documente Academic
Documente Profesional
Documente Cultură
Consulting
1. Customer Master
Maintain the accounting office (Oficina contable), the management body (rgano gestor) and processing
units (Unidad Tramitadora) of the government entity for those customers that have to be invoiced
electronically.
These government entity codes must be entered in the field KNA1-STCD5 (Tax number 5). The codes must
be filled only for those customers that are to be invoiced electronically. The field is used as selection criterion
for the electronic invoicing process.
Please refer to SAP Note 2028454 for more information about these government entity codes.
When Tax Number 5 is not visible in the Control Data Tab, then the field controls in IMG must be changed, in
order to have this field available as an optional entry in the mater data maintenance:
For every Account Group for which you need to make the field available: Select field status
General Data, and then select Group Control. Set the screen control for the entry Tax
number 5 to Opt. Entry and save.
2- Transaction SPRO: Financial Accounting -> Accounts Receivable and Accounts Payable ->
Customer Accounts -> Master Data -> Preparations for Creating Customer Master Data ->
Define Screen Layout per Activity (Customers)
For every entry in the table double-click on it and: Select field status General Data, and then
select Group Control. Set the screen control for the entry 'Tax number 5' to 'Opt. Entry' and
save.
You have to repeat this action for all the entries in the table: 'Create Customer (Accounting)',
'Change Customer (Accounting)', 'Display Customer (Accounting)', 'Create Customer (Sales)',
'Change Customer (Sales)', 'Create Customer (Centrally)', 'Change Customer (Centrally)' and
'Display Customer (Centrally)'.
For the entries 'Display...' instead of setting the screen control to 'Opt.entry' you should set it to
'Display'.
If the customer has a Webservice as a destination for eInvoices, create the following entry in the
communication method SSF of that customer:
Example:
Copyright/Trademark
Remark: If an entry is not found, then the manual process will be determined for that customer (manual
download/upload of eInvoices).
This table is used to indicate for which source document types and Company codes the eDocuments must
be created. The source document types must be activated as follows:
Example:
E001 SD_INVOICE X
E001 FI_INVOICE X
Copyright/Trademark
3. Define Solution Type per Country
This table is used to indicate which eDocument solution (basic or full solution) is used for every country. The
table must be maintained as follows:
Example: Use the value BS for basic solution and FS for full solution.
Remark: If the field Solution Type is empty or you do not create any entry for the country, by default, it will
be considered basic solution.
This table is used to define the interface type that will be used for an eDocument. For each Company code
and eDocument type, an interface type must be entered as follows:
The accounting document types that are relevant for the electronic invoicing process in Spain must be
maintained in a table. Every accounting document type maintained here will trigger the creation of an
eDocument with the type that is assigned to it.
Copyright/Trademark
5.2. Choose the Edit/Maintain push button.
5.3. Choose the New Entries push button
5.4. For each accounting document type, make an entry:
5.4.1.Enter ES in the Country column.
5.4.2.Enter an accounting document type and assign the corresponding eDocument Type.
Note: All eDocument types for Spain start with ES_*
ES_INV eInvoice
ES_INV_COR eInvoice Correction
Example:
ES DR ES_INV
ES RV ES_INV
ES DG ES_INV_COR
Hint: You can use the method CHANGE_EDOCUMENT_TYPE of the BAdI EDOC_ADAPTOR to change the
eDocument type that has been determined according to these settings. For example, in the table T003EDOC
you could have one generic entry for the accounting document type AB, and then, you can implement this
method to decide in which scenarios the eDocument types ES_INV or ES_INV_COR will be determined,
according to your business logic.
6. eDocument determination
The following criteria to determine if the eDocument functionality is applicable are part of the solution:
Please refer to SAP Note 2028454 for more information about these government entity codes.
For instance, in case you want to prevent the creation of eDocuments for Billing or Accounting
Documents that were posted before the eDocument functionality was implemented, you can set the
Copyright/Trademark
changing parameter CX_RELEVANT equal to ABAP_FALSE and the eDocument will not be
created (for example, you could check the field Invoice Date or Creation Date).
Hint: The data of the Billing or Accounting Document can be retrieved from the importing object
IO_SOURCE using the method IO_SOURCE->GET_DATA(). This method will return a structure of
type EDOC_SRC_DATA_SD_INVOICE or EDOC_SRC_DATA_FI_INVOICE, depending on the
Source type (whether IO_SOURCE->MV_SOURCE_TYPE is equal to SD_INVOICE or equal to
FI_INVOICE).
7. Authorizations
Two authorization objects have been created for the report EDOC_RESUBMIT_EDOCUMENT. To execute
the report, the users will require these authorizations.
Processes:
ESINV Spain eInvoice (Download)
ESWSINV Spain eInvoice (Webservice)
Steps:
SENDEDOC Send eDocument
DELETEDOC Delete eDocument
REQ_STATUS Request status
CANCEL Cancel eDocument
Copyright/Trademark