Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

about fieldcatalog

Former Member
0 Likes
1,968

hhi..

can u tell about field catalog..

hhi..

can u tell about field catalog..

3 REPLIES 3
Read only

paruchuri_nagesh
Active Contributor
0 Likes
1,262

hi

The field cataog is a table of type LVC_T_FCAT that contains information on the fields to be displayed. The ALV uses this table to recognize the type of a field, for example.

You can use fields of the catalog to determine the number format and column properties of the list to be displayed.

Generating the Field Catalog Manually

Purpose

It may be the case that the data you want to display is not at all or only partially represented by a structure in the Data Dictionary. Then you must use the fields of the field catalog to describe the structure of the output table.

Process Flow

The field catalog is defined in the Data Dictionary through table type LVC_T_FCAT . Each row of the field catalog table explains a field in your output table. Depending on whether a reference structure exists in the DDIC or not, you must at least fill the following fields of the field catalog structure for each field:

Generating the Field Catalog Automatically

Purpose

If the structure of your output table corresponds to a structure stored in the Data Dictionary (DDIC), the ALV Grid Control can use this information to generate the field catalog automatically. In this case, all fields of this DDIC structure are displayed in the list.

use fm

REUSE_FIELDCATALOG_MERGE

To generate a field catalog semi-automatically:

Declare an internal table of type LVC_T_FCAT .

Call function module LVC_FIELDCATALOG_MERGE and pass the DDIC structure of the output table and the internal table for the field catalog. The function module generates the field catalog and fills the internal table accordingly.

Read the rows you want to change, and adapt the fields accordingly. If your output table contains more fields than are stored in the Data Dictionary, you must append one row for each new field to the field catalog.

To display the output table with the settings of the field catalog, pass the field catalog in method set_table_for_first_display.

reward for use ful points

regards

Nagesh.Paruchuri

Read only

Former Member
0 Likes
1,262

HI

A FIELD CATALOG IS PREPARED USEING THE INTERNAL TABLE OF TYPE <b>SLIS_T_FIELDCATALOG_ALV</b>

THE FIELD CATALOG FOR THE OUTPUT TABLE IS BUILT-UP IN THE CALLERS CODING . THE BUILD-UP CAN BE COMPLETELY OR PARTIALLY AUTOMATED BY CALLING THE

<b>REUSE_ALV_FEILDCATALOG_MERGE</b> MODULE

<b>SPECIFYING ATTRIBUTES FOR FIELDS IN FIELD CATALOG</b>

ALL THE VALUES ENTERED IN THE CATALOG IS SPECIFIC TO THE PERTICULAR FIELD WHOSE NAME IS ENTERED IN THE FIELD FIELDNAME OF THE FIELD CATALOG STRUCTURE . THE NAME OF THE TABLE IS ALSO ENTERD IN THE CORRESPONDING FIELDNAME TABNAME OF THE STRUCTURE

<u>SOME IMPROTANT ATTRIBUTES THAT CAN BE DEFINED FOR A FIELD ARE</u>

COL_POS (COLUMN POSSITION)

FIELDNAME ( FIELD NAME)

TABNAME (INTERNAL OUTPUT TABLE)

REF_FIELDNAME (REFERENCE FIELD NAME )

REF_TABNAME (REFERENCE TABLE / STRUCTURE FIELD NAME)

<u>LINK TO CURRENCY UNIT</u>

CFIELDNAME ( CURRENCY FIELD NAME )

CTABNAME ( INTEARNAL CURRENCY UNIT FIELD OUTPUT TABLE)

<u>LINK TO MEASUREMENT UNIT</u>

QFIELDNAME ( MEASUREMENT UNIT FIELD NAME )

QTABNAME ( INTERNAL MEASUREMENT UNIT FILED OUTPUT TABLE)

OUTPUTLEN ( COLUMN WIDTH)

KEY( KEY COLUMN)

NO_OUT ( FIELD IN FIELD LIST )

EMPHASIZE( HIGHLIGHT COLUMNS IN COLORS )

HOTSPOT ( COLUMN AS HOTSPOT)

FIX_COLUMN ( FIX COULMN)

DO_SUM( SUM OVER COLOUMN)

NO_SUM ( SUMS FORBIDDEN)

ICON

JUST (JUSTIFICATION)

LZERO (LEADING ZEROES)

NO_SIGN ( NO +/ - SIGN)

EDIT_MASK ( FIELD FORMATING )

<u>THE FOLLOWING PARAMETERS ARE USED FOR CUSTOMIZATION THE TEXTS IN THE HEADING OF THE OUTPUT</u>

SELTEXT_L (LONG FIELD LABEL)

SELTEXT _M (MEDIUM FIELD LABEL)

SELTEXT_S ( SHORT FIELD LABEL)

<b>REWARD IF USEFUL</b>

Read only

Former Member
0 Likes
1,262

Hi,

A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.

The important parameters are :

I. Export :

i. I_callback_program : report id

ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status

iii. I_callback_user_command : routine where the function codes are handled

iv. I_structure name : name of the dictionary table

v. Is_layout : structure to set the layout of the report

vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE

vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.

II. Tables :

i. t_outtab : internal table with the data to be output

B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.

The Important Parameters are :

I. Export :

i. I_program_name : report id

ii. I_internal_tabname : the internal output table

iii. I_inclname : include or the report name where all the dynamic forms are handled.

II Changing

ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is

declared in the type pool SLIS.

Reward for helpful answers

Thanks