<?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: Group Lines Excel Function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/group-lines-excel-function/m-p/3394333#M815022</link>
    <description>&lt;P&gt;Try.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.linkedin.com/pulse/tree-alv-export-excel-row-groupingcoloring-mehmet-sertkaya" target="test_blank"&gt;https://www.linkedin.com/pulse/tree-alv-export-excel-row-groupingcoloring-mehmet-sertkaya&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jul 2020 15:21:05 GMT</pubDate>
    <dc:creator>former_member568687</dc:creator>
    <dc:date>2020-07-22T15:21:05Z</dc:date>
    <item>
      <title>Group Lines Excel Function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/group-lines-excel-function/m-p/3394331#M815020</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;I have an ALV Tree (cl_salv_tree) that's works fine.&lt;/P&gt;&lt;P&gt;But I need to export all data to excel.&lt;/P&gt;&lt;P&gt;I am using OLE objects to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know if is possible group lines into excel.&lt;/P&gt;&lt;P&gt;For example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Today works like this&lt;/P&gt;&lt;P&gt;Level1 -&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Value 1&lt;/P&gt;&lt;P&gt;---Level2 --- Value 2&lt;/P&gt;&lt;P&gt;---Level2 --- Value 2&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;Level3 - Value 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do this (compress the Leve2, for example)&lt;/P&gt;&lt;P&gt;+ Level1 -&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt; Value 1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;Level2 -&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Value 2&lt;/P&gt;&lt;P&gt;+---Level2 -&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt; Value 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 16:27:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/group-lines-excel-function/m-p/3394331#M815020</guid>
      <dc:creator>leandro_melari</dc:creator>
      <dc:date>2008-02-13T16:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Group Lines Excel Function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/group-lines-excel-function/m-p/3394332#M815021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be u can try this way. Instead of OLE&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
" Create a custom icon in the tree toolbar using the following 
  try.
      v_text2 = text-b02.        " download to excel

      grt_functions-&amp;gt;add_function(
        name     = 'DOWNLOAD'
        icon     = '@42@'
        tooltip  = v_text2
        position = if_salv_c_function_position=&amp;gt;right_of_salv_functions
).
    catch cx_salv_wrong_call cx_salv_existing.
  endtry.

" Make the events for the custom function

  data: lr_events type ref to cl_salv_events_tree.
  lr_events = grt_tree-&amp;gt;get_event( ).
  create object grt_events.

  set handler grt_events-&amp;gt;on_user_command for lr_events.
  set handler grt_events-&amp;gt;on_double_click for lr_events.
  set handler grt_events-&amp;gt;on_link_click for lr_events.
  set handler grt_events-&amp;gt;on_before_user_command for lr_events.
  set handler grt_events-&amp;gt;on_after_user_command for lr_events.
  set handler grt_events-&amp;gt;on_keypress for lr_events.
  try.
      lr_events-&amp;gt;add_key_for_keypress( if_salv_c_keys=&amp;gt;f4 ).
      lr_events-&amp;gt;add_key_for_keypress( if_salv_c_keys=&amp;gt;enter ).
    catch cx_salv_msg.
  endtry.

" Call the following function module 
" in the grt_events-&amp;gt;on_user_command method, after arranging 
" whichever format of your output table 

CALL FUNCTION 'ALV_XXL_CALL'
EXPORTING
i_tabname = 'I_OUT'
IS_LAYOUT = l_xxl_Layout
it_fieldcat = l_xxl_fieldcat
TABLES
it_outtab = it_out
EXCEPTIONS
fatal_error = 1
no_display_possible = 2
OTHERS = 3.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 16:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/group-lines-excel-function/m-p/3394332#M815021</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-02-13T16:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Group Lines Excel Function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/group-lines-excel-function/m-p/3394333#M815022</link>
      <description>&lt;P&gt;Try.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.linkedin.com/pulse/tree-alv-export-excel-row-groupingcoloring-mehmet-sertkaya" target="test_blank"&gt;https://www.linkedin.com/pulse/tree-alv-export-excel-row-groupingcoloring-mehmet-sertkaya&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 15:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/group-lines-excel-function/m-p/3394333#M815022</guid>
      <dc:creator>former_member568687</dc:creator>
      <dc:date>2020-07-22T15:21:05Z</dc:date>
    </item>
  </channel>
</rss>

