SAP Knowledge Base Article - Public

3291244 - How to avoid number gaps when using Journal Entry Post API

Symptom

You would like to know how to avoid number gaps when using Journal Entry Post API -Synchronous or Journal Entry Post API - Asynchronous.

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."

Environment

SAP S/4HANA Cloud

Cause

For the synchronous or asynchronous Journal Entry Post API, we provide the function of test run in payload. One is in the request level, and there is only one for each payload. The other is in the journal entry level, and there is one for each journal entry. 

Please note, only if the TestDataIndicator equals to true in request level, it's test run. 
If TestDataIndicator equals to false in request level and it equals to true in journal entry level, then it will cause number gaps issue, which means the number is taken, but no real post. The number won't be used by next journal entry anymore.

Resolution

If you need to do test run, please ensure "<TestDataIndicator>true</TestDataIndicator>" in request level to avoid number gaps issue. 

The gap could be traced by choosing Check Gaps for Journal Entry Numbering in app Audit Journal

See Also

SAP Community: Payload Examples for API Journal Entry – Post

Keywords

API Journal Entry – Post (Synchronous), API Journal Entry – Post (Asynchronous), Test run, Number gaps. , KBA , AC-INT , Accounting Interface , How To

Product

SAP S/4HANA Cloud all versions