The Generic Code File or “Gencode File” is used by the system to validate data entry at the database field level. The Gencode File (File 19) contains title and data records that are grouped by table name. Each instance of a particular table name (which normally consists of one title and one or more “data” type gencode records) consitutes a “gencode table”. Gencode tables are used during data entry to control and to describe the information that may be entered into specific fields in database records. Gencode validation for a particular database or entry field may be mandatory, or it may be optional. Mandatory validation is determined by the programmer or designer when creating the applications in the system. Mandatory gencode validation is normally used when the information in the database field is required and or critical for proper operation of the system. When gencode validation is mandatory for a particular field, the gencode table for the field MUST exist in the the system. Gencode validation for a database field can also be optional. In this case, validation is only performed for the database field when a gencode table exists for the field. Optional gencode validation is supported in the Master Data Maintenance programs such as the Customer Master, Catalog and Vendor Master programs, and in some of the fields used during transaction processing (such as the Sales Order Subtype field). Gencode validation is not supported when a parent data file control the information for the field (such as the Payment Terms field in the Customer or Vendor file), or when the information in a field is naturally not definable (the cost and quantity fields in an inventory record).
When Gencode validation for a particular field is mandatory, the required generic code table is usually installed during system setup or when a system update is performed. When gencode validation for a particular field is optional, a generic code table is created as required by your system administrator. This flexibility allows data validation to be implemented that is specific to your company's requirements as the need arises.
One of the primary advantages of the Gencode Table is that it allows you to restrict the information which can be entered into certain fields from various programs without creating a dedicated parent data file specifically for that purpose. Gencode records are used to enforce consistent data entry by restricting the information that can be entered into specific fields. Gencode tables are also used to define the available break or sort sequences, and selection options in some reports. The Generic Code Table functionality provides you with a flexible means to set up certain fields as "table driven" which allows your system administrator to control and categorize the information that can be entered into those fields.