<?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: Classes in ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095758#M979427</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vaasu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Refer to the following link for sample code. &lt;/P&gt;&lt;P&gt;      &lt;A href="http://saptechnical.com/Tutorials/ALV/Interactive/oops.htm" target="test_blank"&gt;http://saptechnical.com/Tutorials/ALV/Interactive/oops.htm&lt;/A&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;Jaya Vani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2008 10:46:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-25T10:46:34Z</dc:date>
    <item>
      <title>Classes in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095755#M979424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am developing an oops alv , i need some help like in the output list if i select particular row and press a push button it has to do some operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any Method which captures the selected row by the user.&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;Srinu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 10:28:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095755#M979424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T10:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Classes in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095756#M979425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vaasu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the code below.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;GET_SELECTED_ROWS&lt;/STRONG&gt; method to get the selected row...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*----------------------------------------------------------------------*
*       CLASS lcl_event_handler DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_handler DEFINITION.
  PUBLIC SECTION.
    DATA: wa_toolbar   TYPE stb_button,
          utilities    TYPE REF   TO cl_gui_frontend_services.
    METHODS : toolbar_handle FOR EVENT toolbar      OF cl_gui_alv_grid
                                    IMPORTING e_object
                                              e_interactive,
              ucomm_handle   FOR EVENT user_command OF cl_gui_alv_grid
                                    IMPORTING e_ucomm.
ENDCLASS.                    "lcl_event_handler DEFINITION

*----------------------------------------------------------------------*
*       CLASS lcl_event_handler IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_handler IMPLEMENTATION.
  METHOD toolbar_handle.
    MOVE   3 TO  wa_toolbar-butn_type.
    APPEND wa_toolbar   TO e_object-&amp;gt;mt_toolbar.
    MOVE : 0            TO wa_toolbar-butn_type,
           '$PUSH'      TO wa_toolbar-function,
           '@0V@'       TO wa_toolbar-icon.
    APPEND wa_toolbar TO e_object-&amp;gt;mt_toolbar.
  ENDMETHOD. "toolbar_handle

  METHOD ucomm_handle.
    CHECK e_ucomm EQ '$PUSH'.
    PERFORM on_push_button_click.
  ENDMETHOD. "ucomm_handle
ENDCLASS.                    "lcl_event_handler IMPLEMENTATION

DATA : container    TYPE REF   TO cl_gui_custom_container,
       grid         TYPE REF   TO cl_gui_alv_grid,
       event        TYPE REF   TO lcl_event_handler,
       it_display   TYPE TABLE OF mara,
       wa_display   TYPE mara.

START-OF-SELECTION.

  CALL SCREEN 100.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'BASIC'.
  PERFORM build_it_display.
  PERFORM create_objects.


ENDMODULE.                 " STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_0100  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.

  CASE sy-ucomm.
    WHEN 'BACK'.
      SET SCREEN 0.
      LEAVE SCREEN.
    WHEN 'EXIT'.
      SET SCREEN 0.
      LEAVE SCREEN.
    WHEN 'CANC'.
      SET SCREEN 0.
      LEAVE SCREEN.
  ENDCASE.

ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  build_it_display
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM build_it_display .
  SELECT * FROM mara UP TO 15 ROWS INTO TABLE it_display.
ENDFORM.                    " build_it_display
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  create_objects
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM create_objects .
  IF container IS INITIAL.
    CREATE OBJECT container
    EXPORTING
      container_name     = 'CUSTOM'.
    CREATE OBJECT event.
    CREATE OBJECT grid
      EXPORTING
        i_parent         = container.
    SET HANDLER event-&amp;gt;toolbar_handle FOR grid.
    SET HANDLER event-&amp;gt;ucomm_handle   FOR grid.
    CALL METHOD grid-&amp;gt;set_table_for_first_display
      EXPORTING
        i_structure_name = 'MARA'
      CHANGING
        it_outtab        = it_display.
  ENDIF.
ENDFORM.                    " create_objects

*&amp;amp;--------------------------------------------------------------------*
*&amp;amp;      Form  on_push_button_click
*&amp;amp;--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
FORM on_push_button_click.
  BREAK-POINT.   " can be used to process the selected row
ENDFORM.                    "on_push_button_click&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Jose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 10:43:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095756#M979425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T10:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Classes in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095757#M979426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the link where you can get the complete programe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://abapreports.blogspot.com/2008/06/oops-alv-sample-interactive-report.html" target="test_blank"&gt;http://abapreports.blogspot.com/2008/06/oops-alv-sample-interactive-report.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this Method CALL METHOD W_GRID-&amp;gt;GET_CURRENT_CELL&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;Mohinder Singh Chauhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 10:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095757#M979426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T10:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Classes in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095758#M979427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vaasu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Refer to the following link for sample code. &lt;/P&gt;&lt;P&gt;      &lt;A href="http://saptechnical.com/Tutorials/ALV/Interactive/oops.htm" target="test_blank"&gt;http://saptechnical.com/Tutorials/ALV/Interactive/oops.htm&lt;/A&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;Jaya Vani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 10:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095758#M979427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T10:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Classes in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095759#M979428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;STRONG&gt;Former Member&lt;/STRONG&gt;&lt;SPAN class="j-post-author"&gt;, &lt;/SPAN&gt;&lt;SPAN class="hps"&gt;sent you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a links&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a good example&lt;/SPAN&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.teamabap.com/2013/02/alv-using-class/"&gt;http://www.teamabap.com/2013/02/alv-using-class/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://saptechnical.com/Tutorials/ALV/CustomTable/Page1.htm" title="http://saptechnical.com/Tutorials/ALV/CustomTable/Page1.htm"&gt;http://saptechnical.com/Tutorials/ALV/CustomTable/Page1.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 22:28:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classes-in-alv/m-p/4095759#M979428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-20T22:28:52Z</dc:date>
    </item>
  </channel>
</rss>

