‎2006 Sep 08 10:39 AM
Hi..
Can I submit the same program inside a program?
Can I call the same subroutine inside a subroutine ?
and
Can I call the same FM inside a FM?
Please give me reasons also.
Thank You
‎2006 Sep 08 10:40 AM
‎2006 Sep 08 10:41 AM
Yes you can do that.
There is no reason but just the business logic implementation.
Regards
Nishant
Message was edited by: Nishant Rustagi
‎2006 Sep 08 10:42 AM
Hi
Regarding calling same sub-routine inside the sub-routine and similarly with FM...the answer is yes.
But, there should be a <b>termination condition well defined</b>, so that, it doesnt go into a infinite loop...
Regards,
Raj
‎2006 Sep 08 10:42 AM
yes, theoritically its allowed.but practically Its not allowed to write it.
but how you will come out of that ?? if for any case,its not able to come out your program will go to a TIME OUT dump.so you should well define your code in such a case.
but personally i feel we have to avoid that,instead you can think of other alternatives.
regards
srikanth
Message was edited by: Srikanth Kidambi
‎2006 Sep 08 10:43 AM
Hello Subhash,
Yes, you can do the below but you need to be very careful about it as it might just end up in a infinite loop ...where you just keep on calling the ABAP/Routine/FM again and again !!
Just for information this type of nesting is called circular reference.
Regards
Anurag
Message was edited by: Anurag Bankley
‎2006 Sep 08 10:48 AM
Hi,
Function called itself is recursive in nature and
needs exit condition.
subroutine and submit can be called within same
perform and program but it may give rise to
lot of inconsistency and short dump.
Regards
Amole