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

ALV Reports

Former Member
0 Likes
724

Hello Friends,

What is the difference between using the function module 'REUSE_ALV_GRID_DISPLAY' and the method 'SET_TABLE_FOR_FIRST_DISPLAY with respect to the output and events like the TOP-OF-PAGE and display?

Regards

Ashish.

Hello Friends,

What is the difference between using the function module 'REUSE_ALV_GRID_DISPLAY' and the method 'SET_TABLE_FOR_FIRST_DISPLAY with respect to the output and events like the TOP-OF-PAGE and display?

Regards

Ashish.

5 REPLIES 5
Read only

Former Member
0 Likes
679

Hi,

'SET_TABLE_FOR_FIRST_DISPLAY is a method

All parameters of method SET_TABLE_FOR_FIRST_DISPLAY from global class

CL_GUI_ALV_GRID are defined in the Class Builder.

'REUSE_ALV_GRID_DISPLAY' is a FM

Regards

Read only

Former Member
0 Likes
679

Hi Asish,

REUSE_ALV_GRID_DISPLAY used for :

Functionality

The function module outputs an internal table with whatever structure in the form of a formatted single- oder multi-line list.

Process:

Passing an internal table with the set of information to be output

Passing a structure with general layout specifications for list layout

Passing a field catalog in the form of an internal table

The field catalog describes the fields to be output in the list.

TOP-OF-PAGE :WE use this event for heading in the report.

Reward points if helpful.

Kiran Kumar.G.A

Read only

Former Member
0 Likes
679

hi ashish,

“set_table_for_first_display” whose name implies for what it is used.

After creating the ALV Grid instance we call this method to make our list displayed. We pass list data table, field catalog table, layout structure and additional information.

Here are parameter definitions taken from SAP Library.

->I_BUFFER_ACTIVE

Flag to be set by the application if the method call is static. This means the method is always called with the same field catalog. In this case, the field catalog can be held in a special buffer. This accelerates the display of small lists, in particular.

->I_STRUCTURE_NAME

Name of the DDIC structure (for example, 'SFLIGHT') for the data in the output table. If you specify this parameter, the field catalog is generated automatically.

->IS_VARIANT

Determines the layout to be used for displaying the output table. If you use this parameter, you must at least fill field REPORT of the structure of type DISVARIANT.

->I_SAVE

Determines the options available to the user for saving a layout:

• 'X': global saving only

• 'U': user-specific saving only

• 'A': corresponds to 'X' and 'U'

• SPACE: no saving

->I_DEFAULT

This parameter determines if the user is allowed to define default layouts:

• 'X': Default layouts allowed (default setting)

• SPACE: Default layouts not allowed

If default layouts are allowed and if such a layout exists and no other layout is specified in IS_VARIANT, the default layout is automatically loaded when this method is called.

IS_LAYOUT

Determines properties of the grid control. The layout structure has nothing to do with the layout for saving filter, sort, and column properties.

IS_PRINT

Parameter for printing on the backend

IT_SPECIAL_GROUPS

If in the field catalog the columns were grouped together with field SP_GROUP, you must pass a table with texts for these groups. On the current layout window, it is then possible to use a list box to restrict column selection to one of these groups.

IT_TOOLBAR_EXCLUDING

This table contains function codes of the toolbar that you want to hide for the lifetime of the ALV Grid Control. The function codes are constant attributes and are prefixed with MC_FC_.

IT_HYPERLINK

This table assigns a hyperlink address (field HREF of LVCSHYPE)toeachhandle(fieldHANDLEof

LVC_S_HYPE). Using this handle, you can then include hyperlinks in the grid.

IT_ALV_GRAPHICS

Settings for displaying the ALV list as a diagram (for example, axis labels). The row type of the table has two fields (variables/value pairs):

• PROP_ID: Assign a constant attribute of the class CL_ALV_GRAPHICS_CU with prefix CO_PROPID_ to this field to determine the changes to be made to the graphic. Use the CL_ALV_GRAPHICS_CU=>CO_PROPID_TITLE attribute, for example, to refer to the title of the diagram.

• PROP_VAL: The value of the relevant topic, for example, 'My Title'.

IT_OUTTAB

Output table with the data to be displayed

IT_FIELDCATALOG

Determines the structure of the output table and the format of the data to be displayed

IT_SORT

Table with sort properties for columns that are to be sorted initially

IT_FILTER

Table with filter properties for columns for which a filter is to be set initially

regards,

sravanthi

Read only

Former Member
0 Likes
679

hi ashish,

“set_table_for_first_display” whose name implies for what it is used.

After creating the ALV Grid instance we call this method to make our list displayed. We pass list data table, field catalog table, layout structure and additional information.

Here are parameter definitions taken from SAP Library.

->I_BUFFER_ACTIVE

Flag to be set by the application if the method call is static. This means the method is always called with the same field catalog. In this case, the field catalog can be held in a special buffer. This accelerates the display of small lists, in particular.

->I_STRUCTURE_NAME

Name of the DDIC structure (for example, 'SFLIGHT') for the data in the output table. If you specify this parameter, the field catalog is generated automatically.

->IS_VARIANT

Determines the layout to be used for displaying the output table. If you use this parameter, you must at least fill field REPORT of the structure of type DISVARIANT.

->I_SAVE

Determines the options available to the user for saving a layout:

• 'X': global saving only

• 'U': user-specific saving only

• 'A': corresponds to 'X' and 'U'

• SPACE: no saving

->I_DEFAULT

This parameter determines if the user is allowed to define default layouts:

• 'X': Default layouts allowed (default setting)

• SPACE: Default layouts not allowed

If default layouts are allowed and if such a layout exists and no other layout is specified in IS_VARIANT, the default layout is automatically loaded when this method is called.

IS_LAYOUT

Determines properties of the grid control. The layout structure has nothing to do with the layout for saving filter, sort, and column properties.

IS_PRINT

Parameter for printing on the backend

IT_SPECIAL_GROUPS

If in the field catalog the columns were grouped together with field SP_GROUP, you must pass a table with texts for these groups. On the current layout window, it is then possible to use a list box to restrict column selection to one of these groups.

IT_TOOLBAR_EXCLUDING

This table contains function codes of the toolbar that you want to hide for the lifetime of the ALV Grid Control. The function codes are constant attributes and are prefixed with MC_FC_.

IT_HYPERLINK

This table assigns a hyperlink address (field HREF of LVCSHYPE)toeachhandle(fieldHANDLEof

LVC_S_HYPE). Using this handle, you can then include hyperlinks in the grid.

IT_ALV_GRAPHICS

Settings for displaying the ALV list as a diagram (for example, axis labels). The row type of the table has two fields (variables/value pairs):

• PROP_ID: Assign a constant attribute of the class CL_ALV_GRAPHICS_CU with prefix CO_PROPID_ to this field to determine the changes to be made to the graphic. Use the CL_ALV_GRAPHICS_CU=>CO_PROPID_TITLE attribute, for example, to refer to the title of the diagram.

• PROP_VAL: The value of the relevant topic, for example, 'My Title'.

IT_OUTTAB

Output table with the data to be displayed

IT_FIELDCATALOG

Determines the structure of the output table and the format of the data to be displayed

IT_SORT

Table with sort properties for columns that are to be sorted initially

IT_FILTER

Table with filter properties for columns for which a filter is to be set initially

regards,

rajesh

Read only

ThomasZloch
Active Contributor
0 Likes
679

as far as I am concerned, function module REUSE_ALV_GRID_DISPLAY is a wrapper around the OO ALV methods such as SET_TABLE_FOR_FIRST_DISPLAY for those developers who are more accustomed to the "classical" way of ABAP programming (like the author of this post...).

Output, events and such are the same to a large extent, I believe using OO methods you can do a few more "tricks".

Greetings

Thomas