2009 Dec 23 2:03 PM
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
2009 Dec 23 2:54 PM
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).
2009 Dec 23 2:54 PM
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).
2009 Dec 24 4:55 AM
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
2009 Dec 24 10:46 AM
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.
2010 Jan 28 10:31 AM
2010 Jan 28 12:22 PM
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
2010 Jan 28 1:56 PM
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
2010 Jan 28 1:57 PM
2010 Jan 28 2:54 PM
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