Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Communication between ABAP function and Flex Web application

Dear all,

We have a flex application which calls ABAP function modules through a web service. The problem is that the web service always times out and we are obliged to increase web service time out variables. We need a solution that doesn't require increasing the web timeout.

So I was thinking of calling our function module asynchronously using STARTING NEW TASK and PERFORMING...ON END OF TASK commands in ABAP. The problem I now face is to send the data that is gathered from the asynchronously called function module to the user's web browser. The problem being that once the function module is called asynchronously from the web service, the web service returns (thus not causing time outs), but the connection from the browser to the server is also severed. Is there a way to send data from ABAP to a web browser?



Former Member
Former Member replied


no, there is no possibility to send data from the ABAP WAS to the browser. Imagine what I would be if some servers in this world were able to send unsolicited data to your webbrowser.

The workaround is this:

Create two services on the ABAP side.

- the first service A starting the task and returning a ticket (UID) to the client.

- once completed, A stores the resulting data with reference to the ticket

- a second service B which can be called by the client application in regular intervals, say every 5 seconds, with the ticket ID as input until it receives the requested data.

Apart from that I'd investigate the cause of the timeout. From my personal experience, on a properly sized system even complicated queries or operations do not nearly cause timeouts, except in situations where part of the underlying coding is not compiled yet (meaning the coding has to be compiled once you call the service for the first time).

if you really have a less performant system (HW limitations), you should consider the to increase the HTTP timeout to something like 60 seconds.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question