05-25-2010 6:59 AM
Hi,
Can please give some sample code to get the check boxes in the output of an LAV Grid display.
This check boxes should be editable.
Thanks and regrads
vamshi
Moderator message - Please do not ask or answer FAQs - thread locked
Edited by: Rob Burbank on May 25, 2010 9:30 AM
05-25-2010 7:05 AM
hi vamshi,
fill the field cat column as
wa_fieldcat-col_pos = '1'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-fieldname = 'CHECKBOX'.
wa_fieldcat-checkbox = 'X'.
wa_fieldcat-input = 'X'.
wa_fieldcat-edit = 'X'.
wa_fieldcat-outputlen = 3.
wa_fieldcat-coltext = 'Chk'.
wa_fieldcat-just = 'X'.
to get checkbox .
05-25-2010 7:05 AM
hi,
Declare one filed as check box in your final table with length 1.
While populating this field in field cat, set the value 'X' for field check box and edit.
wa_fieldcat-checkbox = c_x.
wa_fieldcat-edit = c_x.
05-25-2010 10:35 AM
Hello vamshi,
The below code is for check box implementation for ALV tree ( although it is not related to your question, but I am sure you also need it in the future
lt_item_layout TYPE lvc_t_layi,
ls_item_layout TYPE lvc_s_layi,
is_last_level TYPE abap_bool.
ls_item_layout-fieldname = mv_tree->c_hierarchy_column_name.
ls_item_layout-style = cl_gui_column_tree=>style_intensifd_critical.
ls_item_layout-class = cl_gui_column_tree=>item_class_checkbox.
ls_item_layout-editable = 'X'.
Best Regards,
Jerry