cancel
Showing results for 
Search instead for 
Did you mean: 

WD4A : Progress Indicator : How to ensure gradual Progress from 0% to 100%?

Former Member
0 Kudos

Hi Experts,

i planned to use Progress Indicator UI control to display the progress of File Upload process. In my program i have bound Context Attribute AttrPI to the property percentValue of Progress Indicator

within a large loop, the attribute value is incremented as the loop progresses.

Issue is i only see the final status of the Progress Indicator, no matter how so ever small or large loop is. With loops having 10,000 iterations ( wait icon starts appearing here) but the progress indicator stays at 0% then suddenly jumps to 100% *

what change should i make so that we can see , progress Indicator gradually moving from 0% to 100%

and not shoting to 100% in one go??

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Your question goes to the fundamentals of how web applications work. They are a request/response model. The frontent (your browser) makes a request to the server. ABAP code is executed on the server which produces an HTTP response. Only after all code is finished being executed, is there a response sent back to the client. You can't update the frontend within a loop statement in ABAP. The frontend will only receive the results upon completion of the loop - hence only displaying 100%.

You also can't really track the progress of an upload because the entire file contents are sent back to the server in one single post (as a mult-part MIME). Therefore most of the time is the post back - during which no updates to the frontend can occur.

The progress indicator is really only useful for displaying the status of parallel processes on the server or monitoring running background jobs - things that are executing in another work process from the main dialog one.

Former Member
0 Kudos

Hi Thomas,

I am trying to use Progress Indicator to show the CONSTRUCTION of internal table. This is after i have complete file available. Briefly stating i am reading data from file object & appending a row in my internal table.

With server response cycle model that you explained in your reply, would it be ever possible to use progress indicator. Since in most cases we woul be placing it on VIEW then performing some computations , validations , looping as part of method call in assistance class or button action.

Is there a way to PUSH this loop or validation or computation as seperate process that calls back & updates the percentValue property of my WebDynpro Component context

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi Thomas,

>

> With server response cycle model that you explained in your reply, would it be ever possible to use progress indicator. Since in most cases we woul be placing it on VIEW then performing some computations , validations , looping as part of method call in assistance class or button action.

>

> Is there a way to PUSH this loop or validation or computation as seperate process that calls back & updates the percentValue property of my WebDynpro Component context

That is exactly why I posted this in the original reply:

The progress indicator is really only useful for displaying the status of parallel processes on the server or monitoring running background jobs - things that are executing in another work process from the main dialog one.

So no Progress Indicator isn't useful for measuring anything that happens within one phase cycle of the WDA application itself.

The main way that people PUSH things - is to submit a background job. The processing can then take place in a parallel background work process. The program running the background can be specially designed to write its progress into some temporary database table so that the WDA application can monitor it.

We also have parallel processing in ABAP, but that won't work in this case since you use wait statements in the main program to monitor the parallel threads. The waits would not end the phase cycle and you would have same 100% problem.

Former Member
0 Kudos

Thanks Thomas for your patient explaination, i guess i will have to make my UI little less fancy this time

Warm regards

Prashant