SAP ERP Solution unit onboarding guide for e-Invoicing in KSA
As part of the phase 2 e-Invoicing process, The Zakat, Tax and Custom Authority (ZATCA) requires its taxpayers to onboard their Electronic Invoice Generation Solutions onto the ZATCA’s e-Invoicing portal.
In the solution for onboarding, we have systemized and simplified this process for our on-premise and cloud-based customers. Following is the stepwise representation of the onboarding process to be followed in SAP ECC, SAP S/4HANA on premise and SAP S/4HANA cloud.
High level Process Steps
The following process step diagram represents the high-level process sequence that is followed for onboarding the taxpayer’s solution ID.
eInvoice generating solution unit (EGS)
This is a unique GUID of the taxpayers eInvoice generating solution. Taxpayers can consider one system as EGS or could also consider multiple logical separations within one physical system that generates the eDocuments and each of such separations is also called as EGS. In our solution, we consider the following parameters to create multiple unique logical units within one physical ERP unit to uniquely create a EGS unit.
- Company code
- Source type
- Invoice type
Every EGS needs to be onboarded with ZATCA to submit the eDocuments generated in its logical unit and each EGS will have its own Invoice counter value (ICV).
Table showing the different combinations possible for the creation of EGS in a company code.
Organizational unit for accounting.
This defines the source module in which the source document of an eDocument is created. For example, the source of SD billing document is SD_INVOICE (Billing Document) and for an invoice created directly in FI is FI_INVOICE (Accounting Document). For self-billing invoice, the source type is INV_VERIF (Invoice Verification – self billing).
These are the two broad classification of eDocuments as per ZATCA, i.e., Standard tax invoice and simplified tax invoice.
Compliance CSID (CCSID)
This is a cryptographic stamp identifier that is provided by ZATCA for only for performing the compliance checks.
Production CSID (CSID)
This is a CSID provided by ZATCA upon request after compliance checks are successfully completed. Every EGS unit has one unique production CSID. This is like your boarding pass of your flight journey . once you have received this it means you are good to kick off with the document submission to ZATCA.
Following is the detailed process flowchart that is defined in the solution for the onboarding process.
Onboarding programs in the solution
Following onboarding programs are built to manage the complete taxpayer onboarding process.
|Transaction name||Transaction code|
|Generate Solution Unit ID||SAEGSG|
|Manage Solution Unit ID||SAEGSM|
|Generate Cryptographic Stamp Id.||SACSIDG|
Generate Solution Unit ID
With this transaction, you can generate unique EGS units. As defined above, we have prefixed the parameters for which unique EGS units can be generated.
In this report, you will by default see all the possible combinations for the selected company codes for which you can generate the EGS unit ID by simply selecting the records and clicking on Generate solution ID button. depending on your business scenario, you need to select only the applicable combinations and create the EGS.
For multiple company codes selected in the selection screen of this report, you also can select the leading company code among them. In case a leading company code exists, the parameter value company name is copied from the leading company code. Please maintain in this company code, the organization name registered with ZATCA.
Manage Solution Unit ID
With this transaction, currently you can delete incorrectly created EGS units for which CCSID is not yet assigned by ZATCA. i.e., for example, you incorrectly selected an unnecessary entry in the generate solution ID report for which you already created the EGS GUID and later when you consider not to proceed with further steps and create a CCSID so you can delete this EGS unit ID in this transaction and create the correct one if required using Generate Solution Unit ID report.
Generate Cryptographic Stamp Id.
With this transaction, you can manage all the remaining onboarding process. i.e., further to the creation of the EGS unit GUID, as a next step you need to create the compliance CSID to perform the compliance checks.
The following functions that can be performed in this transaction are explained in its sequence of occurrence.
- Request CCSID
- Check Compliance
- Request CSID
For the selected EGS unit in this report you can click on the request CCSID button to request the Compliance Cryptographic stamp identifier from ZATCA. This step is a prerequisite to perform the compliance check.
Immediately after you click on the Request CSID button, you will be asked to enter the OTP that is generated from ZATCA ERD portal. The OTP needs to be manually generated by the taxpayer and the same needs to be entered in this report.
This report will then request ZATCA for the compliance CSID by sending the CSR generated with reference to the selected EGS unit through the API /compliance. The status of the EGS unit will then be updated with the status code “CCSID_REC – CCSID is received”
As part of the onboarding process, the taxpayer needs to check for the compliance of the document types in the ZATCA Fatoora portal before it can start submitting the eDocuments to the Fatoora platform. This report facilitates in doing this function with the click of the button “Check Compliance” in this report.
When you click it, the system sends the sample static eDocument of the relevant invoice type for which the EGS unit is generated to ZATCA through Compliance check API /compliance/invoices and checks the compliance of the same. When the check is successful, the API returns the response code 200 upon successful check and returns the CCSID that can be used only for compliance checks.
In case of errors, this API returns the response code 400 when the entered OTP is wrong or if the subject compliant document submitted is not as per ZATCA standards. It returns response code 500 when the service at ZATCA end has any internal server error.
Further to receiving the response from ZATCA, this report allows to perform the next step in the process.
If the response code is 200, The status of the EGS unit is then updated with the status code “CCSID_COMP – CCSID Compliance check is completed”
This functionality in the report will request with ZATCA for the production CSID that needs to be used to interface the production documents with ZATCA’s Fatoora portal.
This button calls the API /production/csids and in return captures the CSID returned by ZATCA.
The status of the EGS unit will then be updated with the status code “CSID_REC – CSID is received”.
Deactivation of EGS
After you have successfully received the CCSID and the CSID and you then unfortunately have to change your company VAT number because you either previously maintained incorrect VAT number or you have received a new VAT number (though does not happen so often ), you will have to deactivate all the active EGS units per company code and only then you will be able to create new EGS units with the updated VAT number and onboard the same.
This functionality of deactivation of the existing active EGS units is available in the manage solution unit ID (SAEGSM) report.
Deactivation is an irreversible function. so please be mindful about it.
Before deactivating an existing active EGS unit, please ensure the below.
- You manually deactivated the CSID in ZATCA’s Fatoora portal. Deactivation of the EGS in SAP does not automatically deactivate the CSID in ZATCA’s system.
- Once you deactivate an EGS, you will not be able to submit the unprocessed eDocuments pertaining to such EGS. So, you process (submit or cancel) all the unprocessed eDocuments which have the same VAT number of the EGS you wish to deactivate.
Set the Effective start date
ZATCA informs its taxpayers at least 6 months in advance to kickstart the submission of the eDocuments to comply with the phase 2 regulation.
In our solution, we have provided a configuration to set this start date of eDocuments submission as effective start date of the integration for each relevant company code defined for KSA.
With this setting, the eDocument cockpit understands that the company code is ready to start the document submission from this date and stops the creation of eDocuments in the generation phase and starts creating them in the integration phase for the source documents created from and after this effective date. This from regulation perspective means that until this date, the taxpayer will remain in phase 1 i.e., generation phase.
Please ensure that SAP note 3236978 is implemented in your system to set the effective date.
Maintaining the effective start date is a prerequisite to start the document submission.
Cross-Application Components > General Application Functions > Document and Reporting Compliance > Country/Region-Specific Settings > Saudi Arabia – Maintain Effective Date of Integration with Tax Authority
Considerations to update the effective start date:
Process diagram showing key considerations in updating the effective date.
- Update of the effective date to a historical date is not allowed.
- Update of the effective date to a future date is allowed only in the below case.
- If the current date < the existing/new effective date in the system, then any future date from the current date can be maintained.
- If the current date >= the existing effective date in the system and no eDocuments are created under the new submission process, then any future date from the current date can be maintained.
That is all about onboarding. now you are all set to start submitting the documents to ZATCA.
I hope this blog is very informative. Please share your feedback and questions.
Other blogs on KSA eInvoicing
Some useful links
- SAP Document Compliance topic page
- Document Compliance Help Page
- Announcement Legal Notification
- KSA eInvoicing Webinar (Login required)
- Saudi Arabia E-Invoice Webinar 28Sep2022.pdf (sapjam.com) (Login required)
- [Release announcement] Phase 2 Solution for Saudi Arabia Electronic Invoicing (sapjam.com) (Login required)
Note: For accessing the last three links listed above you need to login to MENA Localization SIG – Overview (sapjam.com)