Skip to Content

Many countries have mandate for companies to issue business documents electronically to business partners and/or legal authorities such as Delivery Notes, Invoices, Credit Memo, Debit Memo, Tax Certificates etc. In addition, some countries require companies to send data of their VAT(Value Added Tax) register books to Tax Authorities (e.g. Spain SII), Ledgers (e.g. Chile). In this blog, I would like to give an overview of the eDocument solution and its solution components, Solution Landscape, Solution Architecture and other salient features of the eDocument Framework.

To meet above mentioned legal compliance requirements in countries where companies are obliged to generate documents electronically, SAP offers eDocument solution. SAP eDocument solution is used to create eDocuments, that is, to transform transactional data created in SAP ECC or S/4HANA system into predefined exchange formats and transfer it electronically to external systems such as to the systems of legal or Tax Authorities. Some countries require companies to exchange data in a specific data exchange format, in most cases it is an XML file with a predefined structure and fields.

Below figure depicts the source documents (business documents) from which an eDocument can be created

Creation of eDocuments can be broadly classified into two scenarios:

  1. Outgoing (e.g. Customer Invoice, Payment Receipt, Delivery Note)
  2. Incoming (e.g. Vendor Invoice, Invoice Receipt, Goods Receipt)

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

  1. Generation of source documents (e.g. SD Billing document, Customer Invoice in FI etc.)
  2. Generation of eDocuments
  3. Transmission of eDocuments to external systems
  4. Monitoring eDocument processing status
  5. Update of eDocument status in cockpit based on data coming from external systems

As depicted in the solution architecture, the solution components of eDocument solution are

  • eDocument Framework
  • Country specific solution (built on top of eDocument Framework)
  • SAP ERP, option for e-document processing add-on
  • SAP Cloud Platform Integration

eDocument Framework can be implemented in an ECC or S/4HANA system by implementing certain list of notes manually via SNOTE or via TCI (See  SAP Note 2134248 – eDocument Framework – Installation Overview). Implementing via TCI is a better approach as it reduces manual effort and speeds up the implementation process.

Country specific solution are built on top of the eDocument Framework. To enable the solution for a particular county, additional notes related to that country needs to be implemented.

SAP ERP, option for e-document processing add-on. This add-on has a limited runtime usage right for the Application Interface Framework (AIF) and is used to map transactional data to required XML format. AIF additionally provides below key features

  • One approach for multiple countries and eDocument types
  • Business monitoring in ERP
  • Structured display of eDocument data
  • Start follow up actions (e.g. re-submit, verify authorization)
  • Display/download exchanged XML files
  • Navigate to source documents (e.g. Delivery Note, SD Invoice, FI Invoice)
  • Flexible Mapping and Process Management
  • Proxies to connect to SAP CPI containing complete data structures for the country-specific formats

Note: SAP ERP, option for e-document processing add-on requires separate license (See Note 2378414)

SAP Cloud Platform Integration (CPI) is used as a communication platform to establish communication with external systems by using web services to send data from SAP ECC or S/4HANA and to receive data from external systems. SAP Cloud Platform Integration also formats the data to comply with the Web service parameters, signs the document digitally, and establishes a secure connection using SSL. Other key features of CPI are as below

  • Synchronous and asynchronous message exchanges
  • Support for multiple endpoints (service URLs) on the same integration flow
  • Support for several digital signature formats
  • Secure Keystore keeps certificates and credentials on customer’s own tenant
  • Easy compression, encoding and assembling of XML envelopes to comply with the communication standards required by different laws from different countries

Note: SAP Cloud Platform Integration requires subscription

eDocument Framework provides a central cockpit (tcode: edoc_cockpit) for monitoring and managing eDocuments

Typically there are two solution variants of eDocuments. Full Solution and Basic Enablement. As the solution offering is country specific, it is highly recommended to view the help link to get more details.

eDocument Full Solution

eDocument Full solution allows to create eDocuments based on source documents created in SAP Applications such as Financial Accounting (FI) or Sales and Distribution (SD) and transmit them to external systems using the required format

Implementing full solution has several advantages

  • One Solution, End-to-End approach
  • Unified user experience
  • Reduced set of tools
  • Reduced Total Cost of Operation
  • Faster realization time
  • Minimal or No development skill set needed
  • Adoption without disruption to ongoing projects and with minimal workforce

Requirements for eDocument Full Solution using SAP CPI are:

  • eDocument Framework
  • SAP ERP, option for e-document processing add-on. This add-on has a limited runtime usage right for the Application Interface Framework (AIF)
  • SAP Cloud Platform Integration
Process flow:

The processing of the eDocument when using the eDocument Full solution using CPI is as depicted in the figure below

  1. Source document using an SAP application, such as in FI or in SD is created. Once the source document is saved, the system creates an instance of the eDocument in the database.
  2. eDocument is submitted from the eDocument Cockpit ( EDOC_COCKPIT transaction) manually or by scheduling the program EDOC_BACKGROUND.
  3. The system retrieves the eDocument from the database and calls the interface connector to deploy the eDocument Interface connector (EDOC_INTERFACE_CONNECTOR) Business Add-In (BAdI). This BAdI calls the AIF_PROXY interface type that enables the system to connect to AIF.
  4. AIF maps the transactional data into the required XML format and saves the XML files
  5. The system calls SAP Cloud Platform Integration via an ABAP Proxy and establishes communication with the tax authorities’ or business partners’ systems.
  6. SAP Cloud Platform Integration processes the XML to comply with the official communication requirements (such as encoding and digitally signing the eDocument) and triggers the corresponding Web services for sending the XML file over to the external system.
  7. SAP Cloud Platform Integration receives information regarding the status of the request back from the external systems, transforms it into a consumable format (by decoding and mapping the result) and forwards that together with the signed eDocument (if applicable) to AIF and to the SAP system
  8. The system updates the eDocument in the database with information sent back from the external systems

Basic Enablement

The eDocument Basic Enablement allows to extract the data of source documents created in other SAP applications such as Financial Accounting (FI) or Sales and Distribution (SD), and make it available in the database as an eDocument instance for further processing. Customer-specific implementation is needed to do the following

  • Map the data to the legally required XML format.
  • Submit the XML to the tax authorities.
Process flow:

The processing of the eDocument when using the eDocument Basic Enablement is as depicted in the figure below

  1. Source document using an SAP application, such as in FI or in SD is created. Once the source document is saved, the system creates an instance of the eDocument in the database.
  2. eDocument is submitted from the eDocument Cockpit ( EDOC_COCKPIT transaction) manually or by scheduling the program EDOC_BACKGROUND
  3. The system retrieves the eDocument from the database and calls the interface connector to deploy the eDocument Interface Connector ( EDOC_INTERFACE_CONNECTOR) Business Add-In (BAdI). This BAdI contains the implementation that connects to customer-defined solution.
  4. Customer-defined solution retrieves the eDocument from the BAdI interface, converts it into the required XML format, and establishes the communication with the tax authorities’ or business partners’ systems to send the XML files

eDocument Basic Solution:

For some countries, the Basic Enablement contains additional functions and it is called eDocument Basic Solution. The following is available:

  • Saving the submitted XML file in the eDocuments database.
  • Update the eDocument status by implementing BAdIs to connect to customer-specific development

Archiving of eDocuments

eDocument Framework supports ILM (Information Lifecycle Management) enabled archiving and deletion of eDocument. Some of the salient features are as below:

  • Archiving of eDocument tables and country extension tables via archiving object EDOCUMENT.
  • Blocking of actions and personal data in the eDocument Cockpit for eDocuments with blocked business partner(s)
  • Enablement of retention policies through Information Lifecycle Management (ILM)
  • Display of Archived eDocument data in the cockpit

In my next blog(s), following topics will be covered:

  • Customization settings in eDocument Framework and AIF
  • Available BAdis and their usage
  • Configuration and deployment of iFlows in SAP Cloud Platform Integration
  • Troubleshooting and error analysis

 

 

 

 

 

 

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Andy Silvey

     

    Hi Former Member,

    this is a great very useful blog thanks.

    Quick question, regarding Archiving for eDocuments,

    the archiving happens on-premise from the SAP backend source system

    or the archiving happens in the eDocuments in the SAP Cloud Platform ?

    Best regards,

    Andy Silvey

    (0) 
    1. Jelena Perfiljeva

      Andy, did OP have a name when you posted? “Formerized” folks won’t get notified of the comments, unfortunately. Might want to post this as a question.

       

      (0) 

Leave a Reply