Application Development 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: 

displaying check boxes

Former Member
0 Kudos
153

how to display check boxes for one of field in ALV

1 ACCEPTED SOLUTION

Former Member
0 Kudos
102

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.

9 REPLIES 9

former_member156446
Active Contributor
0 Kudos
102

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

0 Kudos
102

can u give me any example

0 Kudos
102

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.

Former Member
0 Kudos
102

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

Former Member
0 Kudos
103

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.

0 Kudos
102

Hi rohan

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

0 Kudos
102

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

ls_fcat-edit = 'X'.

check my previous post

0 Kudos
102

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.

0 Kudos
102

Thanks jay ..it is working now.