Mentor SAP

The Field Catalog

The field catalog is a format description of the display area for data.

 

 

Function of the Field Catalog

The internal table contains the data to be displayed. This table can have a freely definable row type so that the representative instance can display the data transferred to it as desired on the screen output or when creating a print list. To perform this action, the representative instance requires information about the type and formatting of each column. This is the job of the field catalog.

 

The representative instance can automatically generate the field catalog. If the structure of the data table corresponds to a structure that is defined in the ABAP Dictionary, you only need to pass the name of that to the representative instance.

 

You can also pass this display information to the representative instance using an additional internal table. This additional table is called the field catalog. The global data type of this internal table is LVC_T_FCAT. The corresponding structure type (for the work area) is called LVC_S_FCAT.

 

 

Grid Structure Adjustment Without the Field Catalog

The alternatives to using the field catalog for various requirements are as follows.

  1. To add additional or different columns - can use a different global structure type
  2. To hide columns or different order - can use standard variants
  3. To display only some of the columns left-aligned - can use the INCLUDE TYPE statement for local row type of the data table
  4. To generate the data table dynamically - can transfer the structure type as field symbol

​Options for Creating a Grid

The way in which you generate a field catalog depends on how the line type of the data table was defined.

 

Situations, when a field catalog is required, include the following:

 

 

Overview of the Structure of the Field Catalog

To create a field catalog in the calling program, proceed as follows:

  1. Define an internal table for the field catalog based on the lvc_t_fcat global table type and a compatible structure as the work area.
  2. Assign the name of a column from the data table to the fieldname This field assigns a row in the field catalog to a column of the data table.
  3. Fill the fields of the work area for each affected column of your data table and add it to the internal table for the field catalog.

 

Assignment of Types to Columns with Dictionary References

The fieldname column in the field catalog contains the column name from the data table. Every column of the data table that you want to format must have a corresponding row in the field catalog.

 

If you want to refer to a field of a global structure with the same name, assign the name of the structure to the ref_table field. Only add the field name from the structure to ref_field if the name of the data table column and structure field name are different.

 

 

Use of the Field Catalog to Set Column Properties