cancel
Showing results for 
Search instead for 
Did you mean: 

Personas 3.0 SP2 Hour Glass / Spinning wheel

former_member327092
Participant
0 Kudos

Dear All,

I know there was couple discussion threads on how to get hour glass / spinning wheel / three dots for long running scripts in a transaction. Our requirement is to create Physical Inv documents (MI31) automatically based on the selection variants. This almost takes 3 - 4 minutes to create the documents. Meanwhile there is no indication in the personas screen that the script is running. Users are getting confused if the browser is frozen or is there any issue in the screen as it does nothing.

Is there any possible work around to notify the user on long running scripts in the buttons event?

Regards,

Raj

Accepted Solutions (1)

Accepted Solutions (1)

clemens_gantert
Active Participant
0 Kudos

Hi,

with Personas 3.0 SP03 and a compliant kernel you will get the loading animation even during long running scripts.

However, for such long running scripts my suggestion would be to split your script up in logical chunks (for instance for every created task) and update the screen asynchronously. I will give a sample script that will work in SP02. The tricky part is to figure out the right timeout values (1000ms) works for me. Disclaimer: This only works in the SAP Gui for Html and uses an internal API that can change any time.

var taskStrings = ["first step", "second step", "third step"];

var index =0;

var text ="";

function doTask(){

  // 3s pause

  var time = (new Date()).getTime() +3000;

  while ((new Date()).getTime() < time );

  //update the UI

  text += taskStrings[index]+ " completed.\n";

  session.findById("wnd[0]/usr/wlblPersonas_1453929017141").text =text;

  sap.personas.scripting.executeScriptInternal( {src:""});

  // schedule the next task

  if (++index < taskStrings.length){

  setTimeout(doTask,1000); // the 500ms delay is needed to allow the screen update thread to get scheduled

  }

}

session.findById("wnd[0]/usr/wlblPersonas_1453929017141").text = "";

setTimeout(doTask,1000);

Best Regards,

Clemens

former_member327092
Participant
0 Kudos

Hi Clemens,

Thanks for your reply. The problem for me is that the documents get created in the next page. There is a navigation from the Search screen to the result screen. When I click on Generate button in the search screen it navigates to the next screen to show the list of Materials and their corresponding PI document #. Also, in some cases the item list could be short and also based on serialized materials the time could differ.

With the above scenario...I doubt this would work...your thoughts?

clemens_gantert
Active Participant
0 Kudos

Hi,

If I understand you correctly, it would take a long time even if no Personas flavor was applied and you pressed the Generate button manually. If that's the case then your only option is to upgrade Personas and kernel so that you get to loading animation.

Thanks,

Clemens

former_member327092
Participant
0 Kudos

That's right Clemens. When I run the application directly in SAP GUI for Windows it takes 3 minutes for this transaction. In GUI at least the spinning wheel is there but here I get the 3 blue frozen dots.

We are already on 742 Patch 400. We are going live in a month so I don't think upgrading to SP03 is an option at this point of time.

Does SP03 offer this spinning wheel for running scripts by default?

Regards,

Raj

clemens_gantert
Active Participant
0 Kudos

Hi,

yes with SP03 and suitable kernel (I think 742PL400 is ok, but you might even have wait for the planned PL401) the loading animation will always be displayed.

Best Regards,

Clemens

former_member327092
Participant
0 Kudos

Would you be able to provide a screenshot of the loading animation in SP03? Based on that I can take it up with my management to see if they are ok for an upgrade.

Is this applicable for any standard / custom buttons in Personas?

Regards,

Raj.

clemens_gantert
Active Participant
0 Kudos

Hello Raj,

Here is a video: 2016-08-11_1246 - cgantert's library

Cheers,

Clemens

former_member327092
Participant
0 Kudos

Thanks Clemens Gantert. We have upgraded our Personas to SP3 and are on Kernel 401. I still continue to see the same behavior.

I upgraded the flavors from 302 to 303. Cleared the cache and tried running the application and it's still the same behavior. I also ran some standard transactions without any custom flavors and some tables like MSEG / MARD which are really huge and would take atleast 10 seconds to load the data....I don't see the spinning for either of them.

Am I missing some settings?

Regards,

Raj

clemens_gantert
Active Participant
0 Kudos

Hello Raj,

I vaguely remember that in 401 the loading animation still would not show for long running standard processes or transactions.

Would you please confirm that the loading animation is showing for long running personas scripts  e.g.:

var time = (new Date()).getTime() +10000; // wait 10s

while ((new Date()).getTime() < time );

Thanks,

Clemens

former_member327092
Participant
0 Kudos

Hi Clemens,

I just get the frozen bubbles and then the button activates after 10 seconds.

Regards,

Raj

clemens_gantert
Active Participant
0 Kudos

Hi,

this is really odd. The recording attached to this post was taken on a 7.42 PL401. I am debating with myself on what to recommend to you. You could upgrade to the latest 7.42 patch level, but I can't guarantee that it will work either.

I guess the best course of action for you is to open a CSS incident for this (component "BC-PER"). I will route the incident to the kernel team then we'll know, but they will probably also refer to a later kernel as well.

Best Regards,

Clemens

former_member327092
Participant
0 Kudos

Opened a message already for the same -

336154 / 2016 Personas Spinning Wheel - Long running scripts

Answers (0)