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

Parallel processing with multiple logics

former_member576008
Active Participant
0 Likes
1,532

Hi,

I am working on a report which has 15 different types of logic's / performs.

In my report selection screen i have controlling area, period, plant and material. Except material all are mandatory. Plant and material are select options.

Though i have completed the report, its taking long time to process the records, so thought of using parallel processing.

I got enough examples from online but all are similar examples like fetching data from a BAPI or creating material. etc., inside a loop.

In my scenario can some one explain me how to start parallel processing here.

All the logic i have mostly independent and few dependent on other, in all the logic i update a z table.

Thanks in advance.

8 REPLIES 8
Read only

Former Member
0 Likes
1,311

You need to determine which perform is taking most of your time.  That is the one that you should be parallel processing.

Neal

Read only

0 Likes
1,311

Hi Neal,

thanks for the reply.

In case in the selection screen, material is not given, then all the performs will be executed for all the material under a plant. All the performs will execute for more time.

i have another doubt like, if i have created a table with plant and material combination and calling the RFC FM inside that. If my internal table has 1000 material, then 1000 update tasks will be created? or it will lead to any run time error.

Read only

Former Member
0 Likes
1,311

Nice thinking, of using parallel processing. There are some standard program example for parallel processing , go to SE38 and search with SPTA* or *SPTA*.

One more suggestion would be to create function modules(check the types) and use the ABAP key  word 'Starting New Task' when calling the FM.

Once I faced situation like yours and I used it.

Regards,

Asad

Read only

0 Likes
1,311

Hi Mohammad,

I have ready made code for parallel processing after searching few posts and blogs. All i want to know

1)how to build the main loop table, which has that rfc with starting new task.

2) if i send the selection screen data to that update fm it will be called once and there is no use of parallel processing in that.

3)If i have created a table with plant and material combination and calling the update FM inside that. If my internal table has 1000 material, then 1000 update tasks will be created? or it will lead to any run time error.

can someone, help on this.

Read only

0 Likes
1,311

Hi Neeraj ,

                    You call the loop inside the FM. I think based on your requirement you should better design a no of update FM not just one. If you dont get any work process empty , I think the system will wait for one. I may be able to share some code that I wrote.

Regards,

Asad

Read only

0 Likes
1,311

That is way cool!  I always did mine by creating jobs and then monitoring for the jobs to complete.  Sounds like your method is much better.

Read only

Former Member
0 Likes
1,311

So, Suppose I had a process that was going to do a list of steps to a list of sales orders.  I'd get the list of sales orders.  Partition the list into N sets then give each set to a different process.  Is that what you wanted to know?

Neal

Read only

former_member576008
Active Participant
0 Likes
1,311

Hi,

I was able to complete the parallel processing logic. It was designed in material level logic.

In debugging I can see more the RFC FM called more than once.

Now how can I validate when its executed in background and the number parallel process running.

Kindly let me know.

Regards,

Neeraj