<?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/4372107#M1040345</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;your answer is some what helpful  but actually my requirement is i want to display in tree format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Sep 2008 07:26:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-02T07:26:22Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372095#M1040333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have hierarchical report in which i displayed header and item data,my requirement is to display the alv tree for each item in hierarchical report&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 05:44:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372095#M1040333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T05:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372096#M1040334</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;Refer to the link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdev.co.uk/reporting/alv/alvtree.htm" target="test_blank"&gt;http://www.sapdev.co.uk/reporting/alv/alvtree.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This Might help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sumit Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 05:47:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372096#M1040334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T05:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372097#M1040335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Surendra&lt;/P&gt;&lt;P&gt;Check the program in below link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saptechnical.com/Tutorials/ALV/Hierarchical/demo.htm" target="test_blank"&gt;http://www.saptechnical.com/Tutorials/ALV/Hierarchical/demo.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Syf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 05:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372097#M1040335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T05:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372098#M1040336</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;follow this link &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="726581"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Snehi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 05:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372098#M1040336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T05:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372099#M1040337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;REPORT  ZDE_S2D_TREE_SIMPLE.&lt;/P&gt;&lt;P&gt;types: begin of ty_mara,&lt;/P&gt;&lt;P&gt;  matnr type matnr,&lt;/P&gt;&lt;P&gt;  mbrsh type mbrsh,&lt;/P&gt;&lt;P&gt;  mtart type mtart,&lt;/P&gt;&lt;P&gt;  meins type meins,&lt;/P&gt;&lt;P&gt;  end of ty_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gt_mara type TABLE OF TY_MARA,&lt;/P&gt;&lt;P&gt;      gt_mara1 type TABLE OF TY_MARA,&lt;/P&gt;&lt;P&gt;      GW_MARA TYPE TY_MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gr_tree  type ref to cl_salv_tree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: nodes type ref to cl_salv_nodes,&lt;/P&gt;&lt;P&gt;      node type ref to cl_salv_node.&lt;/P&gt;&lt;P&gt;data: key type SALV_DE_NODE_KEY.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;SELECT matnr mbrsh mtart meins from mara INTO TABLE gt_mara UP TO 50 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD CL_SALV_TREE=&amp;gt;FACTORY&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   R_CONTAINER =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   HIDE_HEADER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    R_SALV_TREE = gr_tree&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    T_TABLE     = gt_mara1&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  nodes = gr_tree-&amp;gt;get_nodes( ).&lt;/P&gt;&lt;P&gt;  key = ' '.&lt;/P&gt;&lt;P&gt;  node = nodes-&amp;gt;add_node( related_node = key&lt;/P&gt;&lt;P&gt;                          relationship = cl_gui_column_tree=&amp;gt;relat_first_child ).&lt;/P&gt;&lt;P&gt;  LOOP AT gt_mara into gw_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      node-&amp;gt;set_data_row( gw_mara ).&lt;/P&gt;&lt;P&gt;      key = node-&amp;gt;get_key( ).&lt;/P&gt;&lt;P&gt;      node = nodes-&amp;gt;add_node( related_node = key&lt;/P&gt;&lt;P&gt;                              relationship = cl_gui_column_tree=&amp;gt;relat_last_child ).&lt;/P&gt;&lt;P&gt;      nodes = gr_tree-&amp;gt;get_nodes( ).&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;gr_tree-&amp;gt;display( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it will be useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Deepika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 05:55:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372099#M1040337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T05:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372100#M1040338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Surendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ALV Heirarchial with header and item data|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="746318"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 06:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372100#M1040338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T06:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372101#M1040339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i sent u the model code to create tree view&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS DEFINITION&lt;/P&gt;&lt;P&gt;CLASS lcl_application DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS:&lt;/P&gt;&lt;P&gt;      handle_node_double_click&lt;/P&gt;&lt;P&gt;        FOR EVENT node_double_click&lt;/P&gt;&lt;P&gt;        OF cl_gui_list_tree&lt;/P&gt;&lt;P&gt;        IMPORTING node_key,&lt;/P&gt;&lt;P&gt;      handle_expand_no_children&lt;/P&gt;&lt;P&gt;        FOR EVENT expand_no_children&lt;/P&gt;&lt;P&gt;        OF cl_gui_list_tree&lt;/P&gt;&lt;P&gt;        IMPORTING node_key,&lt;/P&gt;&lt;P&gt;      handle_item_double_click&lt;/P&gt;&lt;P&gt;        FOR EVENT item_double_click&lt;/P&gt;&lt;P&gt;        OF cl_gui_list_tree&lt;/P&gt;&lt;P&gt;        IMPORTING node_key item_name,&lt;/P&gt;&lt;P&gt;      handle_button_click&lt;/P&gt;&lt;P&gt;        FOR EVENT button_click&lt;/P&gt;&lt;P&gt;        OF cl_gui_list_tree&lt;/P&gt;&lt;P&gt;        IMPORTING node_key item_name,&lt;/P&gt;&lt;P&gt;      handle_link_click&lt;/P&gt;&lt;P&gt;        FOR EVENT link_click&lt;/P&gt;&lt;P&gt;        OF cl_gui_list_tree&lt;/P&gt;&lt;P&gt;        IMPORTING node_key item_name,&lt;/P&gt;&lt;P&gt;      handle_checkbox_change&lt;/P&gt;&lt;P&gt;        FOR EVENT checkbox_change&lt;/P&gt;&lt;P&gt;        OF cl_gui_list_tree&lt;/P&gt;&lt;P&gt;        IMPORTING node_key item_name checked.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;CLASS IMPLEMENTATION&lt;/P&gt;&lt;P&gt;CLASS lcl_application IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD  handle_node_double_click.&lt;/P&gt;&lt;P&gt;    " this method handles the node double click event of the tree&lt;/P&gt;&lt;P&gt;    " control instance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    " show the key of the double clicked node in a dynpro field&lt;/P&gt;&lt;P&gt;    READ TABLE itab_data WITH KEY node_key = node_key INTO wa_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You now have the data to do anything you wish&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;u2026.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD  handle_item_double_click.&lt;/P&gt;&lt;P&gt;    " this method handles the item double click event of the tree&lt;/P&gt;&lt;P&gt;    " control instance. You have variables node_key and item_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    " show the key of the node and the name of the item&lt;/P&gt;&lt;P&gt;    " of the double clicked item in a dynpro field&lt;/P&gt;&lt;P&gt;    READ TABLE itab_data WITH KEY node_key = node_key INTO wa_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You now have the data to do anything you wish&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;u2026.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD  handle_link_click.&lt;/P&gt;&lt;P&gt;    " this method handles the link click event of the tree&lt;/P&gt;&lt;P&gt;    " control instance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    " show the key of the node and the name of the item&lt;/P&gt;&lt;P&gt;    " of the clicked link in a dynpro field&lt;/P&gt;&lt;P&gt;    g_node_key = node_key.&lt;/P&gt;&lt;P&gt;    g_item_name = item_name.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD  handle_button_click.&lt;/P&gt;&lt;P&gt;    " this method handles the button click event of the tree&lt;/P&gt;&lt;P&gt;    " control instance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    " show the key of the node and the name of the item&lt;/P&gt;&lt;P&gt;    " of the clicked button in a dynpro field&lt;/P&gt;&lt;P&gt;    g_node_key = node_key.&lt;/P&gt;&lt;P&gt;    g_item_name = item_name.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD  handle_checkbox_change.&lt;/P&gt;&lt;P&gt;    " this method handles the checkbox_change event of the tree&lt;/P&gt;&lt;P&gt;    " control instance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    " show the key of the node and the name of the item&lt;/P&gt;&lt;P&gt;    " of the clicked checkbox in a dynpro field&lt;/P&gt;&lt;P&gt;    g_node_key = node_key.&lt;/P&gt;&lt;P&gt;    g_item_name = item_name.&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;  METHOD handle_expand_no_children.&lt;/P&gt;&lt;P&gt;    DATA: node_table TYPE treev_ntab,&lt;/P&gt;&lt;P&gt;          node TYPE treev_node,&lt;/P&gt;&lt;P&gt;          item_table TYPE item_table_type,&lt;/P&gt;&lt;P&gt;          item TYPE mtreeitm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;show the key of the expanded node in a dynpro field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    g_node_key = node_key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF node_key = 'Child2'.                                 "#EC NOTEXT&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add the children for node with key 'Child2'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Node with key 'New3'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CLEAR node.&lt;/P&gt;&lt;P&gt;      node-node_key = 'New3'.                               "#EC NOTEXT&lt;/P&gt;&lt;P&gt;      node-relatkey = 'Child2'.&lt;/P&gt;&lt;P&gt;      node-relatship = cl_gui_list_tree=&amp;gt;relat_last_child.&lt;/P&gt;&lt;P&gt;      APPEND node TO node_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Node with key 'New4'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CLEAR node.&lt;/P&gt;&lt;P&gt;      node-node_key = 'New4'.                               "#EC NOTEXT&lt;/P&gt;&lt;P&gt;      node-relatkey = 'Child2'.&lt;/P&gt;&lt;P&gt;      node-relatship = cl_gui_list_tree=&amp;gt;relat_last_child.&lt;/P&gt;&lt;P&gt;      APPEND node TO node_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Items of node with key 'New3'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CLEAR item.&lt;/P&gt;&lt;P&gt;      item-node_key = 'New3'.&lt;/P&gt;&lt;P&gt;      item-item_name = '1'.&lt;/P&gt;&lt;P&gt;      item-class = cl_gui_list_tree=&amp;gt;item_class_text.&lt;/P&gt;&lt;P&gt;      item-length = 11.&lt;/P&gt;&lt;P&gt;      item-usebgcolor = 'X'. "&lt;/P&gt;&lt;P&gt;      item-text = 'SAPTROX1'.&lt;/P&gt;&lt;P&gt;      APPEND item TO item_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CLEAR item.&lt;/P&gt;&lt;P&gt;      item-node_key = 'New3'.&lt;/P&gt;&lt;P&gt;      item-item_name = '2'.&lt;/P&gt;&lt;P&gt;      item-class = cl_gui_list_tree=&amp;gt;item_class_text.&lt;/P&gt;&lt;P&gt;      item-alignment = cl_gui_list_tree=&amp;gt;align_auto.&lt;/P&gt;&lt;P&gt;      item-font = cl_gui_list_tree=&amp;gt;item_font_prop.&lt;/P&gt;&lt;P&gt;      item-text = 'Comment to SAPTROX1'.                    "#EC NOTEXT&lt;/P&gt;&lt;P&gt;      APPEND item TO item_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Items of node with key 'New4'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CLEAR item.&lt;/P&gt;&lt;P&gt;      item-node_key = 'New4'.&lt;/P&gt;&lt;P&gt;      item-item_name = '1'.&lt;/P&gt;&lt;P&gt;      item-class = cl_gui_list_tree=&amp;gt;item_class_text.&lt;/P&gt;&lt;P&gt;      item-length = 11.&lt;/P&gt;&lt;P&gt;      item-usebgcolor = 'X'. "&lt;/P&gt;&lt;P&gt;      item-text = 'SAPTRIXTROX'.&lt;/P&gt;&lt;P&gt;      APPEND item TO item_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CLEAR item.&lt;/P&gt;&lt;P&gt;      item-node_key = 'New4'.&lt;/P&gt;&lt;P&gt;      item-item_name = '2'.&lt;/P&gt;&lt;P&gt;      item-class = cl_gui_list_tree=&amp;gt;item_class_text.&lt;/P&gt;&lt;P&gt;      item-alignment = cl_gui_list_tree=&amp;gt;align_auto.&lt;/P&gt;&lt;P&gt;      item-font = cl_gui_list_tree=&amp;gt;item_font_prop.&lt;/P&gt;&lt;P&gt;      item-text = 'Comment to SAPTRIXTROX'.                 "#EC NOTEXT&lt;/P&gt;&lt;P&gt;      APPEND item TO item_table.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD g_tree-&amp;gt;add_nodes_and_items&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        node_table = node_table&lt;/P&gt;&lt;P&gt;        item_table = item_table&lt;/P&gt;&lt;P&gt;        item_table_structure_name = 'MTREEITM'&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        failed = 1&lt;/P&gt;&lt;P&gt;        cntl_system_error = 3&lt;/P&gt;&lt;P&gt;        error_in_tables = 4&lt;/P&gt;&lt;P&gt;        dp_error = 5&lt;/P&gt;&lt;P&gt;        table_structure_name_not_found = 6.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE a000(tree_control_msg).&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 06:12:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372101#M1040339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T06:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372102#M1040340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Iam attaching both ALV TREE and ALV HOERARCHIAL Programmes.Hope this would help you..Please give Points , if it is useful for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ALV TREE :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  z_alv_po_oops_me23n&lt;/P&gt;&lt;P&gt;no standard page heading message-id z9d_alv_oops&lt;/P&gt;&lt;P&gt;line-count 200 line-size 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--types for t_ekko&lt;/P&gt;&lt;P&gt;types : begin of type_ekko,&lt;/P&gt;&lt;P&gt;        ebeln type ebeln,   "Purchasing Document Number&lt;/P&gt;&lt;P&gt;        bukrs type bukrs,   "Company Code&lt;/P&gt;&lt;P&gt;        aedat type erdat,   "Date on which the record was created&lt;/P&gt;&lt;P&gt;        ekorg type ekorg,   "Purchasing Organization&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end of type_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--types for t_ekpo&lt;/P&gt;&lt;P&gt;types : begin of type_ekpo,&lt;/P&gt;&lt;P&gt;        ebeln type ebeln,   "Purchasing Document Number&lt;/P&gt;&lt;P&gt;        ebelp type ebelp,   "Item Number of Purchasing Document&lt;/P&gt;&lt;P&gt;        txz01 type txz01,   "Short text&lt;/P&gt;&lt;P&gt;        ematn type ematnr,  "Material number&lt;/P&gt;&lt;P&gt;        menge type bstmg,   "Purchase order quantity&lt;/P&gt;&lt;P&gt;        netpr type bprei,&lt;/P&gt;&lt;P&gt;        "Net price in purchasing document (in document currency)&lt;/P&gt;&lt;P&gt;        pstyp type pstyp,   "Item category in purchasing document&lt;/P&gt;&lt;P&gt;        knttp type knttp,   "Account assignment category&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end of type_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--types for t_eket&lt;/P&gt;&lt;P&gt;types : begin of type_eket,&lt;/P&gt;&lt;P&gt;        ebeln type ebeln,    "Purchasing Document Number&lt;/P&gt;&lt;P&gt;        ebelp type ebelp,    "Item Number of Purchasing Document&lt;/P&gt;&lt;P&gt;        etenr type eeten,    "Delivery Schedule Line Counter&lt;/P&gt;&lt;P&gt;        eindt type eindt,    "Item delivery date&lt;/P&gt;&lt;P&gt;        end of type_eket.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---types for t_podetail&lt;/P&gt;&lt;P&gt;types : begin of type_podetail,&lt;/P&gt;&lt;P&gt;        ebeln type ebeln,   "Purchasing Document Number&lt;/P&gt;&lt;P&gt;        ebelp type ebelp,   "Item Number of Purchasing Document&lt;/P&gt;&lt;P&gt;        txz01 type txz01,   "Short text&lt;/P&gt;&lt;P&gt;        ematn type ematnr,  "Material number&lt;/P&gt;&lt;P&gt;        menge type bstmg,   "Purchase order quantity&lt;/P&gt;&lt;P&gt;        netpr type bprei,&lt;/P&gt;&lt;P&gt;        "Net price in purchasing document (in document currency)&lt;/P&gt;&lt;P&gt;        pstyp type pstyp,   "Item category in purchasing document&lt;/P&gt;&lt;P&gt;        knttp type knttp,   "Account assignment category&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       EBELN type EBELN,    "Purchasing Document Number&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       EBELP type EBELP,    "Item Number of Purchasing Document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        etenr type eeten,    "Delivery Schedule Line Counter&lt;/P&gt;&lt;P&gt;        eindt type eindt,    "Item delivery date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end of type_podetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----types&lt;/P&gt;&lt;P&gt;types : type_t_ekko type type_ekko,&lt;/P&gt;&lt;P&gt;        type_t_ekpo type type_ekpo,&lt;/P&gt;&lt;P&gt;        type_t_eket type type_eket,&lt;/P&gt;&lt;P&gt;        type_t_podetail type type_podetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----internal tables&lt;/P&gt;&lt;P&gt;data : it_ekko type standard table of type_t_ekko,&lt;/P&gt;&lt;P&gt;       it_ekpo type standard table of type_t_ekpo,&lt;/P&gt;&lt;P&gt;       it_eket type standard table of type_t_eket,&lt;/P&gt;&lt;P&gt;       it_podetail type standard table of type_t_podetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----work areas&lt;/P&gt;&lt;P&gt;data : wa_ekko type type_t_ekko,&lt;/P&gt;&lt;P&gt;       wa_ekpo type type_t_ekpo,&lt;/P&gt;&lt;P&gt;       wa_eket type type_t_eket,&lt;/P&gt;&lt;P&gt;       wa_podetail type type_t_podetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--data declaration for selection screen&lt;/P&gt;&lt;P&gt;data : w_ebeln type ebeln,&lt;/P&gt;&lt;P&gt;       w_aedat type erdat,&lt;/P&gt;&lt;P&gt;       w_ekorg type ekorg,&lt;/P&gt;&lt;P&gt;       w_bukrs type bukrs,&lt;/P&gt;&lt;P&gt;       gd_date1(10),  "field to store output date&lt;/P&gt;&lt;P&gt;       gd_date2(10).  "field to store output date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-----data declaration for ok_code.&lt;/P&gt;&lt;P&gt;data : ok_code_0101 like sy-ucomm,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----work area for field catalog&lt;/P&gt;&lt;P&gt;       wa_fieldcatalog2 type lvc_s_fcat,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----internal table for field catalog&lt;/P&gt;&lt;P&gt;       it_fieldcatalog2 type lvc_t_fcat,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----tree2 for alv tree&lt;/P&gt;&lt;P&gt;       tree2  type ref to cl_gui_alv_tree,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----l_tree_container_name&lt;/P&gt;&lt;P&gt;       l_tree_container_name(30) type c,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----custom_container&lt;/P&gt;&lt;P&gt;       custom_container type ref to cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----lt_list_commentary&lt;/P&gt;&lt;P&gt;       lt_list_commentary type slis_t_listheader,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----l_logo for header&lt;/P&gt;&lt;P&gt;       l_logo             type sdydo_value,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----ls_line&lt;/P&gt;&lt;P&gt;       ls_line type slis_listheader,&lt;/P&gt;&lt;P&gt;*&amp;amp;-----hirarchy header&lt;/P&gt;&lt;P&gt;       l_hierarchy_header type treev_hhdr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: l_system(12) type c.&lt;/P&gt;&lt;P&gt; data :  o_header      type ref to cl_salv_form_layout_grid,&lt;/P&gt;&lt;P&gt;         o_header_1    type ref to cl_salv_form_layout_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;--&lt;/STRONG&gt;&lt;DEL&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="--------------" /&gt;defining the selection-screen--&lt;HR originaltext="----------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block bl1 with frame title text-001.&lt;/P&gt;&lt;P&gt;select-options : s_ebeln for w_ebeln obligatory.&lt;/P&gt;&lt;P&gt;select-options : s_bukrs for w_bukrs.&lt;/P&gt;&lt;P&gt;select-options : s_aedat for w_aedat.&lt;/P&gt;&lt;P&gt;select-options : s_ekorg for w_ekorg.&lt;/P&gt;&lt;P&gt;selection-screen end of block bl1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;--&lt;/STRONG&gt;&lt;DEL&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="------------" /&gt;validation on the selection-screen--&lt;HR originaltext="-------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---validation for ebeln&lt;/P&gt;&lt;P&gt;at selection-screen on s_ebeln.&lt;/P&gt;&lt;P&gt;  if s_ebeln[] is initial.&lt;/P&gt;&lt;P&gt;   set cursor field 's_ebeln-low'.&lt;/P&gt;&lt;P&gt;   message e000.         "plz enter po document number&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;   select ebeln into w_ebeln&lt;/P&gt;&lt;P&gt;                up to 1 rows&lt;/P&gt;&lt;P&gt;                from ekko&lt;/P&gt;&lt;P&gt;                where ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;    endselect.&lt;/P&gt;&lt;P&gt;*&amp;amp;---checking for sy-subrc&lt;/P&gt;&lt;P&gt;   if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    set cursor field 's_ebeln-low'.&lt;/P&gt;&lt;P&gt;    message e001.        "entered document number is invalid&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---validation for bukrs&lt;/P&gt;&lt;P&gt;at selection-screen on s_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bukrs into w_bukrs&lt;/P&gt;&lt;P&gt;             up to 1 rows&lt;/P&gt;&lt;P&gt;             from t001&lt;/P&gt;&lt;P&gt;             where bukrs in s_bukrs.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;*&amp;amp;---checking for sy-subrc&lt;/P&gt;&lt;P&gt;   if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    set cursor field 's_bukrs-low'.&lt;/P&gt;&lt;P&gt;    message e007.        "entered company code is invalid&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---validation for ekorg&lt;/P&gt;&lt;P&gt;at selection-screen on s_ekorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ekorg into w_ekorg&lt;/P&gt;&lt;P&gt;             up to 1 rows&lt;/P&gt;&lt;P&gt;             from t024e&lt;/P&gt;&lt;P&gt;             where ekorg in s_ekorg.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;*&amp;amp;---checking for sy-subrc&lt;/P&gt;&lt;P&gt;   if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    set cursor field 's_ekorg-low'.&lt;/P&gt;&lt;P&gt;    message e006.        "entered purchasing organization is invalid&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-----main logic.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--perform for fetch_detail&lt;/P&gt;&lt;P&gt;perform fetch_detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call screen 0101.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  fetch_detail&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form fetch_detail .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--clear work area&lt;/P&gt;&lt;P&gt;clear wa_ekko.&lt;/P&gt;&lt;P&gt;*&amp;amp;--refresh internal table&lt;/P&gt;&lt;P&gt;refresh it_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---populate the data from ekko&lt;/P&gt;&lt;P&gt;select ebeln&lt;/P&gt;&lt;P&gt;       bukrs&lt;/P&gt;&lt;P&gt;       aedat&lt;/P&gt;&lt;P&gt;       ekorg&lt;/P&gt;&lt;P&gt;          into table it_ekko&lt;/P&gt;&lt;P&gt;          from ekko&lt;/P&gt;&lt;P&gt;          where ebeln in s_ebeln and&lt;/P&gt;&lt;P&gt;                 bukrs in s_bukrs and&lt;/P&gt;&lt;P&gt;                 aedat in s_aedat and&lt;/P&gt;&lt;P&gt;                 ekorg in s_ekorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--checking for sy-subrc&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e002.      "header data doesn't exists&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;sort it_ekko by ebeln.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--clear work area&lt;/P&gt;&lt;P&gt;clear wa_ekpo.&lt;/P&gt;&lt;P&gt;*&amp;amp;--refresh internal table&lt;/P&gt;&lt;P&gt;refresh it_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_ekko[] is not initial.&lt;/P&gt;&lt;P&gt;*&amp;amp;----populate the data from ekpo.&lt;/P&gt;&lt;P&gt;select  ebeln   "Purchasing Document Number&lt;/P&gt;&lt;P&gt;        ebelp   "Item Number of Purchasing Document&lt;/P&gt;&lt;P&gt;        txz01   "Short text&lt;/P&gt;&lt;P&gt;        ematn   "Material number&lt;/P&gt;&lt;P&gt;        menge   "Purchase order quantity&lt;/P&gt;&lt;P&gt;        netpr   "Net price in purchasing document (in document currency)&lt;/P&gt;&lt;P&gt;        pstyp   "Item category in purchasing document&lt;/P&gt;&lt;P&gt;        knttp   "Account assignment category&lt;/P&gt;&lt;P&gt;            into table it_ekpo&lt;/P&gt;&lt;P&gt;            from ekpo&lt;/P&gt;&lt;P&gt;            for all entries in it_ekko&lt;/P&gt;&lt;P&gt;            where ebeln = it_ekko-ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--checking for sy-subrc&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e003.      "items data doesn't exists&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;sort it_ekpo by ebeln ebelp.&lt;/P&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;*&amp;amp;--populate the data from eket&lt;/P&gt;&lt;P&gt;if it_ekpo[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  ebeln    "Purchasing Document Number&lt;/P&gt;&lt;P&gt;        ebelp    "Item Number of Purchasing Document&lt;/P&gt;&lt;P&gt;        etenr    "Delivery Schedule Line Counter&lt;/P&gt;&lt;P&gt;        eindt    "Item delivery date&lt;/P&gt;&lt;P&gt;          into table it_eket&lt;/P&gt;&lt;P&gt;          from eket&lt;/P&gt;&lt;P&gt;          for all entries in it_ekpo&lt;/P&gt;&lt;P&gt;          where ebeln = it_ekpo-ebeln and&lt;/P&gt;&lt;P&gt;                ebelp = it_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--checking for sy-subrc&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e004.   "delivery date doesn't exists&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;sort it_eket by ebeln ebelp.&lt;/P&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;*&amp;amp;-------populate it_podetail&lt;/P&gt;&lt;P&gt;loop at it_ekpo into wa_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_podetail-ebeln = wa_ekpo-ebeln.&lt;/P&gt;&lt;P&gt;wa_podetail-ebelp = wa_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;wa_podetail-txz01 = wa_ekpo-txz01.&lt;/P&gt;&lt;P&gt;wa_podetail-ematn = wa_ekpo-ematn.&lt;/P&gt;&lt;P&gt;wa_podetail-menge = wa_ekpo-menge.&lt;/P&gt;&lt;P&gt;wa_podetail-netpr = wa_ekpo-netpr.&lt;/P&gt;&lt;P&gt;wa_podetail-pstyp = wa_ekpo-pstyp.&lt;/P&gt;&lt;P&gt;wa_podetail-knttp = wa_ekpo-knttp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_eket into wa_eket with key ebeln = wa_ekpo-ebeln&lt;/P&gt;&lt;P&gt;                                         ebelp = wa_ekpo-ebelp&lt;/P&gt;&lt;P&gt;                                         binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_podetail-eindt = wa_eket-eindt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_podetail to it_podetail.&lt;/P&gt;&lt;P&gt;clear wa_podetail.&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;endform.                    " fetch_detail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0101  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module status_0101 output.&lt;/P&gt;&lt;P&gt;  set pf-status 'MENU_ALV_OOPS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " STATUS_0101  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  SET_ALV  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module set_alv output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---setting the pf-status&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;  when 'BCK1'.&lt;/P&gt;&lt;P&gt;     leave screen.&lt;/P&gt;&lt;P&gt;  when 'EXT1'.&lt;/P&gt;&lt;P&gt;    leave program.&lt;/P&gt;&lt;P&gt;  when others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--declaring astructure of type t_podetail&lt;/P&gt;&lt;P&gt;data : it_podetail1 type standard table of type_podetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---if tree is empty&lt;/P&gt;&lt;P&gt;if tree2 is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_tree_container_name = 'TREE2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--sy-batch means program is running at back ground&lt;/P&gt;&lt;P&gt;if sy-batch is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----creating the object for the custom_container&lt;/P&gt;&lt;P&gt;create object custom_container&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    container_name              = l_tree_container_name&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    cntl_error                  = 1&lt;/P&gt;&lt;P&gt;    cntl_system_error           = 2&lt;/P&gt;&lt;P&gt;    create_error                = 3&lt;/P&gt;&lt;P&gt;    lifetime_error              = 4&lt;/P&gt;&lt;P&gt;    lifetime_dynpro_dynpro_link = 5&lt;/P&gt;&lt;P&gt;    others                      = 6&lt;/P&gt;&lt;P&gt;    .&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;*&amp;amp;-----creating the object tree2&lt;/P&gt;&lt;P&gt;create object tree2&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    parent                      = custom_container&lt;/P&gt;&lt;P&gt;    node_selection_mode         =&lt;/P&gt;&lt;P&gt;    cl_gui_column_tree=&amp;gt;node_sel_mode_single&lt;/P&gt;&lt;P&gt;    item_selection              = 'X'&lt;/P&gt;&lt;P&gt;    no_toolbar                  = ' '&lt;/P&gt;&lt;P&gt;    no_html_header              = ' '&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    cntl_error                  = 1&lt;/P&gt;&lt;P&gt;    cntl_system_error           = 2&lt;/P&gt;&lt;P&gt;    create_error                = 3&lt;/P&gt;&lt;P&gt;    lifetime_error              = 4&lt;/P&gt;&lt;P&gt;    illegal_node_selection_mode = 5&lt;/P&gt;&lt;P&gt;    failed                      = 6&lt;/P&gt;&lt;P&gt;    illegal_column_name         = 7&lt;/P&gt;&lt;P&gt;    others                      = 8&lt;/P&gt;&lt;P&gt;    .&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;*&amp;amp;---perofrm for hiraechy&lt;/P&gt;&lt;P&gt;  perform build_hierarchy_header changing l_hierarchy_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---perform for html-header&lt;/P&gt;&lt;P&gt;perform build_comment using lt_list_commentary&lt;/P&gt;&lt;P&gt;                            l_logo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---perform for field catalog.&lt;/P&gt;&lt;P&gt;perform field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----calling the function to print data&lt;/P&gt;&lt;P&gt;call method tree2-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    is_hierarchy_header  = l_hierarchy_header&lt;/P&gt;&lt;P&gt;    it_list_commentary   = lt_list_commentary&lt;/P&gt;&lt;P&gt;    i_logo               = l_logo&lt;/P&gt;&lt;P&gt;  changing&lt;/P&gt;&lt;P&gt;    it_outtab            = it_podetail1[]&lt;/P&gt;&lt;P&gt;    it_fieldcatalog      = it_fieldcatalog2[]&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---create the hirarchy&lt;/P&gt;&lt;P&gt;perform create_hierarchy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---calling the method frontend_method.&lt;/P&gt;&lt;P&gt;call method tree2-&amp;gt;frontend_update.&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;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " SET_ALV  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  build_comment&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_LT_LIST_COMMENTARY  text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_L_LOGO  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_comment  using    p_lt_list_commentary type slis_t_listheader&lt;/P&gt;&lt;P&gt;                             p_l_logo type sdydo_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--list heading line type 'H'.&lt;/P&gt;&lt;P&gt;  clear ls_line.&lt;/P&gt;&lt;P&gt;  ls_line-typ  = 'H'.&lt;/P&gt;&lt;P&gt;  ls_line-info = 'rapidigm-fujitsu'.&lt;/P&gt;&lt;P&gt;  append ls_line to p_lt_list_commentary.&lt;/P&gt;&lt;P&gt;  clear ls_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--list status line type 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-typ  = 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-key = 'PO DOCUMENT NO:'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; concatenate s_ebeln-low ' TO ' s_ebeln-high into ls_line-info&lt;/P&gt;&lt;P&gt; separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append ls_line to p_lt_list_commentary.&lt;/P&gt;&lt;P&gt;  clear ls_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--list status line type 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-typ  = 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-key = 'CREATION DATE:'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; write s_aedat-low to gd_date1 mm/dd/yyyy.&lt;/P&gt;&lt;P&gt; write s_aedat-high to gd_date2 mm/dd/yyyy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate gd_date1 ' TO ' gd_date2 into ls_line-info&lt;/P&gt;&lt;P&gt;  separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append ls_line to p_lt_list_commentary.&lt;/P&gt;&lt;P&gt;  clear ls_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--list status line type 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-typ  = 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-key = 'PURCHASING ORGANIZATION:'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate s_ekorg-low ' TO ' s_ekorg-high into ls_line-info&lt;/P&gt;&lt;P&gt;  separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append ls_line to p_lt_list_commentary.&lt;/P&gt;&lt;P&gt;  clear ls_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--list status line type 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-typ  = 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-key = 'COMPANY CODE:'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate s_bukrs-low ' TO ' s_bukrs-high into ls_line-info&lt;/P&gt;&lt;P&gt;  separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append ls_line to p_lt_list_commentary.&lt;/P&gt;&lt;P&gt;  clear ls_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--list status line type 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-typ  = 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-key = 'DATE:'.&lt;/P&gt;&lt;P&gt;  ls_line-info = sy-datum.&lt;/P&gt;&lt;P&gt;  append ls_line to p_lt_list_commentary.&lt;/P&gt;&lt;P&gt;  clear ls_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--logo&lt;/P&gt;&lt;P&gt; p_l_logo = 'ENJOYSAP_LOGO'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " build_comment&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  field_catalog&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form field_catalog .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2 .&lt;/P&gt;&lt;P&gt;refresh  it_fieldcatalog2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD EBELN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 1.  "position of the column&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'EBELN'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKPO'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 10.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'PO DOC NO'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD EBELP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 2.  "position of the columnt&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'EBELP'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKPO'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 10.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'ITEM NO'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD KNTTP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 3.  "position of the column&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'KNTTP'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKPO'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 10.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'Acc assig cat'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD PSTYP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 4.  "position of the column&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'PSTYP'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKPO'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 10.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'Item cat in pur doc'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD EMATN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 5.  "position of the column&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'EMATN'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKPO'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 18.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'Material number'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD TXZ01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 6.  "position of the column&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'TXZ01'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKPO'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 40.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'Short text'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD MENGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 7.  "position of the column&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'MENGE'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKPO'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 13.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'PO QTY'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD EINDT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 8.  "position of the column&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'EINDT'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKET'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 18.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'Item delivery date'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;-POPULATING THE FIELD NETPR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-col_pos = 9.  "position of the column&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-fieldname = 'NETPR'. "field name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-tabname = 'IT_podetail'.    "INTERNAL table name&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-ref_table = 'EKPO'.     "FOR REFERENCE&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-outputlen = 11.  "output length of the field.&lt;/P&gt;&lt;P&gt;wa_fieldcatalog2-scrtext_l = 'Net price'.&lt;/P&gt;&lt;P&gt;"long key word&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_fieldcatalog2 to it_fieldcatalog2.&lt;/P&gt;&lt;P&gt;clear wa_fieldcatalog2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " field_catalog&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  build_hierarchy_header&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_L_HIERARCHY_HEADER  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_hierarchy_header  changing p_l_hierarchy_header type&lt;/P&gt;&lt;P&gt;treev_hhdr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  p_l_hierarchy_header-heading = 'Hierarchy Header'.&lt;/P&gt;&lt;P&gt;  p_l_hierarchy_header-tooltip =&lt;/P&gt;&lt;P&gt;                         'This is the Hierarchy Header !'.&lt;/P&gt;&lt;P&gt;  p_l_hierarchy_header-width = 30.&lt;/P&gt;&lt;P&gt;  p_l_hierarchy_header-width_pix = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " build_hierarchy_header&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  create_hierarchy&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form create_hierarchy .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---data declaration&lt;/P&gt;&lt;P&gt; data : l_ebeln_key type lvc_nkey,&lt;/P&gt;&lt;P&gt;        l_ebelp_key type lvc_nkey ,&lt;/P&gt;&lt;P&gt;        l_eindt_key type lvc_nkey.          "#EC NEEDED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : wa_detail type type_podetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--sorting the it_podetail&lt;/P&gt;&lt;P&gt;sort it_podetail by ebeln ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_podetail into wa_podetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---for every ebeln&lt;/P&gt;&lt;P&gt;    at new ebeln.&lt;/P&gt;&lt;P&gt;    read table it_podetail into wa_detail with key ebeln =&lt;/P&gt;&lt;P&gt;    wa_podetail-ebeln.&lt;/P&gt;&lt;P&gt;            if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            call method tree2-&amp;gt;add_node&lt;/P&gt;&lt;P&gt;              exporting&lt;/P&gt;&lt;P&gt;                i_relat_node_key     = ' '&lt;/P&gt;&lt;P&gt;                i_relationship       =&lt;/P&gt;&lt;P&gt;                cl_gui_column_tree=&amp;gt;relat_last_child&lt;/P&gt;&lt;P&gt;                "here it comes like folder&lt;/P&gt;&lt;P&gt;                is_outtab_line       = wa_detail&lt;/P&gt;&lt;P&gt;                "it takes for every new ebeln&lt;/P&gt;&lt;P&gt;                i_node_text          =  'PO NO'&lt;/P&gt;&lt;P&gt;              importing&lt;/P&gt;&lt;P&gt;                e_new_node_key       = l_ebeln_key&lt;/P&gt;&lt;P&gt;                "it returns the child ie., next node&lt;/P&gt;&lt;P&gt;              exceptions&lt;/P&gt;&lt;P&gt;                relat_node_not_found = 1&lt;/P&gt;&lt;P&gt;                node_not_found       = 2&lt;/P&gt;&lt;P&gt;                others               = 3&lt;/P&gt;&lt;P&gt;                    .&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;    endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---for every ebelp&lt;/P&gt;&lt;P&gt;    at new ebelp.&lt;/P&gt;&lt;P&gt;    clear wa_detail.&lt;/P&gt;&lt;P&gt;    read table it_podetail into wa_detail with key ebeln =&lt;/P&gt;&lt;P&gt;    wa_podetail-ebeln&lt;/P&gt;&lt;P&gt;                                                   ebelp =&lt;/P&gt;&lt;P&gt;                                                   wa_podetail-ebelp&lt;/P&gt;&lt;P&gt;                                                   binary search.&lt;/P&gt;&lt;P&gt;            if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            call method tree2-&amp;gt;add_node&lt;/P&gt;&lt;P&gt;              exporting&lt;/P&gt;&lt;P&gt;                i_relat_node_key     = l_ebeln_key&lt;/P&gt;&lt;P&gt;                i_relationship       =&lt;/P&gt;&lt;P&gt;                cl_gui_column_tree=&amp;gt;relat_last_child&lt;/P&gt;&lt;P&gt;                "here it comes like folder&lt;/P&gt;&lt;P&gt;                is_outtab_line       = wa_detail&lt;/P&gt;&lt;P&gt;                "it takes for every new ebelP&lt;/P&gt;&lt;P&gt;                i_node_text          =  'ITEM'&lt;/P&gt;&lt;P&gt;              importing&lt;/P&gt;&lt;P&gt;                e_new_node_key       = l_ebelp_key&lt;/P&gt;&lt;P&gt;                "it returns the child ie., next node&lt;/P&gt;&lt;P&gt;              exceptions&lt;/P&gt;&lt;P&gt;                relat_node_not_found = 1&lt;/P&gt;&lt;P&gt;                node_not_found       = 2&lt;/P&gt;&lt;P&gt;                others               = 3&lt;/P&gt;&lt;P&gt;                    .&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;            endif.&lt;/P&gt;&lt;P&gt;    endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---for eindt&lt;/P&gt;&lt;P&gt;clear wa_detail.&lt;/P&gt;&lt;P&gt;read table it_podetail into wa_detail with key ebeln = wa_podetail-ebeln&lt;/P&gt;&lt;P&gt;                                               ebelp = wa_podetail-ebelp&lt;/P&gt;&lt;P&gt;                                               binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            call method tree2-&amp;gt;add_node&lt;/P&gt;&lt;P&gt;              exporting&lt;/P&gt;&lt;P&gt;                i_relat_node_key     = l_ebelp_key&lt;/P&gt;&lt;P&gt;                i_relationship       =&lt;/P&gt;&lt;P&gt;                cl_gui_column_tree=&amp;gt;relat_last_child&lt;/P&gt;&lt;P&gt;                "here it comes like folder&lt;/P&gt;&lt;P&gt;                is_outtab_line       = wa_detail&lt;/P&gt;&lt;P&gt;                "it takes for every new ebeln&lt;/P&gt;&lt;P&gt;                i_node_text          =  'DATE'&lt;/P&gt;&lt;P&gt;              importing&lt;/P&gt;&lt;P&gt;                e_new_node_key       = l_eindt_key       "#EC NEEDED&lt;/P&gt;&lt;P&gt;                "it returns the child ie next node&lt;/P&gt;&lt;P&gt;              exceptions&lt;/P&gt;&lt;P&gt;                relat_node_not_found = 1&lt;/P&gt;&lt;P&gt;                node_not_found       = 2&lt;/P&gt;&lt;P&gt;                others               = 3&lt;/P&gt;&lt;P&gt;                    .&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; clear wa_detail.&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;endform.                    " create_hierarchy&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hierachial Sequential ALV:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  z_alv_hierachial_sequential no standard page heading line-count 200 line-size 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Type Group&lt;/P&gt;&lt;P&gt;type-pools : slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Tables&lt;/P&gt;&lt;P&gt;tables : vbak , vbap.&lt;/P&gt;&lt;P&gt;*&amp;amp;--Types&lt;/P&gt;&lt;P&gt;types : begin of type_vbak,&lt;/P&gt;&lt;P&gt;        vbeln type vbak-vbeln,&lt;/P&gt;&lt;P&gt;        erdat type vbak-erdat,&lt;/P&gt;&lt;P&gt;        netwr type vbak-netwr,&lt;/P&gt;&lt;P&gt;        kunnr type vbak-kunnr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end of type_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of type_vbap,&lt;/P&gt;&lt;P&gt;        vbeln type vbap-vbeln,&lt;/P&gt;&lt;P&gt;        posnr type vbap-posnr,&lt;/P&gt;&lt;P&gt;        matnr type vbap-matnr,&lt;/P&gt;&lt;P&gt;        arktx type vbap-arktx,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end of type_vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Internal Tables&lt;/P&gt;&lt;P&gt;data : it_vbak type standard table of type_vbak,&lt;/P&gt;&lt;P&gt;       it_vbap type standard table of type_vbap,&lt;/P&gt;&lt;P&gt;       it_fcat type slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Work Areas&lt;/P&gt;&lt;P&gt;data : wa_vbak type type_vbak,&lt;/P&gt;&lt;P&gt;       wa_vbap type type_vbap,&lt;/P&gt;&lt;P&gt;       wa_fcat type slis_fieldcat_alv,&lt;/P&gt;&lt;P&gt;       wa_keyinfo type slis_keyinfo_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Variables&lt;/P&gt;&lt;P&gt;data : v_kunnr type kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Selection Screen&lt;/P&gt;&lt;P&gt;selection-screen begin of block bl1 with frame title text-001.&lt;/P&gt;&lt;P&gt;select-options : s_kunnr for v_kunnr.&lt;/P&gt;&lt;P&gt;selection-screen end of block bl1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Main Logic&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Fetch vbak&lt;/P&gt;&lt;P&gt;select vbeln erdat netwr kunnr into table it_vbak&lt;/P&gt;&lt;P&gt;                               from vbak&lt;/P&gt;&lt;P&gt;                               where kunnr in s_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_vbak by vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Fetch vbap&lt;/P&gt;&lt;P&gt;select vbeln posnr matnr arktx into table it_vbap&lt;/P&gt;&lt;P&gt;                               from vbap&lt;/P&gt;&lt;P&gt;                               for all entries in it_vbak&lt;/P&gt;&lt;P&gt;                               where vbeln = it_vbak-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_vbap by vbeln posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---Field Catalog for vbak&lt;/P&gt;&lt;P&gt;wa_fcat-col_pos = 1.&lt;/P&gt;&lt;P&gt;wa_fcat-fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;wa_fcat-tabname = 'IT_VBAK'.&lt;/P&gt;&lt;P&gt;wa_fcat-seltext_m = 'Order No'.&lt;/P&gt;&lt;P&gt;append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt;clear wa_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fcat-col_pos = 2.&lt;/P&gt;&lt;P&gt;wa_fcat-fieldname = 'ERDAT'.&lt;/P&gt;&lt;P&gt;wa_fcat-tabname = 'IT_VBAK'.&lt;/P&gt;&lt;P&gt;wa_fcat-seltext_m = 'Order Date'.&lt;/P&gt;&lt;P&gt;append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt;clear wa_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fcat-col_pos = 3.&lt;/P&gt;&lt;P&gt;wa_fcat-fieldname = 'NETWR'.&lt;/P&gt;&lt;P&gt;wa_fcat-tabname = 'IT_VBAK'.&lt;/P&gt;&lt;P&gt;wa_fcat-seltext_m = 'Order Value'.&lt;/P&gt;&lt;P&gt;append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt;clear wa_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fcat-col_pos = 4.&lt;/P&gt;&lt;P&gt;wa_fcat-fieldname = 'KUNNR'.&lt;/P&gt;&lt;P&gt;wa_fcat-tabname = 'IT_VBAK'.&lt;/P&gt;&lt;P&gt;wa_fcat-seltext_m = 'Customer No'.&lt;/P&gt;&lt;P&gt;append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt;clear wa_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;---Field Catalog for VBAP&lt;/P&gt;&lt;P&gt;wa_fcat-col_pos = 1.&lt;/P&gt;&lt;P&gt;wa_fcat-fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;wa_fcat-tabname = 'IT_VBAP'.&lt;/P&gt;&lt;P&gt;wa_fcat-seltext_m = 'Order No'.&lt;/P&gt;&lt;P&gt;append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt;clear wa_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fcat-col_pos = 2.&lt;/P&gt;&lt;P&gt;wa_fcat-fieldname = 'POSNR'.&lt;/P&gt;&lt;P&gt;wa_fcat-tabname = 'IT_VBAP'.&lt;/P&gt;&lt;P&gt;wa_fcat-seltext_m = 'Item No'.&lt;/P&gt;&lt;P&gt;append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt;clear wa_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fcat-col_pos = 3.&lt;/P&gt;&lt;P&gt;wa_fcat-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;wa_fcat-tabname = 'IT_VBAP'.&lt;/P&gt;&lt;P&gt;wa_fcat-seltext_m = 'Material No'.&lt;/P&gt;&lt;P&gt;append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt;clear wa_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fcat-col_pos = 4.&lt;/P&gt;&lt;P&gt;wa_fcat-fieldname = 'ARKTX'.&lt;/P&gt;&lt;P&gt;wa_fcat-tabname = 'IT_VBAP'.&lt;/P&gt;&lt;P&gt;wa_fcat-seltext_m = 'Material Description'.&lt;/P&gt;&lt;P&gt;append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt;clear wa_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Key Information&lt;/P&gt;&lt;P&gt;wa_keyinfo-header01 = 'VBELN'.&lt;/P&gt;&lt;P&gt;wa_keyinfo-item01 = 'VBELN'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;--Function Module&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_INTERFACE_CHECK              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_PROGRAM             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_PF_STATUS_SET       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_USER_COMMAND        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_LAYOUT                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   it_fieldcat                    = it_fcat&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EXCLUDING                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_SPECIAL_GROUPS              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_SORT                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_FILTER                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_SEL_HIDE                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_START_COLUMN          = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_START_LINE            = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_END_COLUMN            = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_END_LINE              = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_DEFAULT                      = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SAVE                         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_VARIANT                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EVENTS                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EVENT_EXIT                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    i_tabname_header               = 'IT_VBAK'&lt;/P&gt;&lt;P&gt;    i_tabname_item                 = 'IT_VBAP'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_STRUCTURE_NAME_HEADER        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_STRUCTURE_NAME_ITEM          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    is_keyinfo                     = wa_keyinfo&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_PRINT                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_REPREP_ID                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BYPASSING_BUFFER             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BUFFER_ACTIVE                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IR_SALV_HIERSEQ_ADAPTER        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EXCEPT_QINFO                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  E_EXIT_CAUSED_BY_CALLER        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ES_EXIT_CAUSED_BY_USER         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    t_outtab_header                = it_vbak&lt;/P&gt;&lt;P&gt;    t_outtab_item                  = it_vbap&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_ERROR                  = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                         = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&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;  &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;Deepthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 06:43:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372102#M1040340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T06:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372103#M1040341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepthi ,&lt;/P&gt;&lt;P&gt;i want this in ABAP only not in OOPS plz send that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 06:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372103#M1040341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T06:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372104#M1040342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Hierarchical sequential list: function module&lt;/P&gt;&lt;P&gt;                                'REUSE_ALV_HIERSEQ_LIST_DISPLAY'.for more information visit the link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saptechies.com/alv-faq--general-information/.Hope" target="test_blank"&gt;http://www.saptechies.com/alv-faq--general-information/.Hope&lt;/A&gt; this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 07:06:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372104#M1040342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T07:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372105#M1040343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- for hierarchical sequential tables (class CL_SALV_HIERSEQ_TABLE)&lt;/P&gt;&lt;P&gt;- for tree structures (class CL_SALV_TREE)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 07:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372105#M1040343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T07:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372106#M1040344</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;Please go through this code . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: VBAK,VBAP.

TYPE-POOLS: slis.

TYPES:BEGIN OF TY_VBAK,
        vbeln TYPE VBAK-vbeln,
        expand,
      END OF TY_VBAK,

      BEGIN OF TY_VBAP,
        vbeln TYPE vbeln,
        posnr TYPE posnr,
        matnr TYPE matnr,
        netpr TYPE netpr,
      END OF TY_VBAP.
DATA:IT_VBAK TYPE TABLE OF TY_VBAK,
     WA_VBAK TYPE  TY_VBAK,

     IT_VBAP TYPE TABLE OF TY_VBAP,
     WA_VBAP TYPE  TY_VBAP.

DATA: IT_VBAP_fieldcat TYPE slis_t_fieldcat_alv,
      WA_VBAP_fieldcat TYPE slis_fieldcat_alv.

DATA: s_layout TYPE slis_layout_alv.

DATA: s_keyinfo TYPE slis_keyinfo_alv.

*INITIALIZATION
INITIALIZATION.
  s_layout-subtotals_text = 'SUBTOTAL TEXT'.
  s_layout-key_hotspot = 'X'.
  s_layout-expand_fieldname = 'EXPAND'.

  s_keyinfo-header01 = 'VBELN'.
  s_keyinfo-item01   = 'VBELN'.

*START OF SELECTION
START-OF-SELECTION.

  PERFORM FIELDCATALOG.

  SELECT vbeln  FROM vbak
                      INTO TABLE IT_VBAK
                      UP TO 25 ROWS.

  IF NOT IT_VBAK  IS INITIAL.

    SELECT vbeln
           posnr
           matnr
           netpr  FROM vbaP
                  INTO TABLE IT_VBAP
                  FOR ALL ENTRIES IN IT_VBAK
                  WHERE vbeln = IT_VBAK-vbeln.
  ENDIF.
  CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM             =  SY-REPID
      IS_LAYOUT                      =  s_layout
      IT_FIELDCAT                    =  IT_VBAP_fieldcat
      I_TABNAME_HEADER               =  'IT_VBAK'
      I_TABNAME_ITEM                 =  'IT_VBAP'
      IS_KEYINFO                     =   s_keyinfo
   TABLES
      T_OUTTAB_HEADER                = IT_VBAK
      T_OUTTAB_ITEM                  = IT_VBAP
   EXCEPTIONS
     PROGRAM_ERROR                  = 1
     OTHERS                         = 2
            .

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  FIELDCATALOG
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM FIELDCATALOG.
  WA_VBAP_fieldcat-col_pos   = '1'.
  WA_VBAP_fieldcat-fieldname = 'VBELN'.
  WA_VBAP_fieldcat-tabname   = 'IT_VBAK'.
  WA_VBAP_fieldcat-rollname  = 'VBELN'.
  WA_VBAP_fieldcat-outputlen = '12'.
  APPEND WA_VBAP_fieldcat TO IT_VBAP_fieldcat.
  CLEAR: WA_VBAP_fieldcat.

  WA_VBAP_fieldcat-col_pos   = '1'.
  WA_VBAP_fieldcat-fieldname = 'VBELN'.
  WA_VBAP_fieldcat-tabname   = 'IT_VBAP'.
  WA_VBAP_fieldcat-rollname  = 'VBELN'.
  WA_VBAP_fieldcat-outputlen = '12'.
  APPEND WA_VBAP_fieldcat TO IT_VBAP_fieldcat.
  CLEAR: WA_VBAP_fieldcat.

  WA_VBAP_fieldcat-col_pos   = '2'.
  WA_VBAP_fieldcat-fieldname = 'POSNR'.
  WA_VBAP_fieldcat-tabname   = 'IT_VBAP'.
  WA_VBAP_fieldcat-rollname  = 'POSNR'.
  APPEND WA_VBAP_fieldcat TO IT_VBAP_fieldcat.
  CLEAR: WA_VBAP_fieldcat.

  WA_VBAP_fieldcat-col_pos   = '3'.
  WA_VBAP_fieldcat-fieldname = 'MATNR'.
  WA_VBAP_fieldcat-tabname   = 'IT_VBAP'.
  WA_VBAP_fieldcat-rollname  = 'MATNR'.
  APPEND WA_VBAP_fieldcat TO IT_VBAP_fieldcat.
  CLEAR: WA_VBAP_fieldcat.

  WA_VBAP_fieldcat-col_pos   = '4'.
  WA_VBAP_fieldcat-fieldname = 'NETPR'.
  WA_VBAP_fieldcat-tabname   = 'IT_VBAP'.
  WA_VBAP_fieldcat-rollname  = 'NETPR'.
  WA_VBAP_fieldcat-do_sum    = 'X'.
  APPEND WA_VBAP_fieldcat TO IT_VBAP_fieldcat.
  CLEAR: WA_VBAP_fieldcat.
ENDFORM.                    "FIELDCATALOG&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 07:21:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372106#M1040344</guid>
      <dc:creator>praveen_kumar132</dc:creator>
      <dc:date>2008-09-02T07:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372107#M1040345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;your answer is some what helpful  but actually my requirement is i want to display in tree format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 07:26:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4372107#M1040345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T07:26:22Z</dc:date>
    </item>
  </channel>
</rss>

