2012 May 15 12:08 PM
How to add checkbox on node level?
I am able to display checkbox on the last child node but not able to show checkbox on node level.
This is how I declare at fieldcatalog .
ls_fieldcat-fieldname = 'APP1'.
ls_fieldcat-coltext = 'Approver1'.
ls_fieldcat-col_pos = 6.
ls_fieldcat-checkbox = 'X'.
ls_fieldcat-edit = ' '.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
Please advice.
Thanks,
Wong
2012 May 17 3:03 AM
I got it.
In order to add checkbox on every node,
Under every call method g_alv_tree->add_node
add it_item_layout = lt_item_layout1
lt_item_layout1 will be something like this
ls_item_layout-fieldname = 'APP1'.
ls_item_layout-class = cl_gui_column_tree=>item_class_checkbox.
ls_item_layout-editable = 'X'.
append ls_item_layout to lt_item_layout1.
This will show display the check boxes.
How to add checkbox on node level?
I am able to display checkbox on the last child node but not able to show checkbox on node level.
This is how I declare at fieldcatalog .
ls_fieldcat-fieldname = 'APP1'.
ls_fieldcat-coltext = 'Approver1'.
ls_fieldcat-col_pos = 6.
ls_fieldcat-checkbox = 'X'.
ls_fieldcat-edit = ' '.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
Please advice.
Thanks,
Wong
2012 May 15 1:36 PM
Hello Wong,
you can try this:
http://help.sap.com/saphelp_nw04/helpdata/en/26/46fb40f17af66fe10000000a1550b0/content.htm
or use the styles field of the layout structure to use a field as an checkbox.
-Nico
2012 May 17 3:03 AM
I got it.
In order to add checkbox on every node,
Under every call method g_alv_tree->add_node
add it_item_layout = lt_item_layout1
lt_item_layout1 will be something like this
ls_item_layout-fieldname = 'APP1'.
ls_item_layout-class = cl_gui_column_tree=>item_class_checkbox.
ls_item_layout-editable = 'X'.
append ls_item_layout to lt_item_layout1.
This will show display the check boxes.