11-08-2006 7:07 PM
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
11-08-2006 7:17 PM
Hi, in reference to....
ASE E_UCOMM.
WHEN 'REFR'.
*
Here i will have the itab with the marked checkbox.
how can i refresh?*
Do you want to get rid of the checks in any checkbox?
If so, just loop at modify.
ASE E_UCOMM.
WHEN 'REFR'.
<b> Loop at itab where check = 'X'.
itab-check = space.
modify itab.
endloop.</b>
Regards,
Rich Heilman
11-08-2006 7:17 PM
Hi, in reference to....
ASE E_UCOMM.
WHEN 'REFR'.
*
Here i will have the itab with the marked checkbox.
how can i refresh?*
Do you want to get rid of the checks in any checkbox?
If so, just loop at modify.
ASE E_UCOMM.
WHEN 'REFR'.
<b> Loop at itab where check = 'X'.
itab-check = space.
modify itab.
endloop.</b>
Regards,
Rich Heilman
11-08-2006 7:18 PM
Hi,
Try adding the SEL_MODE = 'D' in the layout structure.
Thanks,
Naren
11-09-2006 12:13 PM
Hi Naren,
thanks for your answer. I think i will not using
a checkbox i will try it with SEL_MODE.
I use SEL_MODE = 'A', i think its the same as
= 'D', isn't it?.
2 Questions:
Is there any Ducumentation of the several SEL_MOD?
If i mark in ALV for example 3 lines.
I get the lines via:
CALL METHOD GR_ALVGRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = LT_ROWS
ET_ROW_NO = LT_ROID.
*
CALL METHOD CL_GUI_CFW=>FLUSH.
<b>Do you know any METHOD to deselect the Lines?</b>
Thanks for help
Regards, Dieter
11-09-2006 12:28 PM
Hi,
Check the links below it will help u r requirement
http://www.sapfans.com/forums/viewtopic.php?p=154559&sid=0cbf2247d6a3eb9cd45f27e791092094