Symptom
Romania eInvoice error - while submitting the eDocument below error is encountered-
Function EDOC_AIF_GENERIC_ACTION was not executed successfully
Error code: 401 -> Unexpected HTTP Status Code 401 for API action
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- eDocument cockpit application
- Select the source document
- Submit the document
- Error occurs
Cause
Configuration - Tax authority regulations
Resolution
- Romanian Tax Authority recently made a significant change to the OAuth process. Specifically, support for Opaque type bearer tokens has been stopped as of July 1st 2024.
- To resolve this issue, it needs to generate a JWT (JSON Web Token) type access and refresh token >> next configure these tokens in DRC CE.
Once completed, submissions should proceed successfully. - For detailed instructions on how to generate JWT tokens, refer to page 23 of the PDF titled "OAuth Procedure for Registering Applications on the ANAF Portal".
Keywords
eDocument, EDOC_COCKPIT, Romania, eInvoice, Tax authority, submit button, JWT, Error 401, Unexpected HTTP status code 401 for API action, Function EDOC_AIF_GENERIC_ACTION was not executed successfully , KBA , CA-GTF-CSC-EDO-RO , DRC: Electronic Document for Romania , Problem
Product
SAP S/4HANA Cloud Public Edition all versions