Skip to Content

VAT Register Books for Spain with eDocument Framework and SAP Cloud Platform Integration

Business-to-Government Scenario: allowing companies in Spain to comply with legal changes across all software components.

This blueprint provides common information and guidance for using the eDocument framework and SAP Cloud Platform Integration to comply with local regulations mandating the transfer of electronic documents to legal authorities. This is a lighthouse example of the B2G integrations supported by SAP. Here, the eDocument framework and the SAP Cloud Platform Integration work together to: (1) transform transactional data in SAP ERP or SAP S/4HANA into predefined exchange formats and (2) transfer it electronically to external systems. The following document includes the benefits of the solution, the main SAP Cloud Platform components for licensing considerations, and a visual architecture depicting a basic architectural pattern.

Business Scenario

The growing and increasingly complex regulatory environment challenges businesses to transform transactional data into predefined exchange formats and transfer it electronically to external systems, such as to the systems of legal or tax authorities. The significant increase in the number and complexity of regulatory compliance expectations is generally driven by

  • Fiscal control: there are countries where companies are obliged to generate documents electronically, such as invoices, credit or debit memos that are exchanged between business partners and/or with the local tax authorities (i.e., Chile, Peru, Colombia)
  • Savings in public procurement: To take advantage of the benefits of electronic procurement, governmental organizations demand the use of electronic invoices for business transactions involving public organizations (i.e., EU digital agenda 2019)
  • Digitalization of tax administration offices: Several countries are moving towards a digital reporting environment demanding or encouraging online reporting of business transactions (i.e., Spain, Italy)

Solution

The eDocument framework has been developed by Globalization Services to comply with local regulations mandating the use of electronic documents to be sent to business partners and/or legal authorities. The Framework is intended to implement complex processes involving several message exchanges.

The requirements for the generation of eDocuments vary from country to country. The differences are normally related to the type of documents that are supported and also to legal requirements that exist for the exchange file formats and the messaging exchange with external systems. Therefore, for some countries you have to consider different settings and processes before and during the implementation of the selected solution. For more information, refer to the documentation for the eDocument solution for the specific countries.

The purpose of the framework is to provide a standardized approach to comply with the different regulations across countries.

Solution Benefits

  • Reduce total cost of operations by providing one solution with end-to-end approach that supports multiple contract partners.
  • Reduce set of tools by integrating multiple monitors, configuration and processes into one unifying user experience
  • Guarantee data consistency by integrating the backend (SAP ERP or SAP S/4HANA) with third party systems into one globalization network

Solution Diagram

SAP Cloud Platform is the extension platform for SAP. It enables developers to develop loosely coupled extension applications securely, thus implementing additional workflows or modules on top of the existing solution they already have.

Reference Solution Diagram

The following diagram of the solution illustrates the basic architectural pattern using the eDoc framework on S/4HANA on-premise and the SAP Cloud Platform Integration for Immediate VAT reporting for Spain. 

Reference Solution Components

The following list describes the main components needed to implement this scenario and the role they play in the overall runtime of the solution.

SAP S/4HANA – The eDocument framework allows companies to create eDocuments based on source documents previously created in other SAP applications, such as Financial Accounting (FI) or Sales and Distribution (SD) and transmit them to external systems using the required format. 

Cloud Integration – SAP Cloud Platform Integration or Cloud Integration in short, integrates SAP ERP or SAP S/4HANA to send and receive data from the external systems. It establishes communication with the external system by using Web services and also transforms formats the data to comply with the Web service parameters, signs the document digitally, and establishes a secure connection using SSL.

Tax Authority – Provide Web services and additional monitoring.

eDocument Framework

There are 2 main components in the framework:

  1. The generic eDocument Framework: It runs on the SAP ERP and SAP S/4HANA. It’s the visible component for the business user via solution specific transactions and the generic eDocument Cockpit. This component also relies on the underlying Application Integration framework (an add-on used to build and manage the integration staging area) and the built-in SAP ERP and SAP S/4HANA web services runtime which provides basic web services communication, encryption and authentication capabilities to integrate the SAP ERP and SAP S/4HANA with SAP Cloud Platform
  2. SAP Cloud Platform Integration, a cloud based integration service, provides advanced security handling including not only authentication and confidentiality but also integrity. It includes a large variety of security standards as well as communication adapters and other capabilities required to fulfill global integration cloud requirements

Security

Security in the cloud also referred to as ‘Cloud Computing Security’ encompasses a variety of procedures, standards and technologies employed to protect data, applications and associated infrastructure. To achieve this integration, it is required to set up transport level security and certificate based authentication. 

  1. Certificated based Authentication is used to identify the sending system (i.e S/4HANA in this case) when the report is received by the immediate information service (SII) residing in the tax authority datacenter.
  2. Transport level security: is used to protect the data confidentiality.

Learn More

This blueprint highlights important considerations companies need to analyze when implementing eDocument framework to comply with legal regulations. However, it is recommended to review further information to help you design and develop your user experience. The following resources are a starting point:

A typical processing of an eDocument consists of the following steps:

  1. Generation of source documents: You create source documents in SAP ERP applications such as in Financial Accounting (FI) or in Sales and Distribution (SD).
  2. Generation of eDocuments: Once the source document has been posted, the system creates an eDocument instance in the database for each source document.
  3. Transmission of eDocuments to external systems: The process of sending the eDocuments to external systems varies depending on which eDocument solution variant you implement and configure in your system. Once you submit the eDocument to the external systems, the system calls an interface connector to deploy the configured solution variant as well as any customer-specific changes you implement in your system.
  4. Monitoring eDocument processing status: At any stage of eDocument processing you can check the status of your eDocuments. Furthermore, the system offers an error handling functionality that enables you to trace the issues that occurred with your eDocuments during the their creation or transmission processes.
  5. Update of SAP ERP with data from external systems: Once your documents have been processed by the tax authorities and/or business partners, the system updates the SAP ERP database with data coming from the external systems, such as with timestamps (sending, receiving, and approval) or authorization numbers.

For the creation of eDocuments for Electronic VAT Register Books with SII:

If using ERP

  • Go to https://help.sap.com/viewer/p/SAP_ERP  > Choose your version and open the SAP Library.
  • Select ERP Central Components > Financials > Country Versions > Europe > Spain > Cross-Application Components > eDocument for Spain > Electronic VAT Register Books with SII

If using S/4HANA

Back to top