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

Calling Function module Asynchronously

former_member212005
Active Contributor
0 Likes
4,604

Hi All,

I have a requirement wherein I am supposed to create the order header first in synchronous mode.

Then I am suppose to call a new function module which will create order lines for the order header created earlier, but this function module will be called asynchronously using the addition 'STARTING NEW TASK'....

Now, the problem that we have is that there might be 120-150 order lines to create, and when we use STARTING NEW TASK....it is executed in DIALOG work process....so the maximum time that it can take to execute is 300s...

But there is a probability that 120 order lines might not be created in 300s.....

When I think of splitting the data and then calling the function module asynchronously...i fear that there might be some locking issues over it....

So is there any way, that this scenario's can be avoided and I achieve my functionality...

1 ACCEPTED SOLUTION
Read only

mvoros
Active Contributor
0 Likes
2,274

Hi,

have you tried to use CALL FUNCTION .. IN BACKGROUND TASK? Check ABAP documentation for technical details.

Cheers

1 REPLY 1
Read only

mvoros
Active Contributor
0 Likes
2,275

Hi,

have you tried to use CALL FUNCTION .. IN BACKGROUND TASK? Check ABAP documentation for technical details.

Cheers