Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Threading in ABAP?

Former Member
0 Likes
663

I have a scenario (Order taking) where the execution logic takes considerable time to finish the processing. As a result, the end user who is using the web application has to wait for at-least 10 minutes till the processing is complete.

In the UI (WebDynpro) until the response comes back, the hour glass / sand timer (wheel) keeps coming and hence the user cannot do anything but has to wait till the processing is complete. I would like to know if there is a possibility to develop a function module in ABAP that would trigger a new process internally which will run in the background and still the Function Module can return back certain message like "Your order number XXXXXX X has been submitted and is getting processed. Please check the status of it after 10 minutes". May be something similar to threading in Java?

Bala

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
591

You can try some thing like this....

in the Function module interface have a parameter along with other parameters, bind that to your context. First time pass space to it. at that time you can call your function in the initial process like this..



if flag = ''.
call function 'ZTEST_RFC' starting new task 'ABC'.
else.
 "get the data here...
endif.

This will start a new task. and come back to WD. next time you set the parameter to 'X' and get the data.

I have a scenario (Order taking) where the execution logic takes considerable time to finish the processing. As a result, the end user who is using the web application has to wait for at-least 10 minutes till the processing is complete.

In the UI (WebDynpro) until the response comes back, the hour glass / sand timer (wheel) keeps coming and hence the user cannot do anything but has to wait till the processing is complete. I would like to know if there is a possibility to develop a function module in ABAP that would trigger a new process internally which will run in the background and still the Function Module can return back certain message like "Your order number XXXXXX X has been submitted and is getting processed. Please check the status of it after 10 minutes". May be something similar to threading in Java?

Bala

2 REPLIES 2
Read only

Former Member
0 Likes
592

You can try some thing like this....

in the Function module interface have a parameter along with other parameters, bind that to your context. First time pass space to it. at that time you can call your function in the initial process like this..



if flag = ''.
call function 'ZTEST_RFC' starting new task 'ABC'.
else.
 "get the data here...
endif.

This will start a new task. and come back to WD. next time you set the parameter to 'X' and get the data.

Read only

Former Member