Symptom
The following error DBSQL_DUPLICATE_KEY_ERROR appears in a Realignment Run.
Job log shows the following - Internal session terminated with a runtime error DBSQL_DUPLICATE_KEY_ERROR
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
While running a reallingment in the App - Realingment Run, the error Duplicate Key Error appears.
Cause
Due to the system design, realignment runs are not intended for periodic execution. Running the same jobs repeatedly without copying and executing the original realignment run as a new instance leads to the DBSQL_DUPLICATE_KEY_ERROR.
Issue can also arise if the job is cancelled before completing fully.
Resolution
Avoid running the same jobs twice. If this issue was to occur please create smaller packages for the realignment runs in order to avoid the problem.
Another option is to copy your cancelled realignment run and restart it.
Please see following SAP Help document -
and the section for -
Copy -
You can copy an existing realignment run or request by positioning the cursor on that line and choosing More -> Edit -> Copy. You must enter a new text in the copy in order to distinguish it from the original.
See Also
Keywords
DBSQL_DUPLICATE_KEY_ERROR, realignment run, periodic execution, RK47A000, FLUSH, RK47A000, RKEVRK47_2_CLOUD, CX_SY_OPEN_SQL_DB. , KBA , CO-PA-2CL , Profitability Analysis (Public Cloud) , CO-PA-ACT , Flow of actual values , Problem
SAP Knowledge Base Article - Public