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

Internal Table

Former Member
0 Likes
696

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
672

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_display

Regards,

Siddarth

6 REPLIES 6
Read only

former_member673464
Active Contributor
0 Likes
672

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

Read only

0 Likes
672

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

Read only

awin_prabhu
Active Contributor
0 Likes
672

Hi,

Check this thread.

Thanks..

Edited by: Sap Fan on Mar 17, 2009 3:23 PM

Read only

Former Member
0 Likes
672

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

Read only

Former Member
0 Likes
673

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_display

Regards,

Siddarth

Read only

0 Likes
672

Thanks man...its working now....