<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: alv in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439224#M545839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following coding shows how to mark/unmark checkboxes in an ALV tree (CL_GUI_ALV_TREE). The method handles event CHECKBOX_CHANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD handle_checkbox_change .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;define local data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;    lw_child            TYPE lvc_nkey,&lt;/P&gt;&lt;P&gt;    lt_children         TYPE lvc_t_nkey,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;    l_wa_outtab_line    TYPE zfr_calc_marge_detail,&lt;/P&gt;&lt;P&gt;    l_wa_item_layout    TYPE lvc_s_layi,&lt;/P&gt;&lt;P&gt;    lt_item_layout      TYPE lvc_t_layi,&lt;/P&gt;&lt;P&gt;    l_wa_item_layout_c  TYPE lvc_s_laci,&lt;/P&gt;&lt;P&gt;    lt_item_layout_c    TYPE lvc_t_laci.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;" The user marks or unmarks a checkbox on the ALV tree. The status&lt;/P&gt;&lt;P&gt;" (marked / unmarked) is "inherited" to the child nodes.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;" Get sub-tree of selected node (i.e. the node where the checkbox was changed)&lt;/P&gt;&lt;P&gt;  CALL METHOD sender-&amp;gt;get_subtree&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_node_key       = node_key&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_subtree_nodes = lt_children.&lt;/P&gt;&lt;P&gt;" NOTE: the sender is the ALV tree instance&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LOOP AT lt_children INTO lw_child.&lt;/P&gt;&lt;P&gt;    REFRESH: lt_item_layout.&lt;/P&gt;&lt;P&gt;    CLEAR:   l_wa_outtab_line.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Knoten und Item-Layout lesen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL METHOD sender-&amp;gt;get_outtab_line&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_node_key     = lw_child&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        e_outtab_line  = l_wa_outtab_line&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       E_NODE_TEXT    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        et_item_layout = lt_item_layout&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       ES_NODE_LAYOUT =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        node_not_found = 1&lt;/P&gt;&lt;P&gt;        OTHERS         = 2.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    READ TABLE lt_item_layout INTO l_wa_item_layout&lt;/P&gt;&lt;P&gt;         WITH KEY fieldname = cl_gui_alv_tree=&amp;gt;c_hierarchy_column_name&lt;/P&gt;&lt;P&gt;                  class     = cl_gui_column_tree=&amp;gt;item_class_checkbox.&lt;/P&gt;&lt;P&gt;    IF ( syst-subrc = 0 ).&lt;/P&gt;&lt;P&gt;      l_wa_item_layout-chosen = checked.  " 'status' of changed checkbox&lt;/P&gt;&lt;P&gt;      MODIFY lt_item_layout FROM l_wa_item_layout INDEX syst-tabix.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      REFRESH: lt_item_layout_c.&lt;/P&gt;&lt;P&gt;      LOOP AT lt_item_layout INTO l_wa_item_layout.&lt;/P&gt;&lt;P&gt;        MOVE-CORRESPONDING l_wa_item_layout TO l_wa_item_layout_c.&lt;/P&gt;&lt;P&gt;        l_wa_item_layout_c-u_chosen = 'X'.  " update CHOSEN field&lt;/P&gt;&lt;P&gt;        APPEND l_wa_item_layout_c TO lt_item_layout_c.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      CALL METHOD sender-&amp;gt;change_node&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_node_key     = lw_child&lt;/P&gt;&lt;P&gt;          i_outtab_line  = l_wa_outtab_line&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         IS_NODE_LAYOUT =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          it_item_layout = lt_item_layout_c&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         I_NODE_TEXT    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         I_U_NODE_TEXT  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          node_not_found = 1&lt;/P&gt;&lt;P&gt;          OTHERS         = 2.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;" Sending changes to the frontend&lt;/P&gt;&lt;P&gt;  CALL METHOD sender-&amp;gt;frontend_update.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jul 2007 06:14:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-04T06:14:08Z</dc:date>
    <item>
      <title>alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439221#M545836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;        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.&lt;/P&gt;&lt;P&gt;For checkbox i have used the field checkbox in the field catelog, but i'm not getting the checkbox in the header.&lt;/P&gt;&lt;P&gt;please help me out. its urgent.&lt;/P&gt;&lt;P&gt;points will be awarded generously.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:23:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439221#M545836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439222#M545837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Please give me general info on ALV.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=58286" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=58286&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=76490" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=76490&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=20591" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=20591&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=66305" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=66305&lt;/A&gt; - this one discusses which way should you use - ABAP Objects calls or simple function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How do I program double click in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=11601" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=11601&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=23010" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=23010&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. How do I add subtotals (I have problem to add them)...&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=20386" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=20386&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=85191" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=85191&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=88401" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=88401&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=17335" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=17335&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. How to add list heading like top-of-page in ABAP lists?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=58775" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=58775&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=60550" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=60550&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=16629" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=16629&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. How to print page number / total number of pages X/XX in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=29597" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=29597&lt;/A&gt; (no direct solution)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=64320" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=64320&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=44477" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=44477&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. How can I set the cell color in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=52107" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=52107&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. How do I print a logo/graphics in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=81149" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=81149&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=35498" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=35498&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=5013" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=5013&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9. How do I create and use input-enabled fields in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=84933" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=84933&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=69878" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=69878&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10. How can I use ALV for reports that are going to be run in background?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=83243" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=83243&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=19224" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=19224&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11. How can I display an icon in ALV? (Common requirement is traffic light icon).&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=79424" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=79424&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=24512" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=24512&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12. How can I display a checkbox in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=88376" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=88376&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=40968" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=40968&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=6919" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=6919&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go thru these programs they may help u to try on some hands on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV Demo program&lt;/P&gt;&lt;P&gt;BCALV_DEMO_HTML&lt;/P&gt;&lt;P&gt;BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode&lt;/P&gt;&lt;P&gt;BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode&lt;/P&gt;&lt;P&gt;BCALV_GRID_DEMO Simple ALV Control Call Demo Program&lt;/P&gt;&lt;P&gt;BCALV_TREE_DEMO Demo for ALV tree control&lt;/P&gt;&lt;P&gt;BCALV_TREE_SIMPLE_DEMO&lt;/P&gt;&lt;P&gt;BC_ALV_DEMO_HTML_D0100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz reward if useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439222#M545837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439223#M545838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; this program BCALV_EDIT_05 should help you &lt;/P&gt;&lt;P&gt;and refer this&lt;/P&gt;&lt;P&gt;For these kind of Scenarious What you need to do is:&lt;/P&gt;&lt;P&gt;1. Create a Field CHECKBOX in your internal table&lt;/P&gt;&lt;P&gt;2. Set this field as checkbox field in the layout by using lay-box_fnname = 'checkbox'&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;5. Definetly you will solve your problem with this inforamtion&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nandha&lt;/P&gt;&lt;P&gt;Reward if it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:28:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439223#M545838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T05:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439224#M545839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following coding shows how to mark/unmark checkboxes in an ALV tree (CL_GUI_ALV_TREE). The method handles event CHECKBOX_CHANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD handle_checkbox_change .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;define local data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;    lw_child            TYPE lvc_nkey,&lt;/P&gt;&lt;P&gt;    lt_children         TYPE lvc_t_nkey,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;    l_wa_outtab_line    TYPE zfr_calc_marge_detail,&lt;/P&gt;&lt;P&gt;    l_wa_item_layout    TYPE lvc_s_layi,&lt;/P&gt;&lt;P&gt;    lt_item_layout      TYPE lvc_t_layi,&lt;/P&gt;&lt;P&gt;    l_wa_item_layout_c  TYPE lvc_s_laci,&lt;/P&gt;&lt;P&gt;    lt_item_layout_c    TYPE lvc_t_laci.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;" The user marks or unmarks a checkbox on the ALV tree. The status&lt;/P&gt;&lt;P&gt;" (marked / unmarked) is "inherited" to the child nodes.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;" Get sub-tree of selected node (i.e. the node where the checkbox was changed)&lt;/P&gt;&lt;P&gt;  CALL METHOD sender-&amp;gt;get_subtree&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_node_key       = node_key&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_subtree_nodes = lt_children.&lt;/P&gt;&lt;P&gt;" NOTE: the sender is the ALV tree instance&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LOOP AT lt_children INTO lw_child.&lt;/P&gt;&lt;P&gt;    REFRESH: lt_item_layout.&lt;/P&gt;&lt;P&gt;    CLEAR:   l_wa_outtab_line.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Knoten und Item-Layout lesen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL METHOD sender-&amp;gt;get_outtab_line&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_node_key     = lw_child&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        e_outtab_line  = l_wa_outtab_line&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       E_NODE_TEXT    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        et_item_layout = lt_item_layout&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       ES_NODE_LAYOUT =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        node_not_found = 1&lt;/P&gt;&lt;P&gt;        OTHERS         = 2.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    READ TABLE lt_item_layout INTO l_wa_item_layout&lt;/P&gt;&lt;P&gt;         WITH KEY fieldname = cl_gui_alv_tree=&amp;gt;c_hierarchy_column_name&lt;/P&gt;&lt;P&gt;                  class     = cl_gui_column_tree=&amp;gt;item_class_checkbox.&lt;/P&gt;&lt;P&gt;    IF ( syst-subrc = 0 ).&lt;/P&gt;&lt;P&gt;      l_wa_item_layout-chosen = checked.  " 'status' of changed checkbox&lt;/P&gt;&lt;P&gt;      MODIFY lt_item_layout FROM l_wa_item_layout INDEX syst-tabix.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      REFRESH: lt_item_layout_c.&lt;/P&gt;&lt;P&gt;      LOOP AT lt_item_layout INTO l_wa_item_layout.&lt;/P&gt;&lt;P&gt;        MOVE-CORRESPONDING l_wa_item_layout TO l_wa_item_layout_c.&lt;/P&gt;&lt;P&gt;        l_wa_item_layout_c-u_chosen = 'X'.  " update CHOSEN field&lt;/P&gt;&lt;P&gt;        APPEND l_wa_item_layout_c TO lt_item_layout_c.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      CALL METHOD sender-&amp;gt;change_node&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_node_key     = lw_child&lt;/P&gt;&lt;P&gt;          i_outtab_line  = l_wa_outtab_line&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         IS_NODE_LAYOUT =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          it_item_layout = lt_item_layout_c&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         I_NODE_TEXT    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         I_U_NODE_TEXT  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          node_not_found = 1&lt;/P&gt;&lt;P&gt;          OTHERS         = 2.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;" Sending changes to the frontend&lt;/P&gt;&lt;P&gt;  CALL METHOD sender-&amp;gt;frontend_update.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 06:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2439224#M545839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T06:14:08Z</dc:date>
    </item>
  </channel>
</rss>

