System State Table

General structure

When a transaction document is saved by STEPforward, it is stamped with the number of the current system state. The system state is incremented every time when a closed accounting period is re-opened by the Fiscal Periods editor, or the Transaction Data Entry application. Having every accounting transaction marked with the system state enables STEPforward to recreate the "picture" of the system that existed at any time in the past, regardless of when and how many accounting periods changed their status.

System states are stored in the system table named SF_SYSSystemState of the following structure:

Column Generalized data type Use
State SMALLINT System state
SF_DateChanged CHAR(8) Date when the state was recorded (CCYYMMDD)
SF_TimeChanged CHAR(6) Time when the state was recorded (HHMMSS)
SF_TimeStamp SMALLINT Version of the row (incremented with each update)

Notes:

The table contains one row for each system state. When the previously closed accounting period is re-opened, a new row is entered into the table with the next available state number and current date/time stamp of the reopening (columns SF_DateChanged and SF_TimeChanged).

The following is a sample of contents of SF_SYSSystemState table:

State SF_DateChanged SF_TimeChanged
----- -------------- --------------
1     19960509       100920
2     19971117       122530
3     19980105       093411

Indexing

The following indices are created on SF_SYSSystemState table (the exact syntax of the CREATE INDEX command varies from one RDBMS to another; the following example shows the command formatted for Sybase):

create index SystemStateDate on SF_SYSSystemState (SF_DateChanged,SF_TimeChanged)
create unique index SystemState on SF_SYSSystemState (State)