Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to print check box in ALV list display and how to pick selected ones

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

In the fieldcat along with

wa_fldcat-checkbox = 'X'.

wa_fldcat-edit = 'X'.

add this ........

wa_fldcat-input = 'X'.

0 Kudos

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

0 Kudos

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.