SAP DRC free E-Invoicing integration for Israel

6 minutes read
334 Views

Introduction

The Israel Tax Authority (ITA) has mandated electronic invoicing for B2B VAT-registered invoices exceeding 25,000 ILS from May 5, 2024. To comply, we have developed a custom solution using the standard eDocument framework to integrate SAP ECC with the ITA Portal, avoiding the need for SAP DRC to minimize costs and effort. While SAP DRC can be used for this integration, our approach focuses on a more cost-effective, custom solution. This blog will detail how we achieve this integration without SAP DRC.

Prerequisites

Solution Overview

Customer Invoice Processing

Solution Steps

  • Automatic Invoice Upload

When a customer invoice is released, it is automatically transferred to the eDocument Cockpit.

  • Trigger Submission

Upon arrival in the eDocument Cockpit, a custom functional module triggers the submission process without manual intervention.

  • Generate Payload

 The functional module processes invoice details and creates the required payload using a customized ABAP program.

  • Send to Authority

The ABAP program sends the payload to the Israeli tax authority portal for approval.

  • Handle Response

The tax authority returns an allocation number if the invoice is approved, or error messages if not.

  • Process Response

A custom ABAP program formats the response accordingly. The allocation number is stored in the eDocument Cockpit if approved, or error details are recorded if not.

Supplier Invoice Processing

When you are using the standard SAP DRC solution to verify the allocation number, typically you cannot validate it without saving the invoice first. After saving the invoice, you should navigate to the eDocument cockpit screen to verify the allocation number. 

However, in our solution, we validate the allocation number immediately after users enter it. This eliminates the need for users to save it or switch to another screen to confirm the allocation; the allocation number can be validated directly from the same screen by this solution.

Solution Steps

  • Trigger Validation

 When an allocation number is entered in the IRN field (e.g., in FB60, FB65, MIRO, MIR7), a custom ABAP program is triggered to validate it with the ITA.

  • Send Allocation Number

The customized program retrieves the allocation number and sends it to the ITA in the required format.

  • Receive Response

 The ITA responds with a confirmation if the allocation number is valid, or error messages if it is not.

  • Process Response

An ABAP program processes the ITA’s response and generates the appropriate popup message content for FB60, FB65, MIRO, and MIR7.

  • Display Result

If the ITA confirms the allocation number, a success popup message is displayed. If not, an error popup message appears on the screen for the user.

Implementation Details

1.Creating a Customized Screen for Generating Access Tokens

  • A personalized screen has been created to store client credentials along with authorization objects.
  • The authorization object guarantees security and controls access to the screen.
  • This personalized screen provides the access token for the custom “ABAP Program” while submitting the request to ITA.
  • Each access token comes with its own expiration time, so it’s crucial to refresh it regularly to prevent authorization errors. Users have the option to manually refresh the access token or automate the process through a background job. The background job will regularly renew the access token for every 30 mins (you can change timing as needed).


2.SSL certificate upload

  • To utilize an external URL (ITA URL) in the SAP ECC system, it is necessary to upload the URL’s SSL certificate. 
  • To do so export the SSL certificates for ITA URLs in your browser. Next, navigate to the STRUST transaction code and upload your SSL Certificate.

3.Customer Invoice

  • Triggering functional module to initiate automatic submission process

Automated submissions reduce human intervention and accelerate the approval process.

SAP offers a standard extension in SPRO to enable automatic submission. For further information, please visit 

https://help.sap.com/docs/SAP_ERP/c17ab0bc78dc4a72960be5a4e564e8e8/01d495cff15c4c61aed39f6bcc568a52.html.

Once you configured the extension. The function module will be triggered immediately after the creation in a separate session, using tRFC (transactional Remote Function Call). You can monitor the execution results in the bgRFC Monitor (SBGRFCMON).

  • Creating the request payload

Once the functional module is triggered, it gathers the necessary information from the customer invoice and prepares the request payload. For more details you can visit,

https://www.gov.il/BlobFolder/generalpage/israel-invoice-160723/he/vat_software-houses-180724-en.pdf

  • Sending the request payload to ITA

The generated payload is then sent to ITA. Sample code for reference.

4. Supplier Invoice

  • Executing the custom ABAP program to validate the allocation number.

To activate the custom ABAP program automatically when the user enters the allocation number in the IRN field (within fb60, fb65, MIRO, MIR7),  you can utilize the SAP Standard Functional Module “J_1IG_VENDOR_SUBSCR”.

Then you can put your enhancement inside “LJ_1IG_VENDOR_SUBSCRF01”. This enhancement will be called automatically once the user enters the allocation number in IRN Field (within FB60, FB65, MIRO, MIR7).

  • Creating the request payload

Once the enhancement is triggered by “LJ_1IG_VENDOR_SUBSCRF01,” a custom ABAP program will gather the necessary data and create the payload.

For additional information about the API, please refer to: 

https://www.gov.il/BlobFolder/generalpage/israel-invoice-160723/he/vat_software-houses-180724-en.pdf

  • Sending the request payload to ITA

The prepared payload is then sent to ITA for validation of the allocation number. This process occurs simultaneously after the user enters the allocation number in the IRN field for quick response.

  • Showing the results as popup message

If the sent allocation number is valid, ITA will respond with a confirmation. Otherwise, ITA will send the corresponding warning or error messages.

After receiving the results from ITA, the custom ABAP program will process them and generate a popup message as needed.

Benefits of the Custom Solution

  • Cost Efficiency

 Eliminates the need for SAP DRC and BTP implementation, reducing overall costs.

  • Enhanced Speed

 Accelerates supplier invoice verification by allowing users to validate the allocation number directly, without saving the invoice or switching screens.

  • Streamlined Process

 Improves user experience by providing immediate validation feedback, thus optimizing the workflow and reducing manual intervention.

Leave a Reply

Your email address will not be published. Required fields are marked *