‎2008 Aug 19 9:41 AM
Hello Gurus,
according to my requirement , I am faced with a situation in which I had to use Submit and return inside a loop.The internal table would have 500-1000 entries.
Is it advicable to use Submit and return inside a loop.Will there be any performance issues.Kindly let me know.
Regards,
Raghu
‎2008 Aug 19 9:43 AM
Hi,
It is not at all recomended to use SUBMIT and Retyurn inside a loop.
If we consider the internal operation of the SUBMIT .......RETURN statement we will see, each time the system encounter SUBMIT , it stores all the system variable to system buffer and jumps to the called report program. agin when it encounters RETURNS it comes back and popped up the values of system variables it stored earlier.
In your the same will happen for more than 500 times.
for further details, check
http://help.sap.com/saphelp_nw70/helpdata/EN/9f/db9dd035c111d1829f0000e829fbfe/content.htm
Regards,
anirban
‎2008 Aug 19 9:43 AM
Hi,
It is not at all recomended to use SUBMIT and Retyurn inside a loop.
If we consider the internal operation of the SUBMIT .......RETURN statement we will see, each time the system encounter SUBMIT , it stores all the system variable to system buffer and jumps to the called report program. agin when it encounters RETURNS it comes back and popped up the values of system variables it stored earlier.
In your the same will happen for more than 500 times.
for further details, check
http://help.sap.com/saphelp_nw70/helpdata/EN/9f/db9dd035c111d1829f0000e829fbfe/content.htm
Regards,
anirban
‎2008 Aug 19 9:44 AM
Do you think executing a submit inside a loop of max 1000 entries is good.
It is a question you should not have to ask.
‎2008 Aug 19 9:55 AM
Hi Martin,
I had my doubts thats why I posted question....I guess purpose of a forum is to help people in resolving such issues
‎2008 Aug 19 10:20 AM
I think it depend on the complexity of the launched program.
If each launch need a lot of time to execute maybe you can try to launch it in background or with jobs.
Moreover be carefull of lock problems when launching a lot of submit.
It is true that it is a little bit strange to launch 1000 times the same program, but if you have no other choise, if it is a simple prog and if you launch it few times I think you can do it.
‎2008 Nov 04 7:11 PM
I was reading this post and did not feel the question is answered well with pros and cons of submitting a program within a loop. There may be situations where one needs to submit programs insider a loop. When one posts such question, he expects a professional answer with technical issues/limitations clearly mentioned.
Please open this thread and I invite anyone with clear answer to this post a reply.
Main issue one would think about submitting a program inside a loop is memory repletion. Is this an issue?
If the called program is writing into a spool, and if there is a fear of spool overflowing, there are ways to write into different spool each time the program is called.
Please comment the real pros/cons of submitting a program inside a loop.
Appreciate any help.
‎2008 Nov 04 7:19 PM
I don't see anything wrong with a SUBMIT in a LOOP? 500-1000 iterations may be a bit much, but then what are the alternatives?
Rob
‎2008 Nov 04 7:24 PM
I am not talking about 1000-3000, but a few hundreds (100-200).
‎2008 Nov 04 7:35 PM
Well, it still seems like a lot, but again, what's the alternative?
Rob
‎2008 Nov 04 7:41 PM
Rob,
Still, we are not talking about 'why' this is discouraged one way or other. Please advice with specific technical reasons why submitting programs within a loop is not encouraged if at all it is not encouraged. We will discuss about alternatives later.
Thanks
‎2008 Nov 04 7:46 PM
Sounds like you have your own question here. If you open up your own thread and mark it as a question, that will encourage others to respond.
Rob
‎2008 Nov 04 9:30 PM
HI Raghu
Can you please let me know why u want to call submit and return inside loop.
If you can explain us the exact requirement, may be we can provide alternatives.
cheers!!!