Skip to Content
Technical Articles
Author's profile photo Yasin N

E-Invoice SAP Implementation Guide for KSA

Announced by: General Authority of Zakat and Tax – Saudi Arabia
Phase 1 (4 December 2021).
PHASE 2 (starting from January 1st, 2023).


Zakat, Tax and Customs Authority announced that E-invoicing implementation will be mandatory effectively from December 4, 2021 for all taxpayers subject to VAT at Kingdom of Saudi Arabia

Electronic invoicing will be rolled-out in two phases:

Phase 1 (4 December 2021) (Dead Line).

PHASE 2 (starting from January 1st, 2023).

invoice issuance should be through a compliant electronic solution  including additional fields (All will be covered and explained later in this blog)

Phase 1 (Generation Phase) (December 4, 2021)

Phase 1 known as the Generation phase, will require to generate and store tax invoices through electronic solutions compliant like companies who are already using SAP ERP are fully compliance.


  1. NO manual invoices, handwritten invoices and invoices written using text editing tools like word, excel…etc are not accepted.
  2. Use a compliant electronic invoicing solution: e-invoicing solutions must comply with the requirements and specifications published by the General Authority of Zakat and Tax, which are for Phase 1 as follows:
    • Generate e-invoices with the required elements including QR codes.
    • Timestamp the e-invoice copies archived in the solutionAbsence of prohibited functionalities:
    • Uncontrolled access
    • Software time change.
    • Tampering of e-invoices or logs this will include Ex: (delete invoice without log).
    • Multiple invoice sequences​ (one serial number range only is accepted)
  1. Ensure invoices include the required additional fields (will be covered bellow in this article)

Note: If you are using one invoice layout it is better to include QR code even if it is optional.

How to comply with Phase One (December 4, 2021)

  • Use compliant E-invoicing system like SAP.
  • Understand the required E-Invoice Fields (Address, QR).
  • Issue and store E-invoices.

Use compliant E-invoicing system

if you are using SAP ERP you already have the minimum requirement (business, technical, security, etc.) In addition, SAP developers and subject matter experts can take care with any additional requirement

Understand E-Invoice Fields

  • QR Code
  • National Address

Generating and storing E-invoices

Generating and storing E-invoices using compliance system like SAP.

Ensure all elements of the tax invoice are fulfilled

Generation of E-invoices must include all fields in accordance with VAT regulations in addition to:

(Tax Invoice)

The VAT number of the buyer if the buyer is a registered VAT taxpayer. QR Code can be added (Optional) if you are using tow invoices layouts but if you are using one invoice layout which is the tax invoice you must put QR code

Note: Seller National Address and Buyer National Address is required.


(Simplified Tax Invoice) (mandatory QR)

A mandatory QR Code generated by the taxpayer’s E-invoicing solution in accordance with ZATCA’s specifications.

E-invoice Samples (as Published by General Authority of Zakat and Tax Saudi Arabia)


QR code specifications and structure

1- Seller’s name

2- VAT registration number of the seller

3- Time stamp of the invoice (date and time)

4- Invoice Total including VAT

5) Invoice total (with VAT)

QR Base64 Encoding (Very Important)

QR Code must Base64 Encoded, ABAP Developer support is required and bellow SAP ABAP FM will be involved in encoding process:

Hexadecimal to string convert HR_RU_CONVERT_HEX_TO_STRING for Length

FM SCMS_STRING_TO_XSTRING to Convert String to Xstring.

FM SCMS_BASE64_ENCODE_STR  to Convert the Xstring to Base64.

it is mandatory to generate and print QR code encoded in Base64 format with up to 500 characters that must contain the fields specified in the below table

  • The QR code fields shall be encoded in Tag-Length-Value (TLV) format with the tag values specified in the “Tag” column of the adjacent table.
  • The TLV encoding shall be as follows:

○ Tag: the tag value must be stored in one byte

              [for tags 1 to 5]

○ Length: the length of the byte array resulted from the UTF8 encoding of the field value.

○ Value: the byte array resulting from the UTF8 encoding of the field value.

Field Tag Enforcement date
Seller’s name 1 from 4th December 2021
VAT registration number of the seller 2
Time stamp of the invoice (date and time) 3
Invoice total (with VAT) 4
VAT total 5


PHASE 2 ​(Integration Phase) (starting from January 1st, 2023)

Phase 2, known as the Integration phase and rolled-out in waves by targeted taxpayer group. ZATCA will notify taxpayers of their Phase 2 wave at least six months in advance.


E-Invoicing Implementation aims to convert the issuing of paper invoices into an electronic process that allows the exchange and processing of invoices in a structure electronic format. I will not cover PHASE 2 requirement in this blog since it is too early to discuses.

Your comments and contributions are most welcomed.


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Shankarappa H L
      Shankarappa H L

      Dear Yasin,


      Thanks for detailed information about E- Invoice & appreciated. We are implementing the E-Invoicing for KSA, We are executing the EDOC_COCKPIT & finding the invoices with error due fields are not maintained (example Field Building Number is empty in AccountingSupplierParty) same way for Country, City, Registration, Tax Category). Please confirm where should we maintain required E-Invoices Fields.

      Are both seller & supplier same?


      • Understand the required E-Invoice Fields (r, QR).
      Author's profile photo Former Member
      Former Member

      Company Code Address.

      Author's profile photo Yasin N
      Yasin N
      Blog Post Author


      Hi, Shankarappa

      I didn't test on EDOC. the fields must be maintained on customers data..


      Author's profile photo SAP S4 HANA project team
      SAP S4 HANA project team


      By when we can expect the 2nd phase documentations . Please help

      Thanks in advance


      Author's profile photo Former Member
      Former Member

      Any update on 2nd phase documents/configuration guidelines.

      Author's profile photo Yasin N
      Yasin N
      Blog Post Author

      I believe The delivery documents is not yet defined by SAP.