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

regarding Field Catalog

hai,

I used below ALV grid to display table fields in the screen.

CALL METHOD go_grid->set_table_for_first_display

EXPORTING i_structure_name = 'SFLIGHT'

CHANGING it_outtab = gi_sflight.

I want to know Does Field catalog should be used with ALV grid.

Whats the use of Field catalog here. I read the SAP help but could you pls

tell what diff i will get with use of FIELD CATALOG.

Whats the advantage of this.

Thanks for your assistance.

Chandra

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2005 at 10:39 AM

    Hi Chandra,

    Search this forum on ALV and you will get loads of info and don't forget to read the easy reference of Serdar which you will also find in several posts.

    Regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 13, 2005 at 12:10 PM

    If you want to display the same columns as they exist in a table (eg SFLIGHT), then you just use this as a reference (all the column name, F1 help etc). In this case the Field catalog is generated automatically.

    If you are not lucky and in your ALV grid you want to display fields, which are coming from different tables, or just want to use another column name, then you define a fieldcatalog and use it for ALV.

    It's well explained in the Online help.

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

    Regards,

    Peter

    Ps: You might consider purchasing 'Control Technologies' book, which quite cheap and it's a good reference.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2005 at 01:51 PM

    Hi Chandra,

    I am sharing a few words, which i feel as advantages of creating field catalogue,

    Field catalogues helps in adding more funtionalities to the grid once when displayed,

    i will discuss these with some codes,

    1)

    • For Primary Key Address Code

    w_fcat-fieldname = 'ADDCODE'.

    w_fcat-ref_table = 'ZC1ADDRESS'.

    w_fcat-ref_field = 'ADDCODE'.

    w_fcat-col_pos = 1.

    w_fcat-sp_group = 'KEY'.

    w_fcat-hotspot = c_check.

    append w_fcat to i_fcat.

    clear w_fcat.

    • For Name of the person

    w_fcat-fieldname = 'ADDNAME'.

    w_fcat-ref_table = 'ZC1ADDRESS'.

    w_fcat-ref_field = 'ADDNAME'.

    w_fcat-col_pos = 2.

    w_fcat-sp_group = 'GEN'.

    w_fcat-edit = 'X'.

    append w_fcat to i_fcat.

    clear w_fcat.

    Here the first is the address code and the second a name,

    when the grid is to be edited for modification when displayed, normally we do not prefer the keys fields to be modified, thus it is not provided the w_edit-edit = 'X'. but where as the name has been given that, so that when the grid is set in edit mode, the keys fields are always in display mode.

    2) Then there is another w_fcat-sp_group = 'KEY' and

    w_fcat-sp_group = 'GEN'. Here i am creating two special groups, so that it helps me to choose the fields in the grid. Choosing a group will provide all the fields belonging to that category.

    Thus, by creating a field catalogue one can add more functionalities to the grid. This will be very much helpful when your ALV grid has large number of fields and needs a lot of adjustments to do after displaying.

    There are many more advantages, think you can probe further from here. If you come across good concepts,

    please let me know, it will be helpful for me too.

    Thanks and Regards,

    Kathirvel.

    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.