2007 Jul 04 6:23 AM
Hi Guys,
i wnt to have checkbox in my report and there should be one checkbox in the header. When i select this checkbox all the other check boxes should be selected automatically.
For checkbox i have used the field checkbox in the field catelog, but i'm not getting the checkbox in the header.
please help me out. its urgent.
points will be awarded generously.
2007 Jul 04 6:27 AM
hi
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
regards
ravish
<b>plz reward if useful</b>
Hi Guys,
i wnt to have checkbox in my report and there should be one checkbox in the header. When i select this checkbox all the other check boxes should be selected automatically.
For checkbox i have used the field checkbox in the field catelog, but i'm not getting the checkbox in the header.
please help me out. its urgent.
points will be awarded generously.
2007 Jul 04 6:27 AM
hi
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
regards
ravish
<b>plz reward if useful</b>
2007 Jul 04 6:28 AM
Hi,
this program BCALV_EDIT_05 should help you
and refer this
For these kind of Scenarious What you need to do is:
1. Create a Field CHECKBOX in your internal table
2. Set this field as checkbox field in the layout by using lay-box_fnname = 'checkbox'
3.If you read the Internal table in the User command it will definetly update it. But check that you may be set the property of this field as checkbox in the fieldcatalog also. If you do that it won't work.
4. That too in the grid display it won't display the check box why because it shows one button for each row. if you want to select multiple rows then you need to select them using the Ctrl+ Mouse click on the button.
5. Definetly you will solve your problem with this inforamtion
Regards,
Nandha
Reward if it helps
2007 Jul 04 7:14 AM
Hi,
The following coding shows how to mark/unmark checkboxes in an ALV tree (CL_GUI_ALV_TREE). The method handles event CHECKBOX_CHANGE.
METHOD handle_checkbox_change .
define local data
DATA:
lw_child TYPE lvc_nkey,
lt_children TYPE lvc_t_nkey,
*
l_wa_outtab_line TYPE zfr_calc_marge_detail,
l_wa_item_layout TYPE lvc_s_layi,
lt_item_layout TYPE lvc_t_layi,
l_wa_item_layout_c TYPE lvc_s_laci,
lt_item_layout_c TYPE lvc_t_laci.
" The user marks or unmarks a checkbox on the ALV tree. The status
" (marked / unmarked) is "inherited" to the child nodes.
" Get sub-tree of selected node (i.e. the node where the checkbox was changed)
CALL METHOD sender->get_subtree
EXPORTING
i_node_key = node_key
IMPORTING
et_subtree_nodes = lt_children.
" NOTE: the sender is the ALV tree instance
LOOP AT lt_children INTO lw_child.
REFRESH: lt_item_layout.
CLEAR: l_wa_outtab_line.
Knoten und Item-Layout lesen
CALL METHOD sender->get_outtab_line
EXPORTING
i_node_key = lw_child
IMPORTING
e_outtab_line = l_wa_outtab_line
E_NODE_TEXT =
et_item_layout = lt_item_layout
ES_NODE_LAYOUT =
EXCEPTIONS
node_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE lt_item_layout INTO l_wa_item_layout
WITH KEY fieldname = cl_gui_alv_tree=>c_hierarchy_column_name
class = cl_gui_column_tree=>item_class_checkbox.
IF ( syst-subrc = 0 ).
l_wa_item_layout-chosen = checked. " 'status' of changed checkbox
MODIFY lt_item_layout FROM l_wa_item_layout INDEX syst-tabix.
REFRESH: lt_item_layout_c.
LOOP AT lt_item_layout INTO l_wa_item_layout.
MOVE-CORRESPONDING l_wa_item_layout TO l_wa_item_layout_c.
l_wa_item_layout_c-u_chosen = 'X'. " update CHOSEN field
APPEND l_wa_item_layout_c TO lt_item_layout_c.
ENDLOOP.
CALL METHOD sender->change_node
EXPORTING
i_node_key = lw_child
i_outtab_line = l_wa_outtab_line
IS_NODE_LAYOUT =
it_item_layout = lt_item_layout_c
I_NODE_TEXT =
I_U_NODE_TEXT =
EXCEPTIONS
node_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDLOOP.
" Sending changes to the frontend
CALL METHOD sender->frontend_update.
ENDMETHOD.
Regards,
Padmam.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |