You are on page 1of 16

PUBLIC

2020-06-26

Submit Lists for Files Created in External


Systems
© 2020 SAP SE or an SAP affiliate company. All rights reserved.

THE BEST RUN


This is a preview of the documentation that will be available on SAP Help Portal when the Support Packages
specified in SAP Note 2487483 are released for customers. The information in the preview of an upcoming
release is not subject to your license agreement or any other service or subscription agreement with SAP. SAP
has no obligation to pursue any course of business outlined in a preview or any related presentation, or to
develop or release any functionality mentioned therein. Previews or any related presentation and SAP's
strategy and possible future developments, products, platforms, directions, and functionality are all subject to
change and may be changed by SAP at any time for any reason without notice. The preview information is not a
commitment, promise or legal obligation to deliver any material, code, or functionality. This information is
provided without a warranty of any kind, either express or implied, including but not limited to, the implied
warranties of merchantability, fitness for a particular purpose, or non-infringement. This information is for
informational purposes and may not be incorporated into a contract. SAP assumes no responsibility for errors
or omissions in preview sections, except if such damages were caused by SAP´s willful misconduct or gross
negligence. All forward-looking statements are subject to various risks and uncertainties that could cause
actual results to dLffer 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.
Content

1 eDocuments for XML Files Created in External Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4


1.1 Customizing for Creating eDocuments for Documents from External Systems. . . . . . . . . . . . . . . . . . 4
1.2 Submit Lists for Files Created in External Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Submit Lists for Files Created in External Systems


Content PUBLIC 3
1 eDocuments for XML Files Created in
External Systems

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]

1.1 Customizing for Creating eDocuments for Documents


from External Systems

Customizing Settings for eDocuments

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).

Submit Lists for Files Created in External Systems


4 PUBLIC eDocuments for XML Files Created in External Systems
2. You select the interface type that calls the eDocument solution variant that you want to use for the
generation of eDocuments in the Define Interface Type for eDocument (EDOINTTYPEV). The following
example shows how to maintain the values:

Maintaining Settings for EDOINTTYPEV View

Company Code eDocument Type Type Description Interface Type

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):

Maintaining Settings for EDOSOASERV View

SOA Service Name Logical Port SOA Service Description

ES_SII_XEX_DEREG_OUT EDO_ES_SII_EXTERNAL_FILES Outgoing VAT movements Deregistra­


tion (Extenal files)

ES_SII_XEX_REGIS_OUT EDO_ES_SII_EXTERNAL_FILES Outgoing VAT movements Registra­


tion/Modification (Extenal files)

ES_CAN_EX_DE_INC_INV LP_EDO_CAN_INCOMING_INVOICE Incoming Invoice Deregistration

ES_CAN_EX_DE_INC_PAY LP_EDO_CAN_INCOMING_PAYMENT Incoming Cash Payment Deregistra­


tion

ES_CAN_EX_DE_OUT_INV LP_EDO_CAN_OUTGOING_INVOICE Outgoing Invoice Deregistration

ES_CAN_EX_RE_INC_INV LP_EDO_CAN_INCOMING_INVOICE Incoming Invoice Registration/Modifi­


cation

ES_CAN_EX_RE_INC_PAY LP_EDO_CAN_INCOMING_PAYMENT Incoming Cash Payment Registration/


Modification

ES_CAN_EX_RE_OUT_INV LP_EDO_CAN_OUTGOING_INVOICE Outgoing Invoice Registration/Modifi­


cation

ES_CAN_EX_RE_OUT_PAY LP_EDO_CAN_OUTGOING_PAY_VOC Outgoing Payment Registration VOC


Vendor

Submit Lists for Files Created in External Systems


eDocuments for XML Files Created in External Systems PUBLIC 5
4. You assign SOA services to eDocument interfaces in Assign SOA Services to eDocument Interfaces
(EDOINTV). The following examples show how to maintain the values:

Maintaining Settings for EDOINTV View

Interface ID I/O SOA Service Name Interface Description

ES_SII_DE­ O ES_SII_XEX_DEREG_OUT Deregister outgoing exter­


REGI_OUT_EXT_REQUEST nal VAT movements(re­
quest)

ES_SII_DE­ I ES_SII_XEX_DEREG_OUT Deregister outgoing exter­


REGI_OUT_EXT_RE­ nal VAT movements (re­
SPONSE sponse)

ES_SII_REG­ O ES_SII_XEX_REGIS_OUT Register outgoing external


IST_OUT_EXT_REQUEST VAT movements (request)

ES_SII_REG­ I ES_SII_XEX_REGIS_OUT Register outgoing external


IST_OUT_EXT_RESPONSE VAT movements (response)

ES_CAN_DE­ O ES_CAN_EX_DE_INC_INV Deregister External Incom­


REGI_IN_EXT_REQUEST ing Invoices (request)

ES_CAN_DE­ I ES_CAN_EX_DE_INC_INV Deregister External Incom­


REGI_IN_EXT_RESPONSE ing Invoices (response)

ES_CAN_DE­ O ES_CAN_EX_DE_OUT_INV Deregister External Outgo­


REGI_OUT_EXT_REQUEST ing Invoices (request)

ES_CAN_DE­ I ES_CAN_EX_DE_OUT_INV Deregister External Outgo­


REGI_OUT_EXT_RE­ ing Invoice (response)
SPONSE

ES_CAN_DE_IN_CASH_PAY O ES_CAN_EX_DE_INC_PAY Deregister External Incom­


_EXT_REQ ing Cash Payments (re­
quest)

ES_CAN_DE_IN_CASH_PAY I ES_CAN_EX_DE_INC_PAY Deregister External Incom­


_EXT_RES ing Cash Payments (re­
sponse)

ES_CAN_REG­ O ES_CAN_EX_RE_INC_INV Register External Incoming


IST_IN_EXT_REQUEST Invoices (request)

ES_CAN_REG­ I ES_CAN_EX_RE_INC_INV Register External Incoming


IST_IN_EXT_RESPONSE Invoices (response)

ES_CAN_REG­ O ES_CAN_EX_RE_OUT_INV Register External Outgoing


IST_OUT_EXT_REQUEST Invoices (request)

ES_CAN_REG­ I ES_CAN_EX_RE_OUT_INV Register External Outgoing


IST_OUT_EXT_RESPONSE Invoices (response)

ES_CAN_RE_IN_CASH_PAY O ES_CAN_EX_RE_INC_PAY Register external incoming


_EXT_REQ cash payments (request)

ES_CAN_RE_IN_CASH_PAY I ES_CAN_EX_RE_INC_PAY Register external incoming


_EXT_RES cash payments (response)

Submit Lists for Files Created in External Systems


6 PUBLIC eDocuments for XML Files Created in External Systems
Business and Add-Ins

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 .

Other Customizing settings

Settings for External Systems


You specify IDs for each external system that provide XML files to create eDocuments. You do this in
Customizing for eDocuments under Cross-Application Components General Application Functions
eDocument Country/Region-Specific Settings Spain Settings for Creating List from External Files .

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:

Logical File Path Name

EDOC_ES_SII_EX_OUT_FILE_PATH eDocuments Spain SII External documents

EDOC_ES_SII_EX_OUT_FILE_PATH_RESP eDocument Spain SII External documents: response file


folder

EDOC_ES_CAN_EX_OUT_FILE_PATH eDocument Can. Islands Ext. File: Outgoing Files

EDOC_ES_CAN_EX_OUT_RESP_FILE_PATH eDocument Can. Islands Ext. File: Response File Path

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>

Submit Lists for Files Created in External Systems


eDocuments for XML Files Created in External Systems PUBLIC 7
3. Make the a new entry in Logical File Name Definition, Cross-Client with the following values. The tables
below show you the entries for the external files and for the response from the tax agency respectively ::

Values for the external files

Value Description

Log. file EDOC_ES_SII_EX_OUT_FILE_NAME

Name eDocument Spain SII External Documents

Physical file <leave empty>

Data format DIR

Applicat. area SD

Logical path EDOC_ES_SII_EX_OUT_FILE_PATH

Values for the response

Value Description

Log. file EDOC_ES_SII_EX_OUT_FILE_NAME_RESP

Name eDocument Spain SII External Documents

Physical file <leave empty>

Data format DIR

Applicat. area SD

Logical path EDOC_ES_SII_EX_OUT_FILE_PATH_RESP

Values for the external files, Canary Islands

Value Description

Log. file EDOC_ES_CAN_EX_OUT_FILE_NAME

Name eDocument Can. Islands Ext. Files: Outgoing File Path

Physical file <leave empty>

Data format DIR

Applicat. area SD

Logical path EDOC_ES_CAN_EX_OUT_FILE_PATH

Submit Lists for Files Created in External Systems


8 PUBLIC eDocuments for XML Files Created in External Systems
Values for the response, Canary Islands

Value Description

Log. file EDOC_ES_CAN_EX_OUT_RESP_FILE_NAME

Name eDocument Can. Islands Ext. Files: Response File Name

Physical file <leave empty>

Data format DIR

Applicat. area SD

Logical path EDOC_ES_CAN_EX_OUT_RESP_FILE_PATH

1.2 Submit Lists for Files Created in External Systems

Submit Lists for Files Created in External Systems

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:

Root XML tag eDocument Type

'SuministroLRFacturasRecibidas' ES_SII_XIR (for mainland Spain) or ES_CAN_XIR (for


Canary Islands)

'BajaLRFacturasRecibidas' ES_SII_XID (for mainland Spain) or ES_CAN_XID (for


Canary Islands)

'SuministroLRFacturasEmitidas' ES_SII_XOR (for mainland Spain) or ES_CAN_XOR (for


Canary Islands)

Submit Lists for Files Created in External Systems


eDocuments for XML Files Created in External Systems PUBLIC 9
Root XML tag eDocument Type

'BajaLRFacturasEmitidas' ES_SII_XOD (for mainland Spain) or ES_CAN_XOD (for


Canary Islands)

'SuministroLRPagosRecibidas' ES_SII_XIP (for mainland Spain) or ES_CAN_XIP (for


Canary Islands)

'SuministroLRCobrosMetalico' ES_SII_XCR (for mainland Spain) or ES_CAN_XCR (for


Canary Islands)

'BajaLRCobrosMetalico' ES_SII_XCD (for mainland Spain) or ES_CAN_XCD (for


Canary Islands)

○ 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

For Canary Islands:

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.

Submit Lists for Files Created in External Systems


10 PUBLIC eDocuments for XML Files Created in External Systems
1. You create a bundled of electronic documents in one XML (list). The XML may contain one or more items
(documents).The file name for the external documents XML files has to follow the naming convention:
○ <System ID (1-10 Char)> Identification of the external system ID.
The ID must exist in view EDOESSII_EXSYSV. For more information, see Customizing for Creating
eDocuments for Documents from External Systems [page 4] .
○ - Separator
○ <Bundle ID (1-16 Char)> Identification of the bundle ID.
The list (bundle-id) must be unique for the external system
○ - Separator
○ <Comm_type(2 Char)> - Communication type (01-Create, 02-Modify, 03-Cancel)
Example of a valid file name: SYSID1-BUNREG01-01.xml
2. You upload your external created XML files to the application server using the Upload Tool for Incoming
Messages (EDOC_INBOUND_UPLOAD ) transaction.
You can save the uploaded files in separate folders using different message types:
○ ES_SII_EX_UPLOAD - for Outbound Invoices
○ ES_SII_EX_IN_UPLOAD- for Incoming Invoices
○ ES_SII_EX_PAY_UPLOAD - for Payments of Incoming Invoices.
○ ES_SII_EX_CASH_PAY – for Cash Payments
If you have invoices that include IGIC (Impuesto General Indirecto de Canarias - Canaries General Indirect
Tax) data to be reported to the tax authorities in the Canary Islands, you use the following message types:
○ ES_CAN_EX_UPLOAD – for outgoing invoices
○ ES_CAN_EX_INC_INV_UP – for incoming invoices
○ ES_CAN_EX_OUT_PAY_UP – for payments of incoming invoices
○ ES_CAN_EX_IN_CASH_UP – for cash payments
The message types are linked to the following logical paths:

Submit Lists for Files Created in External Systems


eDocuments for XML Files Created in External Systems PUBLIC 11
Message Type Logical Path

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.

Submit Lists for Files Created in External Systems


12 PUBLIC eDocuments for XML Files Created in External Systems
For more information on the actions you can perform for lists, refer to the available documentation direct in the
Cockpit.

Submit Lists for Files Created in External Systems


eDocuments for XML Files Created in External Systems PUBLIC 13
Important Disclaimers and Legal Information

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.

Beta and Other Experimental Features


Experimental features are not part of the officially delivered scope that SAP guarantees for future releases. This means that experimental features may be changed by
SAP at any time for any reason without notice. Experimental features are not for productive use. You may not demonstrate, test, examine, evaluate or otherwise use
the experimental features in a live operating environment or with data that has not been sufficiently backed up.
The purpose of experimental features is to get feedback early on, allowing customers and partners to influence the future product accordingly. By providing your
feedback (e.g. in the SAP Community), you accept that intellectual property rights of the contributions or derivative works shall remain the exclusive property of SAP.

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 gender­specific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.

Videos Hosted on External Platforms


Some videos may point to third-party video hosting platforms. SAP cannot guarantee the future availability of videos stored on these platforms. Furthermore, any
advertisements or other content hosted on these platforms (for example, suggested videos or by navigating to other videos hosted on the same site), are not within
the control or responsibility of SAP.

Submit Lists for Files Created in External Systems


14 PUBLIC Important Disclaimers and Legal Information
Submit Lists for Files Created in External Systems
Important Disclaimers and Legal Information PUBLIC 15
www.sap.com/contactsap

© 2020 SAP SE or 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. The information contained herein may be changed
without prior notice.

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 or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP 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 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.

Please see https://www.sap.com/about/legal/trademark.html for


additional trademark information and notices.

THE BEST RUN

You might also like