‎2007 Mar 06 10:39 AM
Hi ,
Can anybody explain me the difference between feildcat and layout in ALV
Regards,
N Manjrekar
‎2007 Mar 06 10:43 AM
Hi Nikhil,
Fieldcatalog is used to create the catalog for the list output, here you specify the fields from the table/internal table at what position in the ALV aoutpu.
With Layout you can specify how the ALV output will look, for example alternate colors or more than one colors. You can specify different look and feel on the list output.
Regards,
George
reward points for helpful tips
‎2007 Mar 06 10:44 AM
both are of different structures
Fieldcatalog defines the attributes of the fields to be displayed , like its column position , output length , description,
where as layout stores the attributes of the output as a whole but not on individual fields , like to optimize all the fields output length , we use
wa_layout-colwidth_optimize = 'x'.
‎2007 Mar 06 10:53 AM
Hi Nikhil,
LAYOUT is used to define the layout of the List. There are many options available in this FM to define the Layout style. FIELDCAT - These are used to populate the List header. We can change them according to our req.
Mark all helpful answers
‎2007 Mar 06 11:01 AM
Hi Nikhil,
If you go through the layout structure and fieldcatlog structure, you will get a clear idea how they are different?
Fieldcatlog gives what are the fields that are to be displayed and the structure of the field and how this field to be displayed.... Summation,...
Layout is the costume work for all the fields i.e. how the alv to be displayed on the screen.
Regards,
Ramesh Babu S
*Correct me if I am wrong
‎2007 Mar 06 11:31 AM
Hi,
<b>Fieldcatalog:</b>Determines the structure of the output table and the format of the data to be displayed.We use another internal table to define specifications on how the fields of our list will be displayed. This internal table is called the
field catalog. The field catalog must comprise some technical and additional information about display options for each column to be displayed. There are three procedures to generate the field catalog as Automatic generation, Semi-automatic generation, and Manual generation. The internal table for the field catalog must be referenced to the dictionary type <b>LVC_T_FCAT.</b>
<b>Layout:</b>Determines properties of the grid control. The layout structure has nothing to do with the layout for saving filter, sort, and column properties.We fill a structure to specify general layout options for the grid. With this structure we can set general display options, grid customizing, totals options, color adjustments etc... The layout structure must be of type <b>LVC_S_LAYO.</b>
Regards,
Beejal
**reward if this helps
‎2007 Mar 06 11:46 AM
<b>Fieldcatalog:</b>
Refer this link
http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm
<b>Layout:</b>
The following is where a user can enter a display variant
the no display can be used if the grid output is not to
be controlled by the users variant.
PARAMETERS p_layout LIKE disvariant-variant.
DATA: gd_layout type slis_layout_alv.
w_layout-grid_title = sy-title.
w_layout-zebra = 'X'
w_layout-sel_mode = 'B'.
w_layout-cwidth_opt = 'X'
w_variant-handle = p_layout.
w_variant-report = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
* i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
* it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = w_variant
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.