Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
mfregon
Participant
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) 

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

 

  1. Create class ZCL_EDOCUMENT_MY as a subclass of CL_EDOCUMENT

  2. Create a new record on view EDOCOUNTRYTCH for Country “MY”, Class “ZCL_EDOCUMENT_MY”, and Proc.Mgr active

  3. Create a database table to store eDocument instance information, using EDOC_GUID as a key field.

  4. Create a new eDocument type at view EDOTYPEV and specify the table name created before.

  5. Create a DB handler interface. Should have a method for each of the possible operations such as INSERT, DELETE, MODIFY, SELECT, etc.

  6. Create a DB handler class as a subclass of CL_DOCUMENT_DB and implement the interface created before.

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

  8. Create the SAP Application Interface Framework interface mapping structures. You can directly reuse or create a copy of existing structures.

  9. Implement a class as a sub-class CL_EDO_MAPI_AIF. 

  10. Implement Process Manager using view cluster EDOC_PROCMGR.

  11. Configure eDocument Interfaces using views EDOINTERFACEV, EDOINTVERSIONV, EDOPROCSPINTDETV, EDOPROCSTEPDETV and EDOINTTYPEV

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

    • Activate FI_INVOICE in view EDOCOMPANYACTIV

    • Assign eDocument Type to Accounting Document Type (T003EDOC)

    • In the Develop the Interface Connector ABAP Class Business Add-In, copy from the sample implementation of the interface connector class.

    • create a new implementation for BADI EDOC_INTERFACE_CONNECTOR

    • Specify the implementation and create the BAdI implementation ABAP class using the one copied above.

    • Create the runtime filter value for the BAdI

    • 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




 

 

Reference: Extensibility for Electronic Document Processing | SAP Help Portal
9 Comments
delaereb
Explorer
0 Kudos
Hi Marcos,
Nice overview!

"SAP Standard does not provide an eInvoice solution for Malaysia as same as Italy"
Is this an official statement from SAP?
Don't see an update on Legal Change Notification or DRC Community.
mfregon
Participant
0 Kudos

Hi Bart,

At this moment I do not see any thing regarding eInvoice solution for Malaysia from Sap documentation.

See below:

https://help.sap.com/docs/SAP_S4HANA_CLOUD/71af4585db6d4904b1724730f3776c9b/097165e9c1074038847625e5...

https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/3b2c091e13434f9ab2fb53d147ba5e9f/097165e9c1074038847...

If You are still in doubt, You can issue a ticket to SAP Support and ask. 

If You do this, please let us know the official position from SAP.

 

Thanks.

 

 

 

delaereb
Explorer
Hi Marcos,

1/ On the DRC Virtual Summit of last September - I saw Malaysia on "New Legal Mandates" in the column 'Under consideration (law to be confirmed or under analysis).

2/ On LCN on Expected Solution, we see:
"We are currently analyzing the information available, including the e-Invoice Guideline and Catalogue released by the LHDN on September 29, 2023. In the meantime, we are waiting for the LHDN to release the following tools ..."

https://me.sap.com/lcnotification/GSREQAPJ-4797/MidColumnFullScreen/0

 

That's why I'm curious about the origin of your statement "SAP does not provide an eInvoice solution for Malaysia".
erika_buson
Product and Topic Expert
Product and Topic Expert

Hi Marcos -

Thank you for the informative blog, however it indeed doesn’t represent the latest status as SAP is currently evaluating the solution for Malaysia and expects to update roadmap/legal change announcement shortly.

The links added to the previous comments represent the scope already released to customers, they don’t include roadmap items. Of course, the solution for e-invoices in Malaysia is not released yet as there are no API / test system from tax authorities yet and tech specifications are still WIP. This means there can’t be any working solution at this stage.

For upcoming legal changes, the recommendation is to use our Announcement of Legal Changes where you can find the latest status of upcoming regulations, including Malaysia:

-          SAP S/4HANA Cloud, private edition / SAP S/4HANA / SAP ERP: https://launchpad.support.sap.com/#/legalchangenotification/NoteInforSet/jira=GSREQAPJ-4797/MidColum...

-          SAP S/4HANA Cloud, public edition: https://launchpad.support.sap.com/#/legalchangenotification/NoteInforSet/jira=GSREQAPJ-4798/MidColum...

If SAP would have decided to not support, they would be marked ‘out of scope’. As you can see, it's not the case. Stay tuned as they will be updated shortly.

 

UPDATE Nov 1, 2023: SAP has confirmed roadmap for e-invoices in MY. Scope and timeline detailed in the links above.

Thank you. Erika

erika_buson
Product and Topic Expert
Product and Topic Expert
Hi Both - this is to confirm SAP has published the roadmap for e-invoices in Malaysia. I confirm SAP plans to provide a standard solution enabling the integration with SAP Document and Reporting Compliance, cloud edition. Subject to release of test environment from authorities, it's now planned for mid April 2024.

https://launchpad.support.sap.com/#/legalchangenotification/NoteInforSet/jira=GSREQAPJ-4797/MidColum...

 

Any customer involved in the pilot with tax authorities can reach out to us.

Thank you. Erika

Hi Bart,

You can find the latest update on official statement from SAP below, written by Mervyn, our SAP LPM (Localization Product Management) colleague for Malaysia :

https://blogs.sap.com/2023/10/03/electronic-invoicing-in-malaysia/

Thank you.

amitcruz
Participant
0 Kudos

Hello Erika,

I have heard that SAP has now shifted focus on providing integration to tax authorities via SAP Document and Reporting compliance Cloud Edition rather than SAP Integration suite to reduce ongoing effort for patches and to keep the connection up running.

Will SAP consider SAP Integration suite, or will they use SAP Document and Reporting compliance Cloud Edition hosted on BTP for Malaysia E-Invoicing solution?

Regards,

Amit

erika_buson
Product and Topic Expert
Product and Topic Expert
Hi Amit - yes, in-line with our strategy and with the aim to minimise the effort for customers, it will be with SAP Document and Reporting Compliance, cloud edition. Also, please note there will be also optional exchange to business partner via Peppol network.

Thank you. Erika
martinlitalin
Product and Topic Expert
Product and Topic Expert
0 Kudos
If you check the legal notification tool (https://me.sap.com/legalchangenotification) you will see that SAP will indeed cover Malaysia E-Invoicing.
Labels in this area