Data Templates Table

General structure

Information on Global, Subledger and Transaction Templates is stored in the system catalog table named SF_SYSTemplates of the following structure:

Column Generalized data type Use
SF_TemplateName VARCHAR(8) Name of the base Template
SF_CloneName VARCHAR(8) Name of the Template clone
SF_Description VARCHAR(255) Description of the Template
SF_Scope CHAR(1) Class of the Template (G, S or T)
SF_Domain CHAR(1) Domain of the Template (M or T)
SF_Type CHAR(1) Template type (Base or Clone)
SF_TemplateVisual BLOB Archived object for display of Template in WS
SF_TemplateExec BLOB Archived object for display of Template in MDE
SF_TemplateIndexData BLOB Archived object for composition of indices
SF_TemplateJavaExec BLOB Archived Java object for Client
SF_IdNumber SMALLINT Id number of the Template
SF_UserId VARCHAR(255) Login account of the user that last updated the row
SF_DateChanged CHAR(8) Date of the last update of the row (CCYYMMDD)
SF_TimeChanged CHAR(6) Time of the last update of the row (HHMMSS)
SF_TimeStamp SMALLINT Version of the row (incremented with each update)

Notes:

The table contains one row for each Template (base or clone) used by STEPforward. SF_CloneName is set to an empty string for base Templates.

SF_Scope is a one-character code that identifies the Template as Global (G), Subledger (S) or Transaction (T).

SF_Domain is a one-character code that identifies the Template as belonging to the category of the accounting transaction data (T) or general data (M) which includes both Global and Subledger categories.

SF_Type is a one-character code that marks the Template as being of the base (B) or clone (C) type.

SF_TemplateVisual stores an archived object that encapsulates the contents of the Workspace window when the Template is constructed. When the Template is loaded into the Template Builder, its Workspace, Palette and Inspector windows are populated from this object that is unarchived for this purpose.

SF_TemplateExec stores an archived object that creates the contents of the Master or Transaction Data Entry window when the Template is displayed. This object carries all text fields, buttons, images etc. that constitute the Template.

SF_TemplateIndexData stores an archived object that encapsulates the information on the user-defined indices used by the Template.

SF_TemplateJavaExec stores serialized Vector of Java objects that the remote Client uses to create the contents of the Master or Transaction Data Entry window when the Template is displayed. This object carries the Java representations of all text fields, buttons, images etc. that constitute the Template.

SF_IdNumber is the id number of the Template that is unique for each SF_Domain. That is, the same id number can be used for the Transaction Template and the Global or Subledger Template; however, within each template category the id numbers are unique.

The following is a partial sample of contents of SF_SYSTemplates table:

SF_TemplateName SF_CloneName SF_Scope SF_Domain SF_Type SF_IdNumber
--------------- ------------ -------- --------- ------- -----------
AP                           T        T         B       5
AP              APCheck      T        T         C       6
AP              APadj        T        T         C       14
AR                           T        T         B       3
AR              ARPAY        T        T         C       15
Allocate                     G        M         B       29
BankRec                      G        M         B       30
Cities                       G        M         B       7
Colors                       G        M         B       2
Common                       T        T         B       0
Customer                     S        M         B       16
Delivery                     G        M         B       26
Group                        G        M         B       22
Invoice                      G        M         B       27
Misc                         S        M         B       1
MiscCom                      T        T         B       4
Names                        G        M         B       8
PINVCr                       T        T         B       11
PINVrent                     T        T         B       7
Password                     G        M         B       60
Payroll                      T        T         B       22
Products                     G        M         B       3
Rentals                      T        T         B       17
SalesMen                     G        M         B       15
States                       G        M         B       6
Trucks                       S        M         B       31
Trucks                       T        T         B       18
Utility                      T        T         B       10
Vendors                      S        M         B       9
Weekday                      G        M         B       19

Indexing

The following index is created on SF_SYSTemplates 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 unique index SF_TemplateName on SF_SYSTemplates (SF_TemplateName,SF_Domain,SF_CloneName)