2008 Jan 09 10:39 AM
Hi
i am displaying one ALV list dispaly. for that im adding one check box fields by filling the fieldcat as below:
wa_fldcat-checkbox = 'X'.
wa_fldcat-edit = 'X'.
but the check box is showing disable mode only. i want to display that check box and if i select that check box i want pick that records. for ALV grid i found one FM to pick records of selectedones as below.
DATA ref_grid TYPE REF TO cl_gui_alv_grid.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF ref_grid IS NOT INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
but how can i do for list display to pick those selected one records.
Can any one sugget regarding this.
Thanks in advance.
Rahul.
2008 Jan 09 10:49 AM
In the fieldcat along with
wa_fldcat-checkbox = 'X'.
wa_fldcat-edit = 'X'.
add this ........
wa_fldcat-input = 'X'.
2008 Jan 09 11:10 AM
Hi,
Thanks. now it's enabled. but how can we pick the records from that list whichever i selected through that check box.
i found this one for ALV grid:
DATA ref_grid TYPE REF TO cl_gui_alv_grid.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF ref_grid IS NOT INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
but how for ALV normal list display.
Thanks.
rahul
2008 Jan 09 11:20 AM
HI ,
It will work.... wherer are my points...
any way... if u are using alv list display then if you want to do capture all checkboxes which are checked...
then u can use standard save button.
in that case u have to write a usercommand form.
and in that when sy-ucomm = '&SAVE_DATA'.( i am not so sure about the function code..check it once..)
u can loop through the internal table and there u can c all the boxes checked.
hope it can help u.... and dont forget my points.
Regards,
Kiran.