<?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 context menu on tree structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794265#M1466408</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'm using the class CL_SALV_TREE inorder to show a screen like tree stucture..now i wanna add a context menu on that tree&lt;/P&gt;&lt;P&gt;structure..&lt;/P&gt;&lt;P&gt;is it possible to add a context menu.if so can u explain the steps how to do it?...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;poornima.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Apr 2010 10:02:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-15T10:02:13Z</dc:date>
    <item>
      <title>context menu on tree structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794265#M1466408</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'm using the class CL_SALV_TREE inorder to show a screen like tree stucture..now i wanna add a context menu on that tree&lt;/P&gt;&lt;P&gt;structure..&lt;/P&gt;&lt;P&gt;is it possible to add a context menu.if so can u explain the steps how to do it?...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;poornima.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 10:02:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794265#M1466408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-15T10:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: context menu on tree structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794266#M1466409</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;There is a demo program which can give you a good example as to how to implement the context menu. Have a look at it. &lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;SAPSIMPLE_TREE_CONTEXT_MEN_DEM&lt;/STRONG&gt; package - SEU_TREE_CONTROL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 03:59:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794266#M1466409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-16T03:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: context menu on tree structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794267#M1466410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks for ur reply..but the thing is the program which u gave was implemented using the class cl_gui_simple_tree ,so it contains &lt;/P&gt;&lt;P&gt;default context menu method..but in my program i'm using the class CL_SALV_TREE,CL_SALV_EVENTS_TREE..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is how come we can implement the context menu for this class which doesnt have default context menu method..&lt;/P&gt;&lt;P&gt;is it possible to intergate some other events..if it so plz tell me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Poornima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 04:12:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794267#M1466410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-16T04:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: context menu on tree structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794268#M1466411</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;Use CL_CTMENU for context menu. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use can also try CL_COLUMN_TREE_MODEL for creating tree structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 06:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794268#M1466411</guid>
      <dc:creator>former_member418469</dc:creator>
      <dc:date>2010-04-16T06:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: context menu on tree structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794269#M1466412</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;Can you have a look at this Demo Report Program : &lt;STRONG&gt;BCALV_TREE_03&lt;/STRONG&gt;. Package - &lt;STRONG&gt;SLIS&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 11:04:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794269#M1466412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T11:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: context menu on tree structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794270#M1466413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CL_SALV_TREE creates a Tree type reference to the class CL_SALV_GUI_TREE which is inherited from the class CL_GUI_ALV_TREE. So, to get the Context Menu on the tree created by the CL_SALV_TREE, you need to :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define Event Receiver class:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
class lcl_handle_events definition.
  public section.
      on_header_context_menu_req for EVENT header_context_menu_request of cl_gui_alv_tree  " &amp;lt;&amp;lt;
        IMPORTING FIELDNAME
                  menu.
endclass.                    "lcl_handle_events DEFINITION
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implement the class:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
class lcl_handle_events implementation.
  method on_header_context_menu_req.
*  Access the MENU object
  ENDMETHOD.
endclass.                    "lcl_handle_events IMPLEMENTATION
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, here is the trick. Set the Event Handler for ALL INSTANCE rather than setting it for the specific instance before calling the DISPLAY method.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    data: gr_events type ref to lcl_handle_events.

    SET HANDLER gr_events-&amp;gt;on_header_context_menu_req  FOR ALL INSTANCES . "mr_column_tree.

*... §5 display the table
    gr_tree-&amp;gt;display( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same way, you can try to trap the other Context Menu events like ITEM_CONTEXT_MENU_REQUEST, ITEM_CONTEXT_MENU_SELECTED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 13:22:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/context-menu-on-tree-structure/m-p/6794270#M1466413</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2010-04-20T13:22:51Z</dc:date>
    </item>
  </channel>
</rss>

