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

regarding Field Catalog

Former Member
0 Likes
780

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
675

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.

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.

4 REPLIES 4
Read only

Former Member
0 Likes
676

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.

Read only

Peter_Inotai
Active Contributor
0 Likes
675

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.

Read only

Former Member
0 Likes
675

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.

Read only

0 Likes
675

hai guys,

Thanks for you guys assistance.

This forum is more helpful and fast.

I believe all gets more benefited out of this forums.

Regards

Chandra.