Application Development 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: 

ALV

Former Member
0 Kudos

Hi Folks,

1. What is the difference between field catalog and layout set in alv?

2. How to call a session from a report while cliking on a button in a report?

Thanks in advance

Ravi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

<b>“field catalog”.</b> 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 “LVC_T_FCAT”.

<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 “LVC_S_LAYO”.

Regards,

Beejal

**reward if this helps

6 REPLIES 6

Former Member
0 Kudos

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

Thanks

Hari krishna.

Please reward points for valuable answers.

Former Member
0 Kudos

1. Fieldcatalog stores the attributes of each field displayed and layout stores the attributes of the displayed output

Former Member
0 Kudos

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

<b>“field catalog”.</b> 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 “LVC_T_FCAT”.

<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 “LVC_S_LAYO”.

Regards,

Beejal

**reward if this helps

0 Kudos

Hi,

1) Field catalog as the name dipicts at each column level, you create a strucutre for each column and then add it to the field catalog table, means field catalog is at each field(Each column) of the ALV.

Where as Layout is at the ALV level and irrespective of the structure that you are going to display on the ALV.

2)BY Session you mean you want to call another program or transaction if it is the case then you can use SUBMIT or CALL TRANSACTION.

Regards,

Sesh

Former Member
0 Kudos

hi

good

Field Catalog->

Definition

Screen area of the Report Designer.

Use

All query fields, filters, variables, and text elements for the data provider (query or query view) on which the report is based are displayed in the field catalog. The field catalog also contains the list of custom texts created by users, which were inserted into the header area of the report, for example.

Using the field catalog, you can insert or reuse query fields or text elements for the data provider that were deleted from the report, for example, at any time with drag and drop. You can also work with custom texts the same way.

Layout Set->

Use

A layout set can be used for the display of an iView or for particular folders.

Integration

If a layout set is to be used for a folder, it must be referenced in a layout profile.

If you have administrator permissions, you can also select a layout set directly in the Details dialog box for a folder by choosing Settings ® Presentation. To do this, activate the Presentation Enabled parameter in the configuration of the layout set in question (see table).

thanks

mrutyun^

Former Member
0 Kudos

Hi,

U can call a transaction as below:

In order to add user command functioality to the ALV grid you need to perform the following steps:

    	           1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include 'USER_COMMAND' FORM
	           2. Create 'USER_COMMAND' FORM
 

 call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  
            I_callback_user_command = 'USER_COMMAND'   "see FORM 
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            i_save                  = 'X'
       tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.


 


 
*------------------------------------------------------------------*
*       FORM USER_COMMAND                                          *
*------------------------------------------------------------------*
*       --> R_UCOMM                                                *
*       --> RS_SELFIELD                                            *
*------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
                  rs_selfield TYPE slis_selfield.

* Check function code
  CASE r_ucomm.
    WHEN '&IC1'.
*   Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'EBELN'.
*     Read data table, using index of row user clicked on
      READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
*     Set parameter ID for transaction screen field
      SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
*     Sxecute transaction ME23N, and skip initial data entry screen
      CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDCASE.
ENDFORM.

Refer this link

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm

Fieldcatalog:

http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm