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

Independent processing of elements inside internal table

Former Member
0 Likes
1,203

Hello friends,

Here is the scenario,

I have a internal table with 10 records(indepentent) , and i need to process them .The processing of one record doesnt have any influence on the another . When we go for loop , the performance issue is that , the 10 th record has to wait until the 9 records get processed even though there is no dependency on the output.

Could some one tell a way out to improve the performance..

If i am not clear with the question , i would explain it still clearer...

A internal table has 5 numbers , say( 1,3,4,6,7)

we are trying to find square of each number ,,,

If it is a loop the finding of suare of 7 has to wait until 6 is getting completed and it is waste of time ...

This is related to parallel processing , I have refered to parallel processing documents,But I want to do this conceptually .

Comradely,

K.Sibi

1 ACCEPTED SOLUTION
Read only

Rui_Dantas
Active Contributor
0 Likes
1,088

Hello,

I think you have answered this yourself: in parallel sessions you would call a function that receives each record as a parameter (and processes it).

8 REPLIES 8
Read only

Rui_Dantas
Active Contributor
0 Likes
1,089

Hello,

I think you have answered this yourself: in parallel sessions you would call a function that receives each record as a parameter (and processes it).

Read only

0 Likes
1,088

Hello Rui,

Thanks for the reply . But I am not using conventional procedural paradigm but Object orientedness...I am having a method which is performing this action .What am I supposed to do in that regard.

Comradely,

K.Sibi

Read only

0 Likes
1,088

These parallel tasks are a special type of RFC, and I don't think you can do it with method.

You can, of course, call a function from within a method but I'm not sure how you would code the perform to receive the results (though I'm pretty sure it can be done). I would say that that is a question for the ABAP Objects forum.

Another option for parallel processing is calling several background jobs. Don't know if it would apply to what you are trying to do.

Read only

Former Member
0 Likes
1,088

To close the thread I have marked it as answered.

Read only

Former Member
0 Likes
1,088

answered ??????

I can not see an answer, I does not make sense to have parallel RFC on one and the same internal table.

Is there a result written to the internal table, i.e a field modified? Something must be the result of your processing, where

do you store it?

I guess you should try to create separate internal tables which are independent

Read only

0 Likes
1,088

Hello Siegfried Boes,

Thanks for your reply .

I will keep it simple.

I am having some records inside the internal table and they are going to do same jobs , like post_material(), get_material(),,,,just for an example .

Now if i have 10 materials with me why must the 10 th material wait till all the 9 materials before it have been processed?

Comradely,

K.Sibi

Edited by: sibi k kanagaraj on Jan 28, 2010 2:57 PM

Read only

Former Member
0 Likes
1,088

I have got a reply , hope it solves the problem

Read only

Former Member
0 Likes
1,088

you keep it too simple, 10 materials etc will not be split, you need thousands.

But still your task is very unclear, if you have s substantial work load, then distribute it into different internal tables and process them in parallel. The task of splitting is a problem by itself. And you should keep track what was processed successfully and so on.

Overall you should note that parallelization is sometimes which wastes recources and should not be done, if many people use the resouces simultaneously (which is the typical SAP scenario). It should be confined to the cases where really a lot on data must be processed and a good response time is mandatory. Additionally resources for other users must be available.

Siegfried