Skip to Content
0
Former Member
Jul 15, 2008 at 10:49 AM

multiple selection of rows in alv output list

34 Views

experts,

using 'REUSE_ALV_GRID_DISPLAY'

the following is the sample code ,without using ctrl or shift key i am unable to select multiple rows .

any resolvable answers.

REPORT zpushbutton1.

type-pools : slis.

*structure declarations

types : begin of ty_mara,

matnr type matnr,

ernam type ernam,

mbrsh type mbrsh,

CHKBOX TYPE CHAR1,

end oF ty_mara.

types : begin of ty_marc,

matnr type matnr,

werks type werks_d,

pstat type pstat_d,

end of ty_marc.

*internal table declarations

DATA : gi_mara TYPE STANDARD TABLE OF TY_MARA INITIAL SIZE 0.

data : gi_fieldcat type slis_t_fieldcat_alv.

*workarea declarations

DATA : gs_mara TYPE TY_MARA,

gs_fieldcat type slis_fieldcat_alv.

SELECT matnr

ernam

mbrsh

FROM mara

INTO TABLE gi_mara

UP TO 10 ROWS.

perform build_fieldcat using :

'1' 'CHKBOX' 'GI_MARA' 'SELECT' 'X' ,

'2' 'MATNR' 'GI_MARA' 'MATEIRALNO' ' ',

'3' 'ERNAM' 'GI_MARA' 'PERSON CREAT' ' ',

'4' 'MBRSH' 'GI_MARA' 'INDUSTRY' ' '.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

IT_FIELDCAT = GI_FIELDCAT

TABLES

t_outtab = GI_MARA

.

&----


*& Form BUILD_FIELDCAT

-


form BUILD_FIELDCAT using

PCOL TYPE CHAR2

PFLDNAME TYPE CHAR10

PTABNAME TYPE CHAR10

PSELTEXT TYPE CHAR15

PINPUT TYPE CHAR1.

GS_FIELDCAT-COL_POS = PCOL.

GS_FIELDCAT-FIELDNAME = PFLDNAME.

GS_FIELDCAT-TABNAME = PTABNAME.

GS_FIELDCAT-SELTEXT_M = PSELTEXT.

GS_FIELDCAT-EDIT = PINPUT.

APPEND GS_FIELDCAT TO GI_FIELDCAT.

CLEAR GS_FIELDCAT.

endform. " BUILD_FIELDCAT

thanks and regards