Skip to Content
0
Former Member
Jul 21, 2005 at 03:58 AM

Alv Grid -> Number of records

207 Views

Hi all,

We have a few programs calling alv grid using the oo method. However, we need to change the program to cater for when users do a filter of the results, so that the number of records shld be dynamic, instead of passed in from the abap program.

Can someone pt me to the correct way of doing this? I would like to avoid using the call function way of calling the alv grid.

DATA : PS_LAYOUT TYPE LVC_S_LAYO.

DATA : TITLE(70).

CONCATENATE 'Records selected : ' COUNTER INTO TITLE.

PS_LAYOUT-GRID_TITLE = title.

CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

IS_VARIANT = GS_LAYOUT

I_SAVE = X_SAVE

I_DEFAULT = 'X'

IS_LAYOUT = GT_LAYOUT

CHANGING

IT_OUTTAB = ITAB1[]

IT_FIELDCATALOG = GT_FIELDCAT.