‎2006 Jan 06 2:23 AM
Hi,
I have ALV with check boxes.How can i capture checked items in ALV?Can any one tell me step by step process?
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = FIELDCAT
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_SAVE = 'A'
TABLES
T_OUTTAB = T_INS
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.Points guraranteed
cheers
kaki
‎2006 Jan 06 4:38 AM
Hi Kaki,
u had not declared ur layout,please declare it(wa_layout) and pass it to the FM.
declare one field in the internal table for checkbox named CHK.
wa_laout-box_fieldname = 'CHK'.
to get the checked entries.
FORM USER_COMMAND USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
.
case r_ucomm.
when 'SAVE'.
loop at itab where chk = 'X'.
u can get the checked values here
endloop.
ENDFORM.
‎2006 Jan 06 3:09 AM
Hi Kaki,
Pl take a look at this example program in SAP BCALV_EDIT_05. This example shows how to use checkboxes within an ALV Grid Control.
Regards,
Suresh Datti
‎2006 Jan 06 3:40 AM
Hi Kaki,
Since it is normal ALV, you need to do some action
using some button, or enter.
and don't forget to take backup before calling the ALV Fm. since it is required to compare.
in the button action,
you need to do some thing like this.
case sy-ucomm.
when 'ENTER'.
if itab[] <> itab_backup[].
loop at itab where check = 'X'.
**do what ever you need...
endloop.
endif.
endcase.thanks
vijay
‎2006 Jan 06 4:38 AM
Hi Kaki,
u had not declared ur layout,please declare it(wa_layout) and pass it to the FM.
declare one field in the internal table for checkbox named CHK.
wa_laout-box_fieldname = 'CHK'.
to get the checked entries.
FORM USER_COMMAND USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
.
case r_ucomm.
when 'SAVE'.
loop at itab where chk = 'X'.
u can get the checked values here
endloop.
ENDFORM.