Application Development and Automation 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: 
Read only

ALV check box problem

Former Member
0 Likes
686

hi,

i am displaying a List alv by reuse_alv_list_display and for all the records which have same matnr I am displaying Matnr only once and rest of the records with blank matnr field(Like sort)

now i want check box in my output only in those fields which have matnr and no check box in fields which do not have matnr populated .

please reply soon.

Regards,

kushagra sharma

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
654

Try this,

DATA: ls_style TYPE lvc_s_styl,

lt_style TYPE lvc_t_styl.

ls_style-fieldname = iv_fieldname.

if cs_io-checkbox = ' '.

ls_style-style = cl_gui_alv_grid=>mc_style_enabled.

else.

ls_style-style = cl_gui_alv_grid=>mc_style_disabled.

endif.

Regards,

Try this,

DATA: ls_style TYPE lvc_s_styl,

lt_style TYPE lvc_t_styl.

ls_style-fieldname = iv_fieldname.

if cs_io-checkbox = ' '.

ls_style-style = cl_gui_alv_grid=>mc_style_enabled.

else.

ls_style-style = cl_gui_alv_grid=>mc_style_disabled.

endif.

Regards,

4 REPLIES 4
Read only

former_member194669
Active Contributor
0 Likes
654

It can possible in if you are using CL_GUI_ALV_GRID and using STYLE ie you can put checkbox into display mode if MATNR is equal to space.



cl_gui_alv_grid=>mc_style_enabled. 

or. 

cl_gui_alv_grid=>mc_style_disabled. 

Read only

Former Member
0 Likes
655

Try this,

DATA: ls_style TYPE lvc_s_styl,

lt_style TYPE lvc_t_styl.

ls_style-fieldname = iv_fieldname.

if cs_io-checkbox = ' '.

ls_style-style = cl_gui_alv_grid=>mc_style_enabled.

else.

ls_style-style = cl_gui_alv_grid=>mc_style_disabled.

endif.

Regards,

Read only

0 Likes
654

i m using 'REUSE_ALV_LIST_DISPLAY'

its not working there..

Read only

0 Likes
654

Hi,

Refer to the program BCALV_TEST_LIST_LAYOUT.

With list display you can give checkbox for all records.

If you want to give checkbox for individual record then you will have to use CL_GUI_ALV_GRID object.

Regards,

Ankur Parab

Edited by: Ankur Parab on Feb 20, 2010 7:24 PM