<?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: using application toolbar push buttons in report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972677#M1339545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you use ALV via FM or via class &lt;EM&gt;clu_gui_alv_grid&lt;/EM&gt; ?&lt;/P&gt;&lt;P&gt;If first, use below to catch commands triggered by user&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: l_repid TYPE sy-repid.
  l_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
       ...
     i_callback_program                = l_repid
     i_callback_user_command           = 'USER_COMMAND'   "this subroutine will be called once you pick otpion from toolbar

FORM user_command USING f_ucomm TYPE sy-ucomm
                        ls_selfield TYPE slis_selfield.
  IF f_ucomm = 'MY_FCODE' . "here you picked function code
      "react here accordingly
  ENDIF.
ENDFORM.    
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Aug 2009 10:00:27 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2009-08-03T10:00:27Z</dc:date>
    <item>
      <title>using application toolbar push buttons in report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972672#M1339540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello folks,&lt;/P&gt;&lt;P&gt;I'm new to ABAP and so i'm facing some problems with my code.&lt;/P&gt;&lt;P&gt;I have copied a standard program to my Z program (ZXXXXX). I have added few push buttons to the application toolbar of the Z program (ZXXXXX) and now on click of the 1st button i need to call another standard program. &lt;/P&gt;&lt;P&gt;Where should I write the code for the action to be performed on click of the buttons? I am aware that it is generally written in the PAI module but I did not have this module, its a normal report program and not a module pool.&lt;/P&gt;&lt;P&gt;Need your help.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 07:46:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972672#M1339540</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-03T07:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: using application toolbar push buttons in report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972673#M1339541</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;In a report program you have to write it in the &lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 07:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972673#M1339541</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2009-08-03T07:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: using application toolbar push buttons in report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972674#M1339542</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 can write you code in the at selection-screen event of the prorgam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

at selection-screen.
 
  if sy-ucomm = 'PUSH'.                      "Ok-code assigned to the pushutton
   submit progam 'zzzzz' and return.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you also want to pass some parameters to the submit program you need press F1 on the submit and you would get the information related to the command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu Verma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 08:00:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972674#M1339542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-03T08:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: using application toolbar push buttons in report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972675#M1339543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome on SCN!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do not forget to read &lt;SPAN __jive_macro_name="thread" id="250369"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the question, you would need to clarify where this application toolbar option is placed:&lt;/P&gt;&lt;P&gt;- in selection screen?&lt;/P&gt;&lt;P&gt;- in list (output of program)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If first applies, do as above suggested (using &lt;STRONG&gt;AT SELECTION-SCREEN&lt;/STRONG&gt; event).&lt;/P&gt;&lt;P&gt;If second is what you need, use event &lt;STRONG&gt;AT USER-COMMAND&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;In both cases variable &lt;STRONG&gt;sy-ucomm&lt;/STRONG&gt; will hold function code of triggered function (i.e sy-ucomm = 'MY_BUTTON' ). If that condition is fulfilled simply use &lt;STRONG&gt;SUBMIT 'MY_PROGRAM' AND RETURN&lt;/STRONG&gt; , or just &lt;STRONG&gt;SUBMIT 'MY_PROGRAM'&lt;/STRONG&gt; if you don't want to get back to calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 08:08:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972675#M1339543</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-08-03T08:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: using application toolbar push buttons in report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972676#M1339544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your inputs !&lt;/P&gt;&lt;P&gt;When I execute my Z program, the output is an ALV report where in I have the application toolbar with those buttons.&lt;/P&gt;&lt;P&gt;I have used the event &lt;STRONG&gt;AT USER-COMMAND&lt;/STRONG&gt; but not able to achieve the thing I want.&lt;/P&gt;&lt;P&gt;Where am I makin the mistake?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 09:53:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972676#M1339544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-03T09:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: using application toolbar push buttons in report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972677#M1339545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you use ALV via FM or via class &lt;EM&gt;clu_gui_alv_grid&lt;/EM&gt; ?&lt;/P&gt;&lt;P&gt;If first, use below to catch commands triggered by user&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: l_repid TYPE sy-repid.
  l_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
       ...
     i_callback_program                = l_repid
     i_callback_user_command           = 'USER_COMMAND'   "this subroutine will be called once you pick otpion from toolbar

FORM user_command USING f_ucomm TYPE sy-ucomm
                        ls_selfield TYPE slis_selfield.
  IF f_ucomm = 'MY_FCODE' . "here you picked function code
      "react here accordingly
  ENDIF.
ENDFORM.    
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 10:00:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972677#M1339545</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-08-03T10:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: using application toolbar push buttons in report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972678#M1339546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Marcin, it worked.&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt; &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 11:38:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972678#M1339546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-03T11:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: using application toolbar push buttons in report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972679#M1339547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem. One thing about some rules here. If you got the answer please always close the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I sent you [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/Rules&lt;EM&gt;of&lt;/EM&gt;Engagement] as everyone here in SAP Community should be familiar with and follow them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2009 12:05:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-application-toolbar-push-buttons-in-report/m-p/5972679#M1339547</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-08-03T12:05:09Z</dc:date>
    </item>
  </channel>
</rss>

