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

Call function in new task in RECEIVE RESULTS module

Former Member
0 Likes
1,233

Hello Gurus,

at the end of one of the parallel tasks I have in my program I have to trigger a new task. The problem is that this is not permitted

Does anyone have a solution for this very very nasty problem?? I can't belive this is not possible.

I am starting about 8 tasks and after each one is ready I have to start the next set of tasks but do not want to wait until all of them are finished.

Regards,

Ioan.

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
1,053

Normally you control starting of new tasks via global counters (one of the very few reasons to use global variables...) that track the number of tasks started and finished, and compare that to the number of DIA processes reserved for the parallel RFC action using the WAIT UNTIL command. This way new tasks are started once processes become available again.

I don't see a reason to start new tasks in the RECEIVE RESULTS section, and it's obviously not allowed anyway.

Thomas

P.S. now I see the previous reply, but I'll let mine stand nevertheless

Hello Gurus,

at the end of one of the parallel tasks I have in my program I have to trigger a new task. The problem is that this is not permitted

Does anyone have a solution for this very very nasty problem?? I can't belive this is not possible.

I am starting about 8 tasks and after each one is ready I have to start the next set of tasks but do not want to wait until all of them are finished.

Regards,

Ioan.

6 REPLIES 6
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,053

Hi Loan

You can try as follow. Keep a global flag. You have submitted all 8 FM's in parallel. After the submission make a wait until GV_FLAG is X. Simutaneouly this flag will set in Receive Results once the FM which you wants to run get executed. the moement this flag is set you can call new task after wait until flag

NAbheet

Read only

ThomasZloch
Active Contributor
0 Likes
1,054

Normally you control starting of new tasks via global counters (one of the very few reasons to use global variables...) that track the number of tasks started and finished, and compare that to the number of DIA processes reserved for the parallel RFC action using the WAIT UNTIL command. This way new tasks are started once processes become available again.

I don't see a reason to start new tasks in the RECEIVE RESULTS section, and it's obviously not allowed anyway.

Thomas

P.S. now I see the previous reply, but I'll let mine stand nevertheless

Read only

0 Likes
1,053

Hi Thomas,

thank you for the reply. I wanted to use class events and to trigger the next tasks dynamically

Well, now I have to rewrite my program.

Regards,

Ioan.

Read only

0 Likes
1,053

P.S. now I see the previous reply

Wouldn't it be cool if SCN shows a notification saying that new updates have arrived since you started replying?

Something similar to what GMail does while drafting an email.

It would be really helpful when i am typing furiously to an extremely easy question only to find that it is deleted because of 'alert moderator' .

Read only

0 Likes
1,053

I didn't know you're going for the extremely easy questions

With today's HTML techniques (I assume) it should be possible to display the new message or updated status right there while you are still typing...so you can still adjust or not post at all.

Thomas

Read only

0 Likes
1,053

It is very easy to implement. They just have to reuse the code that shows '__ Updates' message at top of activity feed whenever new activity has taken place.