Skip to Content
author's profile photo Former Member
Former Member

What is Field catalog pls urgent

Right now I am working on ALV, in that I am using REUSE_ALV_GRID_DISPLAY FM, but the parameters for this FM are an internal table name and a field catalog so i am confused that what field catalog is? Please help me out its very urgent. Thanks in advance.

By Ashok V

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 03:37 AM

    Hi,

    <b>Field catalog</b>

    The field catalog describes the internal data table fields. It is itself an internal table containing an entry for each column in the data table. The field catalog entry determines column output options.

    <b>Creating the field catalog</b>

    The field catalog can be constructed in various ways:

    <b>Manual</b>

    Each field catalog entry is explicitly coded into the field catalog by the ALV caller.

    Fields with DDIC link must have at least the following field catalog entries:

    FIELDCAT-FIELDNAME " Internal output table field name

    FIELDCAT-REF_TABNAME " DDIC reference structure name

    Fields with no DDIC link must have at least the following field catalog entries:

    FIELDCAT-FIELDNAME " Internal output table field name

    FIELDCAT-DATATYPE " Internal output table field data type

    FIELDCAT-OUTPUTLEN " Column width

    and at least one of the four text fields FIELDCAT-SELTEXT_L, FIELDCAT-SELTEXT_M, FIELDCAT-SELTEXT_S, REPTEXT_DDIC.

    The field FIELDCAT-TABNAME in the field catalog of hierarchical-sequential lists must also contain the name of the internal output table, to assign columns uniquely to the header or item table. This field must not be filled manually in simple lists.

    <b>Automatic</b>

    A field catalog need not be passed to ALV under the following condition:

    the structure of the internal output table is identical to a DDIC structure or table.

    The name of the structure or table is passed to ALV instead of the field catalog.

    All columns in the structure are displayed.

    <b>Semi-automatic</b>

    This mode is a combination of automatic and manual:

    the automatically created field catalog can be modified by a manually created field catalog.

    If a structure name for an automatic field catalog and a field catalog are both passed, the system determines the field catalog information from them both:

    • If the manually created and passed field catalog contains entries for fields which are not described by the DDIC structure, they are added to the field catalog created by the System.

    • If the manually created and passed field catalog contains entries for fields which are also described by the DDIC structure, they overwrite the DDIC information.

    The system creates field catalogs automatically and semi-automatically from the DDIC reference structure passed to ALV. ALV calls the function module REUSE_ALV_FIELDCATALOG_MERGE which creates the field catalog and adjusts it with an explicit field catalog (semi-automatic mode). This function module can also be called directly by the application (before ALV). This makes the creation of the field catalog by the application flexible.

    Hope u understood.

    Kindly reward points if u find it useful.

    Thanks&Regards,

    Ruthra

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 18, 2005 at 09:47 PM

    Field catalog lists out the fields of the output ALV, their attributes etc.

    Read the documentation here

    http://help.sap.com/saphelp_47x200/helpdata/en/52/5f060ae02d11d2b47d006094192fe3/frameset.htm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 10:30 PM

    Hi,

    The field catalog is an internal table to define specifications on how the fields of our list will be displayed. The field catalog must contain some technical and additional information about display options for each column to be displayed.

    The documentation on the function module has some explanations about the attributes of the field catalog.

    Regards,

    -Ramesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 19, 2005 at 01:56 AM

    In the internal table you put the records to show in the ALV Grid (that records have columns) but in the Field Catalog you give the list of that fields (columns) contained in the internal table.

    For example, if your internal table to report has 3 fields:

    DATA: BEGIN OF T_OUTPUT OCCURS 0,

    BUKRS LIKE BKPF-BUKRS,

    BELNR LIKE BKPF-BELNR,

    GJAHR LIKE BKPF-GJAHR,

    END OF T_OUTPUT.

    (Fill, for example, the Output Table with standard table BKPF)

    Then , you put in the Field Catalog these 3 fields:

    CLEAR gt_fieldcat.

    gt_fieldcat-fieldname = 'BUKRS'. " Field (column) name

    gt_fieldcat-tabname = 'T_OUTPUT'. " Output Table

    gt_fieldcat-ref_tabname = 'BKPF'. " Reference Table

    gt_fieldcat-ref_fieldname = 'BUKRS'. " Reference Field

    APPEND gt_fieldcat.

    CLEAR gt_fieldcat.

    gt_fieldcat-fieldname = 'BELNR'.

    gt_fieldcat-tabname = 'T_OUTPUT'.

    gt_fieldcat-ref_tabname = 'BKPF'.

    gt_fieldcat-ref_fieldname = 'BELNR'.

    APPEND gt_fieldcat.

    CLEAR gt_fieldcat.

    gt_fieldcat-fieldname = 'GJAHR'.

    gt_fieldcat-tabname = 'T_OUTPUT'.

    gt_fieldcat-ref_tabname = 'BKPF'.

    gt_fieldcat-ref_fieldname = 'GJAHR'.

    APPEND gt_fieldcat.

    And then call the function to set the ALV Grid.

    Regards

    Frank

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.