Skip to main content

FS² CCC – Cleanup of Inconsistent Operation Data (DBSQL_DUPLICATE_KEY_ERROR)

When saving an operation (case), a runtime dump DBSQL_DUPLICATE_KEY_ERROR may occur. This happens due to inconsistent or invalid (“waste”) data in operation-related database tables.

S
Written by Strutzke, Marcel

Product Area

FS² CCC


Problem

You may observe the following behavior:

  • Dump type: DBSQL_DUPLICATE_KEY_ERROR

  • Occurrence: Sporadic and not reliably reproducible

  • Scenario: Saving a newly created operation fails

Root Cause (Current Understanding)

The exact root cause is not fully identified yet.

Observed behavior:

  • Inconsistent data already exists in database tables

  • A COMMIT may be triggered too early, before the file framework completes the save process

  • This leads to a corrupt or inconsistent database state

Potential technical origins:

  • API classes

  • File framework save logic

Because the issue cannot currently be reproduced in a controlled environment, a permanent fix is not yet available.


Solution Steps

Preferred Solution: Universal Correction Program

Use the centralized cleanup program:

Program Name:
ZMSTR_CORR_OPERATION_TABLES

Transport:
SPEK982044

Purpose:
Clean up inconsistent (“waste”) data across all relevant operation tables.

Key Features:

  • Dynamically processes a predefined table list

  • Checks table existence before processing

  • Prevents runtime errors (e.g., missing tables)

  • Works across different system configurations

  • Central and reusable approach

Functional Scope:

  • Detects inconsistent entries

  • Deletes invalid data

  • Restores data consistency across operation-related tables

Covered Tables:

The program processes a large set of tables, including (excerpt):

  • /SOP/*

  • /SWAG/*

  • /SWSM/*

  • /SWTM/*

  • Custom tables like ZSOP*, ZSRS*, ZSWSM*

This includes modules such as:

  • Case Management (CM)

  • Debt Management (DM)

  • Legal Debt (LD)

  • External Accounting (XA)

  • SWAG FX

  • And many others

Recommendation:
Always use this program first. It provides the most complete and robust cleanup.


Alternative: Legacy Correction Programs

If the universal program cannot be used or a specific module requires targeted cleanup, use one of the legacy programs.

Available Programs:

  • ZMSTR_CM_OPERATION_TABLES

  • ZMSTR_DM_OPERATION_TABLES

  • ZMSTR_KFAL_OPERATIONS

  • ZMSTR_LD_MHNB_OPERATIONS

  • ZMSTR_LD_PAMN_OPERATIONS

  • ZMSTR_LD_PART_OPERATIONS

  • ZMSTR_LD_REFX_OPERATIONS

  • ZMSTR_LD_ZVSG_OPERATIONS

  • ZMSTR_LD_ZVTI_OPERATIONS

  • ZMSTR_SWAGFX_APPR_OPERATIONS

  • ZMSTR_SWAG_TERM_AUFG

  • ZMSTR_XA_OPERATION_TABLES

Characteristics:

  • Focus on specific modules or tables

  • Use hardcoded table logic

  • Limited scope

  • Higher maintenance effort

When to Use:

  • For targeted cleanup in a specific module

  • If required for already delivered customer-specific fixes


Known Limitations

  • These correction programs are temporary workarounds

  • They do not address the root cause

  • The issue may reoccur after cleanup

  • The problem is currently tracked in Jira: FSCCC-1820

  • No controlled reproduction available yet

Attachment icon
Did this answer your question?