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

displaying check boxes

Former Member
0 Likes
1,431

how to display check boxes for one of field in ALV

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,380

Hi Nikita,

In the layout fill :

is_layout-box_fieldname = 'CHECKBOX'

is_layout-box_tabname = 'I_OUTPUT'.

The internal table that you are passing as I_OUTPUT, should have an extra field called CHECKBOX of length 1.

Also refer to tutorial Easy Grid :

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy...

Also refer program: BALVSD01

Hope this will help.

Regards,

Nitin.

how to display check boxes for one of field in ALV

9 REPLIES 9
Read only

former_member156446
Active Contributor
0 Likes
1,380

you need to update the strucuture that you are sending into FM of ALV and give the fieldcatalog to it as checkbox..

Read only

0 Likes
1,380

can u give me any example

Read only

0 Likes
1,380

check prog: BCALV_EDIT_05

in the above program , you need to look at this code for soultion

*§A2.Add an entry for the checkbox in the fieldcatalog
  clear ls_fcat.
  ls_fcat-fieldname = 'CHECKBOX'.
* Essential: declare field as checkbox and
*            mark it as editable field:
  ls_fcat-checkbox = 'X'.
  ls_fcat-edit = 'X'.

* do not forget to provide texts for this extra field
  ls_fcat-coltext = text-f01.
  ls_fcat-tooltip = text-f02.
  ls_fcat-seltext = text-f03.

* optional: set column width
  ls_fcat-outputlen = 10.

Read only

Former Member
0 Likes
1,380

Hi,

Define one field in an internal table (final which u pass to alv FM)

for ex: chk_box type c.

then build field catalog for this field in field catalog mention checkbox as 'X' and if u want that check box to be editable then pass parameter input of fieldcatalog as 'X'.

Code:

TYPES : BEGIN OF TY_DEL_ENT,

CHK_BOX(1) TYPE C, "Check Box

AUFNR TYPE AUFNR, "Order Number

END OF TY_DEL_ENT.

fieldcatalog

FS_FIELDCAT-TABNAME = WL_TABNAME.

FS_FIELDCAT-FIELDNAME = WL_FCAT_CHK.

FS_FIELDCAT-SELTEXT_L = TEXT-007.

FS_FIELDCAT-CHECKBOX = WL_X.

FS_FIELDCAT-INPUT = WL_X.

APPEND FS_FIELDCAT TO INT_FIELDCAT.

Hope this will help.

Regards,

Rohan.

Edited by: rohan jain on Nov 21, 2008 2:50 PM

Read only

Former Member
0 Likes
1,381

Hi Nikita,

In the layout fill :

is_layout-box_fieldname = 'CHECKBOX'

is_layout-box_tabname = 'I_OUTPUT'.

The internal table that you are passing as I_OUTPUT, should have an extra field called CHECKBOX of length 1.

Also refer to tutorial Easy Grid :

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy...

Also refer program: BALVSD01

Hope this will help.

Regards,

Nitin.

Read only

0 Likes
1,380

Hi rohan

i given same wat u said but in the output the field is showing in disable with right click .

Read only

0 Likes
1,380

you might have not given edit an 'X', in the field catalog..

ls_fcat-edit = 'X'.

check my previous post

Read only

0 Likes
1,380

Hi,

Have you used the input and edit parameter of the fieldcatalog?

because i did the same (simple alv not grid display) and the check box is editable to me.

Regards,

Rohan.

Read only

0 Likes
1,380

Thanks jay ..it is working now.