cancel
Showing results for 
Search instead for 
Did you mean: 

Waiting in WDA

former_member15918
Participant
0 Kudos

Hello Friends,

I am developing a WDA application wherein I need to perform and RFC call to check some information on other system.

If that information is not yet updated on the remote system. I have to wait for sometime and then again call RFC. So this action will be performed till the time I get that information.

I tried using Wait statement in Class method which I am calling from my WDA this gives dump.

So I tried Function module ENQUE_SLEEP with 42 seconds waiting time each time.

If I execute my application in debug mode ( Even if I go to debug atleast once) . It is being executed successfully.

BUT if I directly execute it ,it gives below error on page after 1 min and few seconds.

                • Error start*******

The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot be displayed.

-


Please try the following:

Open the Server path home page, and then look for links to the information you want.

Click the Refresh button, or try again later.

Click Search to look for information on the Internet.

You can also see a list of related sites.

HTTP 500 - Internal server error

Internet Explorer

                • Error End*******

Same thing happens if I try do 100 times.. to make system wait.

Thanks in advance for your help!

Regards,

Hema

Accepted Solutions (1)

Accepted Solutions (1)

Sm1tje
Active Contributor
0 Kudos

Not sure what the exact problem is, but what about using the TimedTrigger UI element?

Answers (3)

Answers (3)

former_member15918
Participant
0 Kudos

Thanks so much for your help. I appreciate it!!

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Keeping the HTTP communication channel open for too long is costly for system resources and can block other users in a high volume environement. This is why the system has controls built in to limit how long the connection can remain open. This is what you are hitting when you execute the application directly. Debugging mode is allowed to violate these limits, but it is understood that when debugging you need time to step through the code.

It is not advisable to raise these limits to match up to your design. As stated this can lead to lack of resources to respond to requests from other users on your system.

You should consider restructing your flow as suggested by others. The usage of background processes and timedTriggers to check on the status of the job is the common solution in this situation.

Former Member
0 Kudos

Well its appears that the HTTP session breaks when you use the SLEEP or WAIT command,

below excerpt is from thomas jung on a similar query

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.

webdynpro ABAP is an statefull paradigm. would its be possible to restructure your application so that your RFC call executes as different BACKGROUND process. which should notify you application by writing data to some database table. Then you WebDynpro application can check this table for completion of task & results.

if you HAVE to wait for result from RFC & u cant do anything else except wait u might use ,TimeTriggered UI element can be usefull to keep client request alive,

Greetings

Prashant