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

Check boxes in alv

Former Member
0 Likes
553

Hi,

Could u pls help me to place check boxes for each of the records in ALV ?

Thanks,

Bala Raja

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
525

Hello,

---You have to modify the field Catalog fields (fields that you want to make editable).<b>Set the field EDIT as 'X'</b>.For example if you want to make the field below editable:

ls_fcat-fieldname = 'CARRID'.

...

...

<b>ls_fcat-edit = 'X'.</b>

APPEND ls_fcat TO pt_fieldcat.

---For check-box,add:

<b>ls_fcat-checkbox = 'X'.</b>

---Call the method below before you call the set_table_for_first_display/refresh_table_display.

<b>CALL METHOD ALV_GRID_INSTANCE->set_ready_for_input</b>

EXPORTING

i_ready_for_input = 0. ( For Display ) and ('1' for Edit )

After this put the set_table_for_first_display/refresh_table_display.

<b>Please refer the links,

Regards,

Beejal

**Reward if this helps

5 REPLIES 5
Read only

Former Member
0 Likes
525

Hi,

User reuse_alv_grid_display function module. create u r initernal table in one sel field type c. while filling field catlog use that field as checkbox.

wa_fieldcat-checkbox = 'X'.

u can get checkbox in alv output.

Read only

Former Member
0 Likes
525

Hi Raja,

the first thing is u have to declare your internal table with checkbox.

eg.

data : Begin of final Occurs 0,

check(1) ,

End of final.

later fill the fieldcatalogs

w_fieldcat-fieldname = 'CHECK'.

w_fieldcat-checkbox = 'X'.

APPEND w_fieldcat TO l_fieldcat.

and finally call your internal table in the reuse_alv_grid_display etc...

Read only

Former Member
0 Likes
526

Hello,

---You have to modify the field Catalog fields (fields that you want to make editable).<b>Set the field EDIT as 'X'</b>.For example if you want to make the field below editable:

ls_fcat-fieldname = 'CARRID'.

...

...

<b>ls_fcat-edit = 'X'.</b>

APPEND ls_fcat TO pt_fieldcat.

---For check-box,add:

<b>ls_fcat-checkbox = 'X'.</b>

---Call the method below before you call the set_table_for_first_display/refresh_table_display.

<b>CALL METHOD ALV_GRID_INSTANCE->set_ready_for_input</b>

EXPORTING

i_ready_for_input = 0. ( For Display ) and ('1' for Edit )

After this put the set_table_for_first_display/refresh_table_display.

<b>Please refer the links,

Regards,

Beejal

**Reward if this helps

Read only

Former Member
0 Likes
525

Hi,

Thank u for all

Read only

0 Likes
525

plz reward the points