<?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: Submit report and start pai function without user action in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519419#M1655610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use [SUPPRESS DIALOG|http://help.sap.com/abapdocu_70/en/ABAPSUPPRESS.htm] to trigger PAI from PBO and don't use cl_gui_cfw=&amp;gt;set_new_ok_code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* PBO (end of)
IF pa_ucomm IS NOT INITIAL.
  SUPPRESS DIALOG. 
ENDIF.

* PAI (start of)
IF pa_ucomm IS NOT INITIAL.
  ok_code = pa_ucomm.
  clear pa_ucomm.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you actually want to use the set_new_ok_code method, check the return code. (look for values :cl_gui_cfw=&amp;gt;rc_wrong_state "The method was not called from the handler method of a system event." and &lt;/P&gt;&lt;P&gt;cl_gui_cfw=&amp;gt;rc_invalid : "The OK_CODE that you set is invalid. ")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jan 2012 15:32:35 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2012-01-26T15:32:35Z</dc:date>
    <item>
      <title>Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519412#M1655603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i'm submitting a report with a selection parameter.&lt;/P&gt;&lt;P&gt;In case of this parameter i wanna use some different fuctionality out of PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in PBO of called report i'm catching parameter and in case of that im new ok_code depending on value with following snippet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But unfortunately PAI is NOT triggered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF pa_ucomm IS NOT INITIAL.
    CALL METHOD cl_gui_cfw=&amp;gt;set_new_ok_code
      EXPORTING
        new_code = pa_ucomm.
*     CALL METHOD cl_gui_cfw=&amp;gt;flush. &amp;lt; NO EFFECT
*     CALL METHOD cl_gui_cfw=&amp;gt;update_view. &amp;lt;-NO Effect
*     SUPPRESS DIALOG. &amp;lt;- NO EFFECT
     clear: pa_ucomm, l_ucomm_zeitraum.
   endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea, any workarround?&lt;/P&gt;&lt;P&gt;thank you in advance,&lt;/P&gt;&lt;P&gt;t&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 14:32:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519412#M1655603</guid>
      <dc:creator>timo_ehl3</dc:creator>
      <dc:date>2012-01-26T14:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519413#M1655604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Timo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you use this code under 'at selection screen'? If it doesn't work, you can write this code under 'at selection-screen output' and create a button to catch that parameter.(ie catches when user pushes the button)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can tell more about whatever you want to do I can gladly try to help more.&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;Kerim.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 14:54:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519413#M1655604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T14:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519414#M1655605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried SET USER-COMMAND 'XXXX'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 15:14:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519414#M1655605</guid>
      <dc:creator>surajarafath</dc:creator>
      <dc:date>2012-01-26T15:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519415#M1655606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerim,&lt;/P&gt;&lt;P&gt;thanx a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using this code in PBO Module of "called report". Caller (pa_ucomm is cleared) and called program (pa_ucomm is filled by button) is the same. But i guess it's not the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's bit tricky to describe, but at least its simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I'm using z report with a lot of pushbuttons f.e. to change timeperiods or parameters for data selection.&lt;/P&gt;&lt;P&gt;2. one of the buttons is submitting the same report (submitting itself with no return) with different sel-screen parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;up to now everything works fine standard pbo is called and dialogof new submitted report  appears with correct refreshed data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want to submit this report again but with specific user action. So i decided to create an additional selscreen parameter wit no display. &amp;lt;-pa_ucomm.&lt;/P&gt;&lt;P&gt;In pa_ucomm im saving the action a user did in calling programm by button f.e..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So...after submitting the report im catching it in pbo and now i need to have functionality of PAI-"Step" to select depending data. &lt;/P&gt;&lt;P&gt;That's why i tried to set PAI UCOMM (by using cl_gui_cfw=&amp;gt;set_new_ok_code&lt;/P&gt;&lt;P&gt;) in PBO to this new value (pa_ucomm) and i expectet that PAI is triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But unfortunately not,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 15:15:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519415#M1655606</guid>
      <dc:creator>timo_ehl3</dc:creator>
      <dc:date>2012-01-26T15:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519416#M1655607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u try with &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET USER-COMMAND&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 15:17:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519416#M1655607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T15:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519417#M1655608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just tried. No PAI is triggered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 15:19:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519417#M1655608</guid>
      <dc:creator>timo_ehl3</dc:creator>
      <dc:date>2012-01-26T15:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519418#M1655609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Timo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think fcodes can be triggered automatically in a report but i'm afraid, this may not be the case with module pools, so without user interaction it may not be poosible, can u explain your requierement in detail may the community could come up with alternatives, but for triggering PAI i'm afraid may not be possible,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would still be watching the thread, because it would be interesting to know if that could be done and somebody comes up with a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kartik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 15:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519418#M1655609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T15:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519419#M1655610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use [SUPPRESS DIALOG|http://help.sap.com/abapdocu_70/en/ABAPSUPPRESS.htm] to trigger PAI from PBO and don't use cl_gui_cfw=&amp;gt;set_new_ok_code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* PBO (end of)
IF pa_ucomm IS NOT INITIAL.
  SUPPRESS DIALOG. 
ENDIF.

* PAI (start of)
IF pa_ucomm IS NOT INITIAL.
  ok_code = pa_ucomm.
  clear pa_ucomm.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you actually want to use the set_new_ok_code method, check the return code. (look for values :cl_gui_cfw=&amp;gt;rc_wrong_state "The method was not called from the handler method of a system event." and &lt;/P&gt;&lt;P&gt;cl_gui_cfw=&amp;gt;rc_invalid : "The OK_CODE that you set is invalid. ")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 15:32:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519419#M1655610</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-01-26T15:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519420#M1655611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then try this code to force PBO/PAI&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
      EXPORTING
        new_code = 'DUMMY'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 15:50:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519420#M1655611</guid>
      <dc:creator>surajarafath</dc:creator>
      <dc:date>2012-01-26T15:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519421#M1655612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that was my question - regarding my first post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 15:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519421#M1655612</guid>
      <dc:creator>timo_ehl3</dc:creator>
      <dc:date>2012-01-26T15:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519422#M1655613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i understand you correctly, In PBO you are calling a report which will fiill your ucomm (pa_ucomm) and after this you need to trigger PAI for this particular pa_ucomm.&lt;/P&gt;&lt;P&gt;can you try that coding in PBO itself? im not tried, i am just suggesting..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 16:10:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519422#M1655613</guid>
      <dc:creator>surajarafath</dc:creator>
      <dc:date>2012-01-26T16:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519423#M1655614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;program X calls screen Y whose PAI you want to execute without PBO of Y. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in PBO of Y, you need to write the "SUPPRESS DIALOG". and this works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but one more thing, it acts like you have pressed &lt;STRONG&gt;enter&lt;/STRONG&gt; on the keyboard. so the focde or sy-ucomm becomes the fcode set for this in the gui status, so adjust your code accordingly..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Soumyaprakash Mishra on Jan 27, 2012 12:01 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 18:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519423#M1655614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T18:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519424#M1655615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..thank you.&lt;/P&gt;&lt;P&gt;No that was not my approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm calling (via Submit) a report in PAI (as usual). After the user hits a button i'm catching sy-ucomm and in case..endcase im doing the action (setting a special selscreen parameter and submitting).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in PBO of the called report im checking if selscreenparameter is filled. if true...then set_new_ok_code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. programm X calls screen y in pbo of screen y, selscreen parameter of programm x is empty &lt;/P&gt;&lt;P&gt;2. programm X is setting selscreen, submitting programm x&lt;/P&gt;&lt;P&gt;3. in pbo of programm x i'm checking in pbo if selscreen is set&lt;/P&gt;&lt;P&gt;4. if true...do special pai coding (and that's the question...how to trigger)&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, 27 Jan 2012 07:27:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519424#M1655615</guid>
      <dc:creator>timo_ehl3</dc:creator>
      <dc:date>2012-01-27T07:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Submit report and start pai function without user action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519425#M1655616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 3. in pbo of programm x i'm checking in pbo if selscreen is set&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;==&amp;gt; dont check in PBO. just keep suppress dialogue. this will call PAI of x &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 4. if true...do special pai coding (and that's the question...how to trigger)&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;==&amp;gt;now PAI is triggered.. here check the value of what ever field and what ever core you want to do&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; regards&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 08:06:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-and-start-pai-function-without-user-action/m-p/8519425#M1655616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-27T08:06:07Z</dc:date>
    </item>
  </channel>
</rss>

