<?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 Trigger PAI on specific toolbar button in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193651#M1520232</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 have a toolbar (in a docking container) attached to a dynpro which contains two buttons (save and refresh). I want to have the save button to invoke PAI, but the refresh button should not! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only found method SET_REGISTERED_EVENTS with eventid CL_GUI_TOOLBAR=&amp;gt;M_ID_FUNCTION_SELECTED that applies the event handling to the complete toolbar. Is it possible to do this function code specific? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alej&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Aug 2010 20:18:17 GMT</pubDate>
    <dc:creator>alejiandro_sensejl</dc:creator>
    <dc:date>2010-08-23T20:18:17Z</dc:date>
    <item>
      <title>Trigger PAI on specific toolbar button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193651#M1520232</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 have a toolbar (in a docking container) attached to a dynpro which contains two buttons (save and refresh). I want to have the save button to invoke PAI, but the refresh button should not! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only found method SET_REGISTERED_EVENTS with eventid CL_GUI_TOOLBAR=&amp;gt;M_ID_FUNCTION_SELECTED that applies the event handling to the complete toolbar. Is it possible to do this function code specific? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alej&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Aug 2010 20:18:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193651#M1520232</guid>
      <dc:creator>alejiandro_sensejl</dc:creator>
      <dc:date>2010-08-23T20:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger PAI on specific toolbar button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193652#M1520233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alej,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to achieve that using this method, however you have to set the flag &lt;STRONG&gt;APPL_EVENT&lt;/STRONG&gt; for certain event id. This way this event will entail PAI after triggering. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the event id to register please refer toolbar specific events [here|http://help.sap.com/saphelp_470/helpdata/es/1b/8c2eb4c57511d2bd8e080009b4534c/frameset.htm]&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>Tue, 24 Aug 2010 06:56:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193652#M1520233</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-08-24T06:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger PAI on specific toolbar button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193653#M1520234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately I'm not sure what you are suggesting... Method SET_REGISTERED_EVENTS applies the state &lt;EM&gt;trigger &lt;STRONG&gt;or&lt;/STRONG&gt; don't trigger PAI on click&lt;/EM&gt; to the complete toolbar, doesn't it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is that function code SAVE runs the dynpro field checks, but the refresh function should not (like an exit command). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Alej&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Aug 2010 17:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193653#M1520234</guid>
      <dc:creator>alejiandro_sensejl</dc:creator>
      <dc:date>2010-08-24T17:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger PAI on specific toolbar button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193654#M1520235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed this most likely applies to whole toolbar, but is set for specific event type (the one which you pass for &lt;EM&gt;eventid&lt;/EM&gt; ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for your requirement I think may help the following: in handling method once SAVE button is pressed force the screen processing once again with LEAVE TO SCREEN main_screen_number. This should then entail &lt;STRONG&gt;dialog step&lt;/STRONG&gt; once again. Try it out, it worked once for me.&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>Wed, 25 Aug 2010 07:19:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193654#M1520235</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-08-25T07:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger PAI on specific toolbar button</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193655#M1520236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alej&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am right the executing toolbar functions do not trigger PAI but just raise event USER_COMMAND (in case of custom-defined buttons). If you want to trigger PAI explicitly you simply have to use statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD cl_gui_cfw=&amp;gt;set_new_ok_code(...)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ALV framework will finish the event handling method and then jump to PAI with the newly set OK-code.&lt;/P&gt;&lt;P&gt;Instead of doing any "SAVE" functionality within the event handler method I recommend to do this at a module / routine at PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 10:00:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-pai-on-specific-toolbar-button/m-p/7193655#M1520236</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2010-08-25T10:00:47Z</dc:date>
    </item>
  </channel>
</rss>

