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

Function set_table_for_first_display

Former Member
0 Likes
1,890

Does anybody knows what this function do,

CALL METHOD g_grid->set_table_for_first_display

EXPORTING

it_toolbar_excluding = lt_exclude

is_layout = gs_layout

CHANGING

it_fieldcatalog = pt_fieldcat

it_outtab = pt_outtab[].

Thanks.

5 REPLIES 5
Read only

Former Member
0 Likes
1,121

Hi Rahul ,

This is not a function but here we are calling a method of a class.

No specific to this this is a portion of code used to implement ALV using ABAP Objects , to put it in simpler words this is a replacement to the FM call

RESUE_ALV_GRID_DISPLAY , which is used when we implement ALV using FM.

Regards

Arun

Read only

Former Member
0 Likes
1,121

well this funtion prepares your alv-grid for display.

it_fieldcatalog is a the catalog of fields to be displayed in the ALV

while it_outtab is the internal tbale which inherits the records to be displayed on the ALV.

not a 100% sure what those 2 import parameters do, so i better dont tell you anything.

Read only

Former Member
0 Likes
1,121

Display an output table in the ALV Grid Control instance. In the call sequence, you must specify either a reference structure of the Data Dictionary or a suitable field catalog. Before execution, you can use optional parameters to load a layout, sort the table by fields, set a filter for columns and define properties of the grid control.

If you want to refresh the data displayed in the output table, use method refresh_table_display. Method set_table_for_first_display must only be called a second time if the structure of the output table changes.

Report BCALV_GRID_DEMO of development class SLIS illustrates the simplest way to call this method.

Read only

Former Member
0 Likes
1,121

1. This is a method of class CL_GUI_ALV_GRID

2. This acts similar to REUSE_ALV_GRID_DISPLAY

3. But the thing is here we use ABAP OBJECTS conceps to use more features of ALV

Read only

Former Member
0 Likes
1,121

Hi,

Its a method of the class cl_gui_alv_grid.It is used to display the ALV for the first time.In the code that you have pasted,you have passed the parameters lt_exclude which excludes the toolbar in the ALV grid.gs_layout is passed to set the layout of the grid...we can choose in the layout for single/multiple row/column selection etc.Further, a field catalog has been passed to set the fields required to be displayed.The fields required to be displayed may be different from the DDIC structure of the table.The internal table has the content to be displayed.

Check this link for more:

http://help.sap.com/saphelp_erp2005vp/helpdata/en/0a/b5533cd30911d2b467006094192fe3/frameset.htm

Regards,

Beejal

**Reward if answer found helpful