0% found this document useful (0 votes)
179 views

Einvoice With SAP DRC Electronic Document Processing Using Extensibility Features

The document describes how to build an end-to-end electronic document processing solution using SAP Digital Business Platform. It involves creating an eDocument process class, database table, and handler. An Application Interface Framework interface, web service proxy, and other components are also created. The components are linked to process electronic documents from source documents to external systems.

Uploaded by

A Alam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views

Einvoice With SAP DRC Electronic Document Processing Using Extensibility Features

The document describes how to build an end-to-end electronic document processing solution using SAP Digital Business Platform. It involves creating an eDocument process class, database table, and handler. An Application Interface Framework interface, web service proxy, and other components are also created. The components are linked to process electronic documents from source documents to external systems.

Uploaded by

A Alam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

eInvoice with SAP DRC Electronic document processing using

extensibility features
Options

The end-to-end solution described below fits any new development for Electronic
document processing.

Why use SAP DRC for eInvoice?

The eInvoicing processing is very sensible and demands a high level of monitoring
and error handling and SAP DRC with its eDocument framework and SAP
Application Framework Interface (AIF) can together deliver a great solution to handle
this challenge.

Technical components

eDocument Framework - Create eDocuments based on source documents (SD


Invoice, FI Invoice, Accounting posting)

Application Interface Framework - Implement and Monitor interfaces. Field


Mappings. Value Mappings. Error handling.

Web Service Runtime - Allow to consume API Web Service (Soamanager)


SOAMANAGER is Transaction Code
SAP Cloud Connect - Handle authentication and message sending to Tax authority.

This figure gives an example of an architectural overview:

Context

The following figure depicts an example of electronic document processing.


Procedure
1. You create the source document (for example, an invoice) using an SAP
application. Once you post the source document, the system creates an
instance of the electronic document (eDocument) in the database.
2. You submit the eDocument by running the eInvoice process in the eDocument
Cockpit ( EDOC_COCKPIT transaction).
For more information, see the application help documentation directly in the
report.

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).
Note: This BAdI calls the interface type that enables the system to connect to
the Application Interface Framework.

3. The Application Interface Framework triggers the mapping of transactional


data into the required XML format and saves the XML files.
The system calls the integration service via an ABAP Proxy and establishes
communication with the tax authorities or business partners’ systems.
If the call is successful, the XML is saved. After successfully receiving the
response, the response XML is saved.
4. The integration service processes the XML to comply with the official
communication requirements and triggers the corresponding Web Services for
sending the XML file over to the external system.

5. The integration service 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 it to the
Application Framework Interface and this to the system.
6. The system updates the eDocument in the database with information from
external systems.

Developing the Process

Important: This guide assumes that you are familiar with ABAP development, SAP
Application Interface Framework, and integration flows from SAP Cloud Integration.
Creating an eDocument Process

Create class ZCL_EDOCUMENT_MY as a subclass of CL_EDOCUMENT

1. Create a new record on view EDOCOUNTRYTCH for Country “MY”, Class


“ZCL_EDOCUMENT_MY”, and Proc.Mgr active
2. Create a database table to store eDocument instance information, using
EDOC_GUID as a key field.
3. Create a new eDocument type at view EDOTYPEV and specify the table
name created before.
4. Create a DB handler interface. Should have a method for each of the possible
operations such as INSERT, DELETE, MODIFY, SELECT, etc.
5. Create a DB handler class as a subclass of CL_DOCUMENT_DB and
implement the interface created before.

6. Implement the class as a subclass of ZCL_EDOCUMENT_MY. Create an


attribute for DB connection using the ABAP interface you defined before.
Define the methods to handle the actions that were defined during the
process definition. Ex: Create, Send, Validate, and so on.
7. Create the SAP Application Interface Framework interface mapping
structures. You can directly reuse or create a copy of existing structures.
8. Implement a class as a sub-class CL_EDO_MAPI_AIF.
9. Implement Process Manager using view cluster EDOC_PROCMGR.
10. Configure eDocument Interfaces using views EDOINTERFACEV,
EDOINTVERSIONV, EDOPROCSPINTDETV, EDOPROCSTEPDETV and
EDOINTTYPEV
11. Configure the eDocument cockpit using views EDOMETASTATDETV,
EDOMAPCLASSDETV, EDOMETASTATUSV, EDOPROCFUNCASGV,
EDOPROCFUNCARCV,

Creating a Web Service Proxy


1. Create an Integration Flow in SAP Cloud Integration using WSDL provided by
tax authority.
2. Create the Consumer Proxy
3. Configure the Consumer Proxy logical port using SOAMANAGER

Creating an SAP Application Interface Framework (AIF) Interface

1. At this moment, the Consumer Proxy class created before is used.

Please refer AIF documentation to create the interface

Linking the components

1. Link the eDocument Process to SAP Application Interface Framework in the


view EDOINTAIFV

2. Link the eDocument Interface to the Web Service Proxy using


views EDOSOASERV and EDOINTV

3. Link the Business Process to Document Compliance by transaction FIBF


4. Link the Back-End Process

o Activate FI_INVOICE in view EDOCOMPANYACTIV

o Assign eDocument Type to Accounting Document Type (T003EDOC)

o In the Develop the Interface Connector ABAP Class Business Add-In,


copy from the sample implementation of the interface connector class.

o create a new implementation for BADI


EDOC_INTERFACE_CONNECTOR

o Specify the implementation and create the BAdI implementation ABAP


class using the one copied above.

o Create the runtime filter value for the BAdI

o In eDocument: Source Type (EDOSRCTYPEV), make sure the


structure and ABAP class used to relate the source information with the
Document Compliance Framework are in place

You might also like