‎2009 Sep 09 10:19 AM
Dear experts,
I'd like to make a preloader for a heavy bsp which displays the steps being executed.
Basic scenario:
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.
The steps are currently being tracked by making use of the shared buffer.
Problems/questions:
How to execute code asynchronously? The only clue I've found is to call a function module in a background task.
Is it possible to use the shared buffer's variables in a different task? 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?
-
An example of the shared buffer code and FM in background task can be found here:
Edited by: Olivier Schietecat on Sep 9, 2009 11:22 AM
‎2010 Oct 06 1:28 PM
Decided to look back on this question, and close it.
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.
This method of course, is only useable when doing custom code, so you can adjust its flow to it.
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".