Miscellaneous Toolkits

Toolkit 1 - Reset Period Sequence Keys for Un-posted Amortization Sequences

This toolkit is designed to correct the situation where a unique constraint SQL error occurred when posting amortizations due to duplicate keys inserted into the GL_POST_SUM table.

Problem Details

When an invoice is created in the Create Invoices or Maintain Invoices (Materials » Sales Order Entry » Invoices) applications for a SO line with an Amortization Code associated with it, the system automatically creates an amortization schedule based on the code.

When the PD_SEQ_KEY is copied from AMORT_SCH_PD into SO_INVC_LN_AMORT, however, if rows are inserted (rather than added) to the AMORT_SCH_PD (when creating the code), it is possible to have a situation where the PD_SEQ_KEY is decreasing even though PD_SEQ_NO is actually increasing.  When posting amortizations, the PD_SEQ_KEY is copied to the LVL1_KEY column for rows that are inserted into Z_OEPPOST_GL_DETL.  When the system inserts rows into GL_POST_SUM, the MAX(Z.LVL1_KEY) is based on the maximum value of LVL1_KEY from Z_OEPPOST_GL_DETL for rows with the same combination of ACCT_ID, ORG_ID, PROJ_ID, FY_CD, PD_NO.  For a scenario where the subsequent period has a lower PD_SEQ_KEY, the system does not use the lower key, but uses the previous higher one (same as that of previous period insert), thus  resulting in a duplicate.

This is a one-time application to correct existing data.  New data does not have this problem since the Create Invoices and Maintain Invoices (Materials » Sales Order Entry » Invoices) applications assign a new set of serialized keys into SO_INVC_LN_AMORT for the amortization schedules.

Screen

Click the Select button to access this application.

Click the Execute button to run this application.

Execution of this toolkit does the following: