<?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 Handling Multiple ALV Grids in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-multiple-alv-grids/m-p/4881244#M1140833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: do not post the same question in more than one forum.  Duplicate has been rejected&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have 3 ALV Grids in my reports done by using containers with CL_GUI_ALV_GRID....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each ALV Grid display a table....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each toolbar of the grid has a print button.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i have 2 questions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i) when a print button of a grid is pressed..how can i know the grid of which the print button is pressed...i.e. if grid one print button is pressed..then how can i know it is triggered from Grid one and likewise for grid  2 and grid 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im using same method for the event user_command for the three grids.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ii) WHen layout is changed for a particular ALV grid...i.e. if some columns are made hidden...then when print button is pressed..Then i need to print only the columns of changed layout.............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i know the columns of the changed layout..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Forbidden phrase removed&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advanceeee&lt;/P&gt;&lt;P&gt;Sai Santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Dec 15, 2008 3:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Dec 2008 12:34:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-15T12:34:31Z</dc:date>
    <item>
      <title>Handling Multiple ALV Grids</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-multiple-alv-grids/m-p/4881244#M1140833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: do not post the same question in more than one forum.  Duplicate has been rejected&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have 3 ALV Grids in my reports done by using containers with CL_GUI_ALV_GRID....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each ALV Grid display a table....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each toolbar of the grid has a print button.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i have 2 questions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i) when a print button of a grid is pressed..how can i know the grid of which the print button is pressed...i.e. if grid one print button is pressed..then how can i know it is triggered from Grid one and likewise for grid  2 and grid 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im using same method for the event user_command for the three grids.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ii) WHen layout is changed for a particular ALV grid...i.e. if some columns are made hidden...then when print button is pressed..Then i need to print only the columns of changed layout.............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i know the columns of the changed layout..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Forbidden phrase removed&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advanceeee&lt;/P&gt;&lt;P&gt;Sai Santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Dec 15, 2008 3:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 12:34:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-multiple-alv-grids/m-p/4881244#M1140833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-15T12:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Multiple ALV Grids</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-multiple-alv-grids/m-p/4881245#M1140834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1 - In local class definition, use the [SENDER|http://help.sap.com/saphelp_nw04s/helpdata/en/71/a8a77955bc11d194aa0000e8353423/frameset.htm] parameter of the event you manage.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS:
      handle_double_click
        FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING e_row e_column sender.
  PRIVATE SECTION.
ENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then in the implemented method check the value, or use the object sender like any alv grid object.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS lcl_event_receiver IMPLEMENTATION.
  METHOD handle_double_click.
    CASE sender.
      WHEN grid1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(Doc: [Event Handling|http://help.sap.com/saphelp_sm32/helpdata/EN/9b/d080b49fc111d2bd68080009b4534c/frameset.htm])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2-use the method [GET_FRONTEND_FIELDCATALOG|https://www.sdn.sap.com/irj/scn/advancedsearch?query=get_frontend_fieldcatalog&amp;amp;cat=sdn_all] of CL_GUI_ALV_GRID to get the curent layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 15:00:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-multiple-alv-grids/m-p/4881245#M1140834</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-12-15T15:00:14Z</dc:date>
    </item>
  </channel>
</rss>

