‎2009 Mar 17 2:17 PM
Dear all
I need the first column of the internal table as a checkbox. Please give me the syntax to do that.
Itried like
types:begin of is_ty,
a type c as checkbox,
matnr type matnr,
end of is_ty.
But its throw an error in the first row...Please give me the correct syntax.
thanks
‎2009 Mar 17 2:30 PM
Hi,
It is not possible to declare a checkbox field in the internal table.... instead you have to declare the first fields as type c...
types:begin of is_ty,
a type c,
matnr type matnr,
end of is_ty.if you want to display that field in list as a checkbox then you can use....
fs_layout-box_fname = 'A'.
"and pass this layout to the grid container when you are calling set_table_for_first_displayRegards,
Siddarth
‎2009 Mar 17 2:22 PM
hi,
If you want to display the internal table in a list you have to write the code for the list as follows.
loop at itab into fs_itab.
write: fs_itab-box as check-box,
fs_itab-data1.
endloop.
if you are using dialog programming you have a option for displaying the first field as check-box in screen painter of table control.
regards,
Veeresh
‎2009 Mar 17 2:25 PM
Hi
Thanks for the reply..But i am not writing my internal table in the output.I am just passing it to a Container alv and i am not using any table controls...Now plz tell me what is the option for me to make my first field as a checkbox..Plese see my declaration on top..
Thanks
‎2009 Mar 17 2:22 PM
‎2009 Mar 17 2:24 PM
Hi Biju
I don't think you can have a checkbox inside an internal table.
You may have a single character field (so if it's checked its value is 'X' otherwise space)
Where do you want it displayed?
If in an ALV then in the field catalog building you can declare it as a checkbox.I'm not sure ow to do that in classical output though.
Pushpraj
‎2009 Mar 17 2:30 PM
Hi,
It is not possible to declare a checkbox field in the internal table.... instead you have to declare the first fields as type c...
types:begin of is_ty,
a type c,
matnr type matnr,
end of is_ty.if you want to display that field in list as a checkbox then you can use....
fs_layout-box_fname = 'A'.
"and pass this layout to the grid container when you are calling set_table_for_first_displayRegards,
Siddarth
‎2009 Mar 17 2:37 PM