2009 Jul 28 12:26 PM
i have a requirement where in i have to display 4 different lines starting with a checkbox in a classical List display. (not in selection screen)
How can i do this. AT runtime i have to check which check box is checked..
Thanks,
Vasuki
2009 Jul 28 12:38 PM
HI,
try this logic.
data: begin of t_itab occurs 0,
col1 type char1,
col2 type char10,
col3 type char10,
end of t_itab.
t_itab-col2 = 'AA'.
t_itab-col3 = 'AAA'.
append t_itab.
t_itab-col2 = 'BB'.
t_itab-col3 = 'BBB'.
append t_itab.
t_itab-col2 = 'CC'.
t_itab-col3 = 'CCC'.
append t_itab.
t_itab-col2 = 'DD'.
t_itab-col3 = 'DDD'.
append t_itab.
loop at t_itab.
write 😕 t_itab-col1 AS CHECKBOX,
3(10) t_itab-col2,
15(10) t_itab-col3.
endloop.
i have a requirement where in i have to display 4 different lines starting with a checkbox in a classical List display. (not in selection screen)
How can i do this. AT runtime i have to check which check box is checked..
Thanks,
Vasuki
2009 Jul 28 12:36 PM
Hi,
Write variable as check box. You can create a field in the internal table in the output table and use the write as checkbox to write it as checkbox.
Regards,
Himanshu V
2009 Jul 28 12:38 PM
HI,
try this logic.
data: begin of t_itab occurs 0,
col1 type char1,
col2 type char10,
col3 type char10,
end of t_itab.
t_itab-col2 = 'AA'.
t_itab-col3 = 'AAA'.
append t_itab.
t_itab-col2 = 'BB'.
t_itab-col3 = 'BBB'.
append t_itab.
t_itab-col2 = 'CC'.
t_itab-col3 = 'CCC'.
append t_itab.
t_itab-col2 = 'DD'.
t_itab-col3 = 'DDD'.
append t_itab.
loop at t_itab.
write 😕 t_itab-col1 AS CHECKBOX,
3(10) t_itab-col2,
15(10) t_itab-col3.
endloop.
2009 Jul 28 12:47 PM
Hi Bhavana and Himanshu,
I used the keyword ' as checkbox' in the write statement but if i do that only the check box appears, not the text which should appear after it..?
" write / wa_data-wa_choice-l_choice1 as checkbox."
Thanks,
Vasuki
2009 Jul 28 1:01 PM
Hi,
Try like
write / wa_data-wa_choice-l_choice1 as checkbox, 'CHECKBOX'.
Regards,
Himanshu V
2009 Jul 28 12:42 PM
Hi,
For checkboxes in ALV you can refer program,
BCALV_EDIT_05
Or you can try in the field catalog itself there is one parameter of checkbox
and give its value as 'X' and then you can catch it in user command:
wa_fieldcatalog-checkbox = 'X'.
Hope it helps
Regards
Mansi
2009 Jul 28 12:58 PM
first create a char 1 field in your types declaration
TYPES : BEGIN OF T_AUFK,
SEL TYPE CHAR1,
then in your field catalog give the following
LS_FCAT-FIELDNAME = 'SEL'
LS_FCAT-COLTEXT = 'SEL'
LS_FCAT-SELTEXT = 'SEL'
LS_FCAT-CHECKBOX = 'X'.
LS_FCAT-EDIT = 'X'.
APPEND LS_FCAT TO LT_FCAT.
Hope this will work
2009 Jul 28 1:00 PM
Hi Anil,
I need checkbox in classical List ,not in ALV..
Can u pls let me know how it can be doen in classical list display.
2009 Jul 28 1:11 PM
sorry for the mistake
you can use like
DATA : LV_C TYPE CHAR1.
WRITE : / LV_C AS CHECKBOX , 'CheckBox'.
like this you can do
Hope this will work. If you want any clarification let me know
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |