<?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: ALV code needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130460#M111547</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you seen these reports?&lt;/P&gt;&lt;P&gt;BCALV_GRID_05&lt;/P&gt;&lt;P&gt;BCALV_GRID_06&lt;/P&gt;&lt;P&gt;BCALV_GRID_07&lt;/P&gt;&lt;P&gt;BCALV_GRID_08&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;enzo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jan 2006 15:28:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-12T15:28:52Z</dc:date>
    <item>
      <title>ALV code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130459#M111546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can one tell me how to add menu in Oops concept Please post some examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Lisa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 15:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130459#M111546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T15:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALV code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130460#M111547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you seen these reports?&lt;/P&gt;&lt;P&gt;BCALV_GRID_05&lt;/P&gt;&lt;P&gt;BCALV_GRID_06&lt;/P&gt;&lt;P&gt;BCALV_GRID_07&lt;/P&gt;&lt;P&gt;BCALV_GRID_08&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;enzo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 15:28:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130460#M111547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T15:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: ALV code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130461#M111548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean setting your own pf-status or adding additional buttons to the standard ALV toolbar?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In OO ALV, you will use your screen and have a custom container to show the ALV grid. So in the PBO of that screen you can set the menu by using SET PF-STATUS 'MYMENU'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For adding additional buttons to the standard ALV toolbar, you have to do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*-- First declare the event receiver class 
*-- Class Definitions
*-- Class Definitions
CLASS lcl_event_receiver DEFINITION DEFERRED.

*---------------------------------------------------------------------*
*       CLASS LCL_EVENT_RECEIVER DEFINITION                           *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
CLASS lcl_event_receiver DEFINITION.

  PUBLIC SECTION.
    METHODS: add_button_to_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.
  PRIVATE SECTION.

ENDCLASS.                        " LCL_EVENT_RECEIVER DEFINITION

*-- Define the object for the event receiver
DATA: ler_add_button_to_toolbar TYPE REF TO lcl_event_receiver,
            ler_user_command          TYPE REF TO lcl_event_receiver.

*-- Class Implementations
*---------------------------------------------------------------------*
*       CLASS LCL_EVENT_RECEIVER IMPLEMENTATION                       *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
CLASS lcl_event_receiver IMPLEMENTATION.

  METHOD add_button_to_toolbar.
*-- Add the SAVE button to the grid toolbar
    PERFORM add_button_to_toolbar CHANGING e_object.
  ENDMETHOD.                    "add_button_to_toolbar

*-- Handle the User Commands
  METHOD handle_user_command.
    PERFORM user_command CHANGING e_ucomm.
  ENDMETHOD.                           "handle_button_click

ENDCLASS.                        " LCL_EVENT_RECEIVER IMPLEMENTATION

*-- Routines
*----------------------------------------------------------------------*
*       FORM  ADD_BUTTON_TO_TOOLBAR                                    *
*----------------------------------------------------------------------*
*       text                                                           *
*----------------------------------------------------------------------*
FORM add_button_to_toolbar CHANGING e_object TYPE REF TO cl_alv_event_toolbar_set.

  DATA: ls_toolbar  TYPE stb_button.

  CLEAR ls_toolbar.
  MOVE 3 TO ls_toolbar-butn_type.
  APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.
  CLEAR ls_toolbar.
  MOVE: 'SAVE'           TO ls_toolbar-function,
        icon_system_save TO ls_toolbar-icon,
       'Save Entries'    TO ls_toolbar-quickinfo,
       'Save'            TO ls_toolbar-text,
       ' '               TO ls_toolbar-disabled.
  APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.

ENDFORM.                      " ADD_BUTTON_TO_TOOLBAR

*----------------------------------------------------------------------*
*       Form  USER_COMMAND                                             *
*----------------------------------------------------------------------*
*       text                                                           *
*----------------------------------------------------------------------*
*      --&amp;gt;COMMAND    text                                              *
*----------------------------------------------------------------------*
FORM user_command CHANGING command LIKE sy-ucomm.

  CASE command.
    WHEN 'SAVE'.
    WHEN OTHERS.
  ENDCASE.

ENDFORM.                           " USER_COMMAND

*-- Then after your call to 'set_table_for_first_display' add the following code.

*-- Create the event handler for save
  CREATE OBJECT ler_add_button_to_toolbar.
  SET HANDLER ler_add_button_to_toolbar-&amp;gt;add_button_to_toolbar
          FOR lcl_alvgrid.
*-- Create the event handler for user command
  CREATE OBJECT ler_user_command.
  SET HANDLER ler_user_command-&amp;gt;handle_user_command
          FOR lcl_alvgrid.
* § 4.Call method 'set_toolbar_interactive' to raise event TOOLBAR.
  CALL METHOD lcl_alvgrid-&amp;gt;set_toolbar_interactive.
&lt;/CODE&gt;&lt;/PRE&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;Srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 15:31:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130461#M111548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T15:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: ALV code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130462#M111549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Enzo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understood what do you want say to me but my requirement is in the grid bar there is diplay button instead of selecting from the grid bar i want to select it from menu .Is it possible?.If u know any example code just post it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lisa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 15:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130462#M111549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T15:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: ALV code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130463#M111550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want create a new button in toolbar.But i need to access all functionalities as available in toolbar from menu bar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lisa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u didnt understand the wording then please look at my reply of the previous message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 15:37:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130463#M111550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T15:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: ALV code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130464#M111551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know of a way to do it, but what I posted is a work around for you. You remove the standard toolbar function for 'Display' and add your own toolbar function using the code I posted and use the same icon(if that matters) for display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 16:07:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130464#M111551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T16:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALV code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130465#M111552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lisa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add Menu options in menu bar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explore your GUI status and explore the menubar &lt;DEL&gt;&amp;gt; Put your cursor in any empty place and right click&lt;/DEL&gt;Then choose Copy the menu option from a standard program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will wok for you.&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;Lanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 16:12:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130465#M111552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T16:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: ALV code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130466#M111553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lisa,&lt;/P&gt;&lt;P&gt;probably I don't understood you because of my english, any way, I belive you are speaking about the menu at the top of the dympro, in other words where is written 'System', 'Help', ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 16:21:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-code-needed/m-p/1130466#M111553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T16:21:30Z</dc:date>
    </item>
  </channel>
</rss>

