Professional Documents
Culture Documents
2020-06-26
You can use eDocuments to submit to the tax agencies VAT or IGIC movement-relevant documents that have
been created in external systems, that is, created in other systems than SAP. These files can be either outgoing
files, such as invoices for services or products you sold to your customers, or they could be incoming files,
documents you receive from your suppliers, like incoming invoices for services you consumed or goods you
bought.
You upload these files to your application server and create eDocuments for them which can be sent to the tax
agency for approval. The prerequisite is that the XML files are already in the format required by the tax agency.
Related Information
Customizing for Creating eDocuments for Documents from External Systems [page 4]
Submit Lists for Files Created in External Systems [page 9]
You make the following settings in Customizing for eDocuments under Cross-Application Components
General Application Functions eDocument General Settings :
1. For a company code, you activate the types of source documents for which you want eDocuments to be
created in Activate Source Type Documents for Company Code (EDOCOMPANYACTIV).
1000 ES_SII_XOD SII External Outgoing De AIF proxy (for web services)
regist
1000 ES_SII_XOR SII External Outgoing Regis AIF proxy (for web services)
ter
1000 ES_CAN_XOD Can.Isl. Ext Out Inv Deregist AIF proxy (for web services)
1000 ES_SII_XOR Can.Isl. Ext Out Inv Register AIF proxy (for web services)
3. You define SOA services to logical ports in Define SOA Services for Communication (EDOSOASERV). The
following examples show how to maintain the values for mainland Spain (*SII* entries) and the Canary
Islands (*CAN* entries):
You can implement the Define Interface Connector for eDocument BAdI (EDOC_INTERFACE_CONNECTOR). You
use this BAdI to define the communication process you want to use for transferring eDocuments over to
external or tax authorities’ systems. You find this BAdI in Customizing for eDocuments under Cross-
Application Components General Application Functions eDocument General Settings Business Add-
Ins .
You assign a logical file to each combination of Company Code and eDoc Type to store response files. You do it
in Customizing for eDocuments under Cross-Application Components General Application Functions
eDocument Country/Region-Specific Settings Spain Settings for Creating List from External Files
Maintain Response File Folders .
This information about the logical path can be customized in the FILE transaction
by assigning it to a physical path. SEE BELOW
Settings for Uploading and Downloading XML Files to the application server
1. In the FILE transaction, you maintain the logical file path to upload the files and the logical path of where
to download the response from the tax agency. In the examples below, *SII* entries refer to: mainland
Spain *CAN* entries refer to the Canary Islands:
2. Specify the physical file where the XML files from the external systems will be uploaded. An example would
be : /usr/sap/<SYSID>/SYS/src/<FILENAME>
Value Description
Applicat. area SD
Value Description
Applicat. area SD
Value Description
Applicat. area SD
Value Description
Applicat. area SD
You use this process when you have created VAT or IGIC movement relevant documents in external systems
and want to submit them to the tax authorities using the eDocument solution. You can import the files to the
system, automatically create eDocuments (as lists) and then submit them to the tax agency.
Prerequisites
● You have created the XML list for documents created in external systems. The XML is in the legally required
format.You have to consider the following requirements:
○ Since the Envelope tag is just added in the SAP Cloud Platform Integration, this tag will not be present
in the XML files that are uploaded and processed using the eDocument framework. Therefore, the root
tag of the uploaded XML files must correspond to one of the below listed root XML tags:
○ The company code for which the XML has been created must exist in the SAP system that imports and
sends the XML. An entry must exist for the company code in table T001.
○ The XML files must have the following namespace definitions:
For Mainland Spain:
https://ww2.agenciatributaria.gob.es/static_files/common/internet/dep/aplocaciones/es/aeat/
ssii/fact/ws/SuministroInformacion.xsd
https://ww2.agenciatributaria.gob.es/static_files/common/internet/dep/aplocaciones/es/aeat/
ssii/fact/ws/SuministroLR.xsd
https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/
ssii/igic/ws/SuministroLR.xsd
https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/
ssii/igic/ws/SuministroInformacion.xsd
Process
An example of the process of eDocuments for files created in external systems is depicted in the figure below
and is followed by an explanation.
ES_SII_EX_UPLOAD EDOC_ES_SII_EX_OUT_FILE_PATH
ES_SII_EX_IN_UPLOAD EDOC_ES_SII_EX_IN_FILE_PATH
ES_SII_EX_PAY_UPLOAD EDOC_ES_SII_EX_PAY_FILE_PATH
ES_SII_EX_CASH_PAY EDOC_ES_SII_EX_CASH_PAY_FILE_PATH
ES_CAN_EX_INC_INV_UP EDOC_ES_CAN_EX_INC_INV_FILE_PATH
ES_CAN_EX_IN_CASH_UP EDOC_ES_CAN_EX_INC_CASH_PAY_FILE_PATH
ES_CAN_EX_OUT_PAY_UP EDOC_ES_CAN_EX_OUT_PAY_FILE_PATH
ES_CAN_EX_UPLOAD EDOC_ES_CAN_EX_OUT_FILE_PATH
You can maintain the physical path assigned to the logical paths listed above using the FILE transaction.
Note
If you want to use the same folder for all eDocuments types, you can select the ES_SII_EX_UPLOAD
message type when uploading the files via transaction EDOC_INBOUND_UPLOAD and processing them
with the EDOC_MESSAGE_HANDLING report.
3. You create eDocuments for the uploaded XML files using the eDocument Inbound Message Handler
(EDOC_MESSAGE_HANDLING). Note that you need to run this report with both options:
○ Get available messages
○ Process existing messages
For each XML list, the system creates one eDocument in the eDocument Cockpit.
4. In the eDocument Cockpit, in the Results Overview select the process Spain SII External Documents or Can.
Islands SII External Docs.
If you report VAT data to the tax authorities in Spain, use the Spain SII External Documents process, in case
you report IGIC data to the tax authorities in the Canary Islands, use the Can. Islands SII External Docs
process.
5. Choose the list and submit it to the tax agency.
6. The tax agency sends back a status which could be one of the following:
○ Accepted: all items in the bundle have been accepted. This is the final status of the process.
○ Partially Accepted: at least one item in the bundle contains an error. Proceed with step 7.
○ Rejected: all items in the bundle have been rejected. Proceed with step 7.
7. The response files are stored in a folder on the server based on the Company Code and eDocument Type.
The logical path must have been maintained previously in the Customizing view Maintain Response File
Folders (EDOESSIIRESFOLV). For more information, see Customizing for Creating eDocuments for
Documents from External Systems [page 4].
8. Select the eDocument and choose Rejected Items to display a list of items with error.
9. For eDocuments with status Partially Accepted and Rejected, choose Finalize to finish the process.
Because the XML has been created in an external system, you cannot correct them in the SAP system.
Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:
● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:
● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.
● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such
links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.
Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.
Gender-Related Language
We try not to use genderspecific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.
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. All
other product and service names mentioned are the trademarks of their
respective companies.