hujielilu
28th December 2002, 03:33
Dear ALL:
I use BaanIV tools, and met a problem, how to use the
recursion in program script?
I write the following:

functions:
function read.tibom010()
{
select tibom010.*,tiitm001.kitm
from tibom010,tiitm001
where tibmo010._index1 ={:item}
and tibom010.mitm refers to tiitm001
selectdo
if tiitm001.kitm=tckitm.manufacture then
item = timod010.mitm
read.tibom010()
else
|do some thing
endif
endselect
}


but when I calll the funtion, has the error, and don't allow to use recursion. What is the reason.
Which kind brother can help me solve the problem?


Thanks a lot!

isimeon
28th December 2002, 08:37
Hi,


Recursion is not implemented in BAAN. Search the forum for posts about recursion.

Regards

Renegade
28th December 2002, 09:04
yep.. even while compilation, u get the message that recursion is not implemented.

evertsen
28th December 2002, 16:43
Check this code Recursion is possible (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1315)

mark_h
29th December 2002, 04:19
I am not sure that the recursion in the thread will be helpful. I have not see a recursive subroutine for a specific table like tibom010. If someone has one for tibom010 I hope they post it. As to your problem I would recommend looking at how some of the Baan programs read through the BOM010 table. Using Baan source code probably will provide you with the quickest solution.

Mark

evertsen
29th December 2002, 07:23
Could you post the complete code of the script?

Ev

evesely
30th December 2002, 15:35
I have used recursion on this very table. If you can post your source and perhaps the compiler output, that would help in the diagnosis.

hujielilu
2nd January 2003, 04:22
Dear All:
Happy new year!!!
thanks isimeon,Renegade,evertsen,mark_h and evesely.

Dear evesely:
Maybe you can give me a single sample function about how to use recusion to read tibom010 ?

Regards
Hujie