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

Processing data in parallel tasks

Former Member
0 Likes
1,165

Hi all,

I have a question about parallel processing via RFC. When we process data in parallel processes using asynchron RFC calls, is it possible to stop processing of remaining tasks if an eoor in one of the tasks occur. For example, if we start 20 tasks and an error occurs at task 3, is it possible to stop processing of all remaining tasks?

Kind Regards,

Sükrü

6 REPLIES 6
Read only

Former Member
0 Likes
838

Hello Suekrue

If the jobs start running simultaneously at the same time

you can't stop one job if other fails. However if some jobs start running after other you can catch exceptions and depending on that program in such a manner that if one job fails subsequent job is not triggered.

Award points if found useful.

Thanks

Inder

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
838

I assume that you could set a flag in the shared buffer and be checking this flag in the RFC. If something occurs during one instance of the RFC, set the flag in the shared buffer, the rest of the instances of the RFC can abort next time the flag is checked. Make sense?

Check the keywords IMPORT/EXPORT for syntax of the shared buffer.

Regards,

Rich Heilman

Read only

sridhar_k1
Active Contributor
0 Likes
838

The Work process in parallel processing operate independently. If one task errors out it's not possible to stop other tasks.

Regards

Sridhar

Read only

0 Likes
837

Hi all,

Thank you for your answers. Rich's answer seems to be reasonable, but since I am calling a function module of which coding I can not change(to program a wrapper FM also is not possible ) it is not possible for me to check a flag in the shared buffer. The data set in shared buffer is set on an application server, and if the RFC calls run on another application server, it does not make sense to check the flag.

Kind Regards,

Sükrü

Read only

Laxmana_Appana_
Active Contributor
0 Likes
837

Hi,

By using 'WAIT' and 'RECEIVE' keywords we can interact with other RFC calls in parallel processing.

Refer following docs.

Parallel Processing in ABAP

/people/naresh.pai/blog/2005/06/16/parallel-processing-in-abap

Parallel Processing with Asynchronous RFC

http://help.sap.com/saphelp_webas610/helpdata/en/22/0425c6488911d189490000e829fbbd/frameset.htm

Parallel-Processing Function Modules

http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096ff6543b11d1898e0000e8322d00/frameset.htm

Regards

Appana

Read only

Former Member
0 Likes
837

Hi !

You may think about the following...

You could set an enqueue of a Z... (Custom) object and check that enqueue in your RFC-Called functions.

If it is set you could exit them.

Is is, of course, not standard an has to be coded by yourself.

Regards

Rainer

Some points would be nice if that helped a bit.