<?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 Preloader: executing code asynchronous in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/preloader-executing-code-asynchronous/m-p/6084042#M1357466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to make a preloader for a heavy bsp which displays the steps being executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Basic scenario:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Client side, I want to make one ajax call to start the server side processing, after which a periodic (every x seconds) ajax call is made to retrieve the step currently being processed. Once the ajax call receives a signal the execution has ended, it redirects to the next page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps are currently being tracked by making use of the shared buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problems/questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;How to execute code asynchronously?&lt;/EM&gt; The only clue I've found is to call a function module in a background task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Is it possible to use the shared buffer's variables in a different task?&lt;/EM&gt; When I use an FM in a background task to export to the shared buffer, I can't seem to import the values in the main code. Are there alternatives aside from a database table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;An example of the shared buffer code and FM in background task can be found here:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://pastebin.com/m37b505a0" target="test_blank"&gt;http://pastebin.com/m37b505a0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Olivier Schietecat on Sep 9, 2009 11:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Sep 2009 09:19:04 GMT</pubDate>
    <dc:creator>Olivier_S</dc:creator>
    <dc:date>2009-09-09T09:19:04Z</dc:date>
    <item>
      <title>Preloader: executing code asynchronous</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/preloader-executing-code-asynchronous/m-p/6084042#M1357466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to make a preloader for a heavy bsp which displays the steps being executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Basic scenario:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Client side, I want to make one ajax call to start the server side processing, after which a periodic (every x seconds) ajax call is made to retrieve the step currently being processed. Once the ajax call receives a signal the execution has ended, it redirects to the next page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps are currently being tracked by making use of the shared buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problems/questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;How to execute code asynchronously?&lt;/EM&gt; The only clue I've found is to call a function module in a background task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Is it possible to use the shared buffer's variables in a different task?&lt;/EM&gt; When I use an FM in a background task to export to the shared buffer, I can't seem to import the values in the main code. Are there alternatives aside from a database table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;An example of the shared buffer code and FM in background task can be found here:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://pastebin.com/m37b505a0" target="test_blank"&gt;http://pastebin.com/m37b505a0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Olivier Schietecat on Sep 9, 2009 11:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2009 09:19:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/preloader-executing-code-asynchronous/m-p/6084042#M1357466</guid>
      <dc:creator>Olivier_S</dc:creator>
      <dc:date>2009-09-09T09:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Preloader: executing code asynchronous</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/preloader-executing-code-asynchronous/m-p/6084043#M1357467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Decided to look back on this question, and close it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way to make a preloader was to not do it asynchronous, but to use ajax to make each load of an object a separate http call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method of course, is only useable when doing custom code, so you can adjust its flow to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having done other server-side scripting languages, I wish the http plugin was able to do this asynchronously. I guess this belongs to my wishlist, such as: "correct usage of back and forth browser buttons", "use html 5 for making sap mobile" and "separate html and css", "limit the usage of frames".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 12:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/preloader-executing-code-asynchronous/m-p/6084043#M1357467</guid>
      <dc:creator>Olivier_S</dc:creator>
      <dc:date>2010-10-06T12:28:09Z</dc:date>
    </item>
  </channel>
</rss>

