Skip to Content
0
Former Member
Nov 08, 2006 at 07:07 PM

Problems with checkbox in ALV-GRID OO

29 Views

Hi,

i have Problems by listing an editable checkbox

in ALV GRID OO and handle the itab with

the marked fields.

Here my Code extract. Has anybody an idea or a short example.

TYPES: BEGIN OF ALV_TAB,

...

SGTXT LIKE RK23B-SGTXT,

CHECK(1),

...

END OF ALV_TAB.

*

DATA: ITAB TYPE TABLE OF ALV_TAB.

*

Is this Declaration correct??

<b> GS_FIELDCAT-FIELDNAME = 'CHECK'.

GS_FIELDCAT-CHECKBOX = 'X'.

APPEND GS_FIELDCAT TO GT_FIELDCAT.

*

GS_LAYOUT-EDIT = 'X'.

GS_LAYOUT-BOX_FNAME = 'CHECK'.</b>

CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

IT_TOOLBAR_EXCLUDING = PT_EXCLUDE

IS_LAYOUT = GS_LAYOUT

CHANGING

IT_FIELDCATALOG = GT_FIELDCAT

IT_OUTTAB = ITAB.

*

FORM HANDLE_USER_COMMAND USING E_UCOMM.

*

CASE E_UCOMM.

WHEN 'REFR'.

*

<b> Here i will have the itab with the marked checkbox.

how can i refresh?</b>*

WHEN 'EXCEL'.

*

MESSAGE I010 WITH E_UCOMM.

*

ENDCASE.

*

ENDFORM. "HANDLE_USER_COMMAND

Regards, Dieter