<?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 push button in ooalv in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835465#M1317144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want a push button in containar. is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first i have placed the container and named it . then i clicked on push button and trying to place it on container , but it is not allowing to place on it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have written a toolbar event , once the push button is clicked , then i want to handle it. But i am unable to put the pushbutton on the screen while doing ooalv .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please tell me how to place the push button .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Jun 2009 11:09:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-20T11:09:25Z</dc:date>
    <item>
      <title>push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835465#M1317144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want a push button in containar. is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first i have placed the container and named it . then i clicked on push button and trying to place it on container , but it is not allowing to place on it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have written a toolbar event , once the push button is clicked , then i want to handle it. But i am unable to put the pushbutton on the screen while doing ooalv .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please tell me how to place the push button .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2009 11:09:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835465#M1317144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-20T11:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835466#M1317145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You will not be able to place the push button on the container.&lt;/P&gt;&lt;P&gt;Incase you want a push button on the tool bar of the ALV then refer to the program &lt;/P&gt;&lt;P&gt;BCALV_TEST_GRID_TOOLBAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2009 11:11:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835466#M1317145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-20T11:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835467#M1317146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SORRY I AM TRYING TO ARRANGE MY CODE BUT I AM NOT ABLE TO ARRANGE IT PROPERLY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have placed a push both ITEM and if i click it will fetch the item details of purchase order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i click the ITEM ,the details are displayed on the grid. Here the ITEM button is still comming, &lt;/P&gt;&lt;P&gt;I dont want this button to appear also i dont want to dislay the toolbar when i click the ITEM button .Please tell me where i need to change the code.&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;PRE&gt;&lt;CODE&gt;REPORT  zdemo_ooalv_user_command                .

DATA : o_container TYPE REF TO cl_gui_custom_container,
       o_grid TYPE REF TO cl_gui_alv_grid.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;DATA : it_ekko LIKE TABLE OF ekko,&lt;/P&gt;&lt;P&gt;wa_ekko LIKE ekko,&lt;/P&gt;&lt;P&gt;it_ekpo LIKE TABLE OF ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : wa_layout TYPE lvc_s_layo.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;CLASS lcl_event_handler DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    METHODS : handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;               IMPORTING e_object e_interactive,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              handle_user_command FOR EVENT user_command OF&lt;/P&gt;&lt;P&gt;              cl_gui_alv_grid IMPORTING e_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "lcl_event_handler DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_event_handler IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD : handle_toolbar.&lt;/P&gt;&lt;P&gt;    DATA : wa_toolbar TYPE stb_button.&lt;/P&gt;&lt;P&gt;    CLEAR wa_toolbar.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

    &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;wa_toolbar-function = 'ITEM'.&lt;/P&gt;&lt;P&gt;    wa_toolbar-icon = 'ICON_DETAIL'.&lt;/P&gt;&lt;P&gt;    wa_toolbar-text = 'PREVIOUS'.&lt;/P&gt;&lt;P&gt;    APPEND wa_toolbar TO e_object-&amp;gt;mt_toolbar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    ":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD handle_user_command.&lt;/P&gt;&lt;P&gt;    CASE e_ucomm.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      WHEN 'ITEM'.

        &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;SELECT * INTO TABLE&lt;/P&gt;&lt;P&gt;             it_ekpo FROM ekpo 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;        CALL METHOD o_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            i_structure_name = 'EKPO'&lt;/P&gt;&lt;P&gt;          CHANGING&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
            it_outtab        = it_ekpo.

    ENDCASE.
  ENDMETHOD.                    "handle_user_command
ENDCLASS.                    "lcl_event_handler IMPLEMENTATION




&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE read_data OUTPUT.&lt;/P&gt;&lt;P&gt;  SELECT * INTO TABLE it_ekko FROM ekko&lt;/P&gt;&lt;P&gt;  UP TO 10 ROWS.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " read_data  OUTPUT&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'ZSTATUS'.&lt;/P&gt;&lt;P&gt;  SET TITLEBAR 'Handle the toolbar events'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT o_container&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     PARENT                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      container_name              = 'CONTAINER'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

    CREATE OBJECT o_grid
      EXPORTING
*    I_SHELLSTYLE      = 0
*    I_LIFETIME        =
        i_parent          = o_container.

    IF sy-subrc = 0.
      wa_layout-sel_mode = 'D'.

      CALL METHOD o_grid-&amp;gt;set_table_for_first_display
  EXPORTING
    i_structure_name               =  'EKKO'
    is_layout                      = wa_layout
        CHANGING
          it_outtab                = it_ekko
              .
*CREATE an object for the event handler class
      DATA : o_handler TYPE REF TO lcl_event_handler.
      CREATE OBJECT:  o_handler.

*Regestring the events

      SET HANDLER : o_handler-&amp;gt;handle_toolbar FOR o_grid,
                     o_handler-&amp;gt;handle_user_command FOR o_grid.

*To trigger the toolbar event
      CALL METHOD o_grid-&amp;gt;set_toolbar_interactive.


    ENDIF.

  ENDIF.


ENDMODULE.                 " STATUS_0100  OUTPUT




MODULE user_command_0100 INPUT.

  CASE sy-ucomm.
    WHEN 'BACK'.

      LEAVE TO SCREEN 0.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 17:09:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835467#M1317146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T17:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835468#M1317147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt; METHOD handle_user_command. 
CASE e_ucomm. 
WHEN 'ITEM'. 
SELECT * INTO TABLE it_ekpo FROM ekpo 
FOR ALL ENTRIES IN it_ekko 
WHERE ebeln = it_ekko-ebeln. 

CALL METHOD o_grid-&amp;gt;set_table_for_first_display 
EXPORTING 
i_structure_name = 'EKPO' 
CHANGING
 it_outtab = it_ekpo. 
ENDCASE.
 ENDMETHOD. "handle_user_command ENDCLASS. "lcl_event_handler &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use o_grid-&amp;gt;set_screen_status method to remove the ITEM button and then handle it accordingly in the above code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: riki frisky on Jun 22, 2009 1:43 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: riki frisky on Jun 22, 2009 1:43 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 17:43:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835468#M1317147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T17:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835469#M1317148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any more suggestions please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 04:13:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835469#M1317148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-23T04:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835470#M1317149</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;You cannot place the Push Button on the Container. Instead you can place outside the container to get displayed on the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can have the push button on the ALV toolbar refer to this demo program BCALV_GRID_05&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 05:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835470#M1317149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-23T05:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835471#M1317150</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;go to se80..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in their u find &lt;STRONG&gt;BCALV_GRID_05&lt;/STRONG&gt; and &lt;STRONG&gt;BCALV_GRID_06&lt;/STRONG&gt; in the &lt;STRONG&gt;slis&lt;/STRONG&gt; package..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read these program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ritesh J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 05:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835471#M1317150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-23T05:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835472#M1317151</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:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*------
CLASS :lcl_event_receiver DEFINITION DEFERRED.
*------
CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.

*--&amp;gt;Method for User command
    METHODS :

    handle_toolbar      FOR EVENT toolbar         OF
                                          cl_gui_alv_grid
                                IMPORTING e_object e_interactive,

    handle_user_command FOR EVENT user_command    OF
                                          cl_gui_alv_grid
                                IMPORTING e_ucomm.

ENDCLASS.                    "lcl_event_receiver DEFINITION
*------
CLASS  lcl_event_receiver IMPLEMENTATION.

  METHOD handle_toolbar.

    DATA: ls_toolbar  TYPE stb_button.

* append a separator to normal toolbar
    CLEAR ls_toolbar.
    MOVE 3 TO ls_toolbar-butn_type.
    APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.
* append an icon to show booking table
    CLEAR ls_toolbar.
    MOVE 'DETAILS' TO ls_toolbar-function.
    MOVE icon_employee TO ls_toolbar-icon.
    MOVE 'Show Details'(111) TO ls_toolbar-quickinfo.
    MOVE 'Detail'(112) TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.

  ENDMETHOD.                    "handle_toolbar

*--&amp;gt;Handle user command
  METHOD handle_user_command.
    CASE e_ucomm.
      WHEN 'DETAILS'.

        DATA: lt_rows TYPE lvc_t_row,
              wa_rows LIKE LINE OF lt_rows.

        CALL METHOD z_grid-&amp;gt;get_selected_rows
          IMPORTING
            et_index_rows = lt_rows.
        CALL METHOD cl_gui_cfw=&amp;gt;flush.

        "your code as per your requirement to handle the user command
        "at DETAILS button

    ENDCASE.
  ENDMETHOD.                    "handle_user_command
ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
*------
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 05:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835472#M1317151</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-06-23T05:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: push button in ooalv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835473#M1317152</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 use the disabled functionality... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

      ls_styl-fieldname = 'ITEM'.
      ls_styl-style = cl_gui_alv_grid=&amp;gt;mc_style_disabled.
      APPEND ls_styl TO lt_styl.
      CLEAR ls_styl.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 06:10:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/push-button-in-ooalv/m-p/5835473#M1317152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-23T06:10:00Z</dc:date>
    </item>
  </channel>
</rss>

