<?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: Method CL_GUI_FRONTEND_SERVICES=&amp;gt;EXECUTE not working in background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367615#M1641641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Louie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the VIA SELECTION SCREEN addition in SUBMIT statement to run in foreground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;submit Y_REPORT via selection-screen with parameter1 = 'VALUE1'&lt;/P&gt;&lt;P&gt;      with parameter2 = 'VALUE2'  and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandhya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Nov 2011 10:15:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-21T10:15:39Z</dc:date>
    <item>
      <title>Method CL_GUI_FRONTEND_SERVICES=&gt;EXECUTE not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367612#M1641638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My requirement is to launch an external application in BSP upon clicking a button. We tried to use method &lt;STRONG&gt;CL_GUI_FRONTEND_SERVICES=&amp;gt;EXECUTE&lt;/STRONG&gt;, however, I found out that this is not possible in BSP as it is said to be working in a browser environment (source: [&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="978023"&gt;&lt;/A&gt;]). I found another alternative by running a program (which is successful at foreground) in background job through triggering event (source: [http://www.erpdb.info/wp-content/uploads/2008/12/call-abap-program-from-bsp-sample-code.pdf]), but as I tried to simulate that, the program wasn't successful to launch an external application, i found out that sy-subrc after &lt;STRONG&gt;CL_GUI_FRONTEND_SERVICES=&amp;gt;EXECUTE&lt;/STRONG&gt; is not equal to 0. Can someone tell me why it is not successful in background?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 09:23:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367612#M1641638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-21T09:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Method CL_GUI_FRONTEND_SERVICES=&gt;EXECUTE not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367613#M1641639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The method CL_GUI_FRONTEND_SERVICES=&amp;gt;EXECUTE will not work in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The class  CL_GUI_FRONTEND_SERVICES is meant for foreground services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use SUBMIT statement run the report in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandhya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 09:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367613#M1641639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-21T09:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Method CL_GUI_FRONTEND_SERVICES=&gt;EXECUTE not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367614#M1641640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandhya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;You need to use SUBMIT statement run the report in background.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's exactly what I'm doing. I created a program to create a background job using SUBMIT statement, but still the method is not returning sy-subrc EQ 0. Do you know how to make it in foreground? I also tried to record the program (in SHDB) and create a session (in SM35) to execute it in foreground but still it is not successful to launch the application. &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 09:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367614#M1641640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-21T09:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Method CL_GUI_FRONTEND_SERVICES=&gt;EXECUTE not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367615#M1641641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Louie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the VIA SELECTION SCREEN addition in SUBMIT statement to run in foreground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;submit Y_REPORT via selection-screen with parameter1 = 'VALUE1'&lt;/P&gt;&lt;P&gt;      with parameter2 = 'VALUE2'  and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandhya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 10:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367615#M1641641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-21T10:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Method CL_GUI_FRONTEND_SERVICES=&gt;EXECUTE not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367616#M1641642</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;PRE&gt;&lt;CODE&gt;&lt;P&gt;Can someone tell me why it is not successful in background?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CL_GUI_FRONTEND_SERVICES&lt;/EM&gt; is a class for frontend GUI communication. If you run a program in background mode, then you have no frontend (and SAPGUI) access. This causes your issue, but I can see no workaround for that.&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;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 10:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367616#M1641642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-21T10:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Method CL_GUI_FRONTEND_SERVICES=&gt;EXECUTE not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367617#M1641643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please remember you cannot use &lt;STRONG&gt;GUI&lt;/STRONG&gt; FMs, methods in background, period!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to execute a program in background mode, you need to create an external OS command &amp;amp; call it using 'SXPG_COMMAND_EXECUTE'!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;PS: I've no experience on BSPs, not use whether an external OS command will help you to achieve your requirement &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 10:53:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367617#M1641643</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-11-21T10:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Method CL_GUI_FRONTEND_SERVICES=&gt;EXECUTE not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367618#M1641644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sandhya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggestion and it worked by manually executing the program with syntax SUBMIT. However, my requirement is to launch immediately the application upon pressing the button. I don't want to display the selection screen and execute upon clicking it. Thanks to your suggestion anyway &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Louie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 11:56:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367618#M1641644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-21T11:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Method CL_GUI_FRONTEND_SERVICES=&gt;EXECUTE not working in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367619#M1641645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to your suggestion, even though you're still unsure if it will work, I'll still try to use it. Would you mind helping me translating the requirement below (below are just sample application and parameter) to function SXPG_COMMAND_EXECUTE? I'm currently researching on how to maintain external commands through SM69. Will really appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD cl_gui_frontend_services=&amp;gt;execute
  EXPORTING
    application            = '"C:\Program Files\Internet Explorer\IEXPLORE.EXE"'
    parameter              = 'www.google.com'
  EXCEPTIONS
    cntl_error             = 1
    error_no_gui           = 2
    bad_parameter          = 3
    file_not_found         = 4
    path_not_found         = 5
    file_extension_unknown = 6
    error_execute_failed   = 7
    synchronous_failed     = 8
    not_supported_by_gui   = 9
    OTHERS                 = 10.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Louie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 12:07:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-cl-gui-frontend-services-gt-execute-not-working-in-background/m-p/8367619#M1641645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-21T12:07:20Z</dc:date>
    </item>
  </channel>
</rss>

