Skip to Content
0
Former Member
Jul 23, 2007 at 06:25 AM

Multiple line selection in ALV

200 Views

Hi,

I am tring to use multiple selection in ALV.

i am creating fieldcatalog like this

WA_FIELDCAT-COL_POS = A.

WA_FIELDCAT-FIELDNAME = 'EBELN'.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-SELTEXT_M = 'PO NO'.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

A = A + 1.

WA_FIELDCAT-COL_POS = A.

WA_FIELDCAT-FIELDNAME = 'AEDAT'.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-SELTEXT_M = 'CREATE DATE'.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

A = A + 1.

WA_FIELDCAT-COL_POS = A.

WA_FIELDCAT-FIELDNAME = 'BEDAT'.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-SELTEXT_M = 'CHANGE DATE'.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

A = A + 1.

and then i am using the below code for multiple selection:

GS_LAYOUT-SEL_MODE = 'A'.

CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

IS_LAYOUT = GS_LAYOUT

CHANGING

IT_OUTTAB = IT_EKKO[].

IT_FIELDCATALOG = IT_FIELDCAT.

this is giving an error saying that it_fieldcatalog is not compatable to it_fielcat.

Regards,

Himanshu