Symptom
When posting with API Journal Entry - Post, the created Badi for example validation logic is not working properly.
But same validation works when doing manual posting.
Environment
SAP S/4HANA Cloud.
Resolution
The solution is to add 'WITH PRIVILEGED ACCESS' in the SELECT statement.
The logic of authorization between manual posting and API differs a little bit, in order to select complete journal entries when using Journal Entry - Post, 'WITH PRIVILEGED ACCESS' needs to be added.
Keywords
Validation, Journal Entry - Post, Post General Journal Entries, duplicate check. , KBA , FI-SL-VSR-2CL , Validation, Substitution and Rules (Public Cloud) , Problem