Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
14%
200 - 500 GB
32%
500 - 800 GB
4%
800 - 1200 GB
4%
1200 - 1500 GB
11%
1500 - 2000 GB
14%
> 2000 GB
21%
Total votes: 28

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 23rd October 2018, 07:23
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
Number of Function calls exceeds maximum
Baan: ERP LN 6.1 FP11 (Infor ERP 10.5)
C/S: None/Unknown

Hi,

I have issue on my calculation program. When i run a session, then prompt the message "Fatal error: Number of Function calls exceeds maximum of 500 stack entriesries. Please refer my attached file for more details. Please advise.
Attached Images
File Type: png BW Message.png (13.9 KB, 23 views)
Reply With Quote
  #2  
Old 23rd October 2018, 14:24
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,135
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I would debug the code and see what is causing it to continually call a function.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #3  
Old 24th October 2018, 09:15
günther günther is offline
Guru
 
Join Date: Jan 2002
Location: Ehingen, Germany
Posts: 577
günther is on a distinguished road
Baan: IVc4 - DB: Informix - OS: HP-UX
I would write a log file, run the session and see later what happens.
Reply With Quote
  #4  
Old 26th October 2018, 04:54
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
Quote:
Originally Posted by mark_h View Post
I would debug the code and see what is causing it to continually call a function.
Hi, thanks for your reply. Below is my code.


Code:
function calculate.long.bar()
{	
	countlongbar = 0
	longbarlength = 0
	longbarsection.f = long.sect.f
	longbarsection.t = long.sect.t


		select count(tccus024.lgth):count.lgth, tccus024.sect
		from tccus024
		where tccus024.sect inrange {:longbarsection.f} and {:longbarsection.t} and tccus024.tqty > 0
		group by tccus024.sect
		selectdo
			sect.no = tccus024.sect	
			countlongbar = countlongbar + 1
			longbarsection.f = long.sect.f
			longbarsection.t = long.sect.t
			longbarlength = long.lgth - 15		|add -15 (6.9.18)

			|******* Update Cut List Table (Wastage) **************
			select tccus025.*
			from tccus025 for updatea
			where tccus025.sect = :ssection  and tccus025.pono = :position
			selectdo
				ret = dal.change.object("tccus025")
				dal.set.field("tccus025.wstg", mmbalance)
				ret = dal.save.object("tccus025")
				commit.transaction()
			endselect

			reloop()
			
		selectempty		
			message("Successful!")
			update.planned.order()
			check.balance.short.bar()
			generate.wh.order.lines()
			start.session(MODAL_OVERVIEW, "tccus0125m000", "", "")
			stop()
		endselect
}


function reloop()
{		
	sect.no.1 = sect.no

	select tccus024.*
	from tccus024
	where tccus024.tqty > 0 and tccus024.sect = :sect.no.1  and tccus024.lgth <= :longbarlength
	order by tccus024.lgth desc as set with 1 rows
	selectdo
	selectempty	
		select count(tccus024.lgth):count.lgth
		from tccus024
		where tccus024.sect = :sect.no.1 and  tccus024.tqty > 0
		group by tccus024.sect
		selectdo

			if (count.lgth > 0) then
				select tccus024.*
				from tccus024
				where tccus024.sect = :sect.no.1 and tccus024.tqty > 0
				selectdo
				endselect
	
				if long.lgth < tccus024.lgth then
					message("Order length is shorter than short length.")
					stop()
				else				
					countlongbar = countlongbar + 1
					longbarsection.f = long.sect.f
					longbarsection.t = long.sect.t
					longbarlength = long.lgth - 15	|add -15 (6.9.18)

					|******* Update Cut List Table (Wastage) **************
					select tccus025.*
					from tccus025 for update
					where tccus025.sect = :ssection  and tccus025.pono = :position
					selectdo
						ret = dal.change.object("tccus025")
						dal.set.field("tccus025.wstg", mmbalance)
						ret = dal.save.object("tccus025")
						commit.transaction()
					endselect

					reloop()
				endif
			else
				message("Successful!")
				update.planned.order()
				check.balance.short.bar()
				generate.wh.order.lines()
				start.session(MODAL_OVERVIEW, "tccus0125m000", "", "")
				stop()
			endif
		
		selectempty

			|******* Update Cut List Table (Wastage) **************
			select tccus025.*
			from tccus025 for update
			where tccus025.sect = :ssection  and tccus025.pono = :position
			selectdo
				ret = dal.change.object("tccus025")
				dal.set.field("tccus025.wstg", mmbalance)
				ret = dal.save.object("tccus025")
				commit.transaction()
			endselect

			if use.off.cut = tcyesno.yes then
				update.planned.order()
				check.balance.short.bar()
				calculate.off.cut()
			else
				update.planned.order()
				check.balance.short.bar()
				calculate.long.bar()
			endif
		endselect

	endselect

	get.code()

	ssection = tccus024.sect

	|***** Include Cut Loss (14.9.18) *****
	|**20mm
	if formwork.code = "LE" or formwork.code = "BHH" or formwork.code = "BHV" or formwork.code = "BHX" or 
	   formwork.code = "BHA" or formwork.code = "BHB" or formwork.code = "BHC" or formwork.code = "BHD" or 
	   formwork.code = "BHE" or formwork.code = "BHF" or formwork.code = "BHG" or formwork.code = "BHH" or 
           formwork.code = "BXC" or formwork.code = "LA" or formwork.code = "SP" or formwork.code = "BHC" then			
		slength = tccus024.lgth + 20
	
	|**70mm
	else if  formwork.code = "LAE" then		
		slength = tccus024.lgth + 70

	|**150mm
	else if  formwork.code = "LM" then		
		slength = tccus024.lgth + 150
	
	|**4mm
	else
		slength = tccus024.lgth + 4	| add +4 (6.9.18)
	endif
	endif
	endif

	


	slength.1 = tccus024.lgth
	squty = tccus024.tqty
	allocatedqty = tccus024.gqty	|tccus024.oqty

	longs = longbarlength						| assign long bar balance to a new variable longs
	
	iw = longs / slength						| use long bar balance to divide then we will get how many qty can produce

	if round(iw,0,0) = 0 then
		countlongbar = countlongbar + 1
		longbarsection.f = long.sect.f
		longbarsection.t = long.sect.t
		longbarlength = long.lgth

		|******* Update Cut List Table (Wastage) **************
		select tccus025.*
		from tccus025 for update
		where tccus025.sect = :ssection  and tccus025.pono = :position
		selectdo
			ret = dal.change.object("tccus025")
			dal.set.field("tccus025.wstg", mmbalance)
			ret = dal.save.object("tccus025")
			commit.transaction()
		endselect
	
		select tccus024.*
		from tccus024
		where tccus024.tqty > 0 and tccus024.sect = :sect.no.1  and tccus024.lgth <= :longbarlength
		order by tccus024.lgth desc as set with 1 rows
		selectdo
			reloop()
		selectempty
			sect.no.1 = sect.no.1
			countlongbar = countlongbar + 1
			longbarsection.f = long.sect.f
			longbarsection.t = long.sect.t
			longbarlength = long.lgth			
			reloop()
		endselect
	endif


	select max(tccus025.pono):posi
	from tccus025
	where tccus025.sect <> ""
	selectdo
		position = posi + 10
	selectempty
		position = 10
	endselect	

	
	mmbalance = 0							| use to store long bar balance
	
	temp = 0							| use to store the actual length of produce qty times short length

	balance = 0							| use to store if the short lgth still have balance qty after produce
	
	if (iw > squty) then
		balance = 0 						| set to zero
		newquty = squty						| set new qty = short lgth balance qty
		temp = slength * round(newquty,0,0)			| short lgth * new qty
		mmbalance = longs - temp				| current long bar balance - temp
		iw = newquty						| new short bar lgth able produce qty to new qty
	else
		balance = squty - round(iw,0,0)				| new short lgth balance qty
		temp = slength * round(iw,0,0)				| total produce short lgth
		mmbalance = longs - temp				| update long bar balance = current long bar balance - temp
	endif	

	|******* Update balance qty and temp total back to table **************
	select tccus024.*
	from tccus024 for update
	where tccus024.sect = :ssection and tccus024.lgth = :slength.1
	selectdo
		ret = dal.change.object("tccus024")		
		dal.set.field("tccus024.sect", ssection)
		dal.set.field("tccus024.lgth", str$(slength.1))
		dal.set.field("tccus024.tqty", str$(balance))				
		ret = dal.save.object("tccus024")
		commit.transaction()	
	endselect
		
	if balance = 0 then
		select tccus024.*
		from tccus024 for update
		where tccus024.sect = :ssection and tccus024.lgth = :slength.1
		selectdo
			ret = dal.change.object("tccus024")
			dal.set.field("tccus024.nqty", str$(balance))		
			ret = dal.save.object("tccus024")
			commit.transaction()	
		endselect
	endif

	|******* Insert Cut List Table **************
	select tccus025.*
	from tccus025 for update
	where tccus025.sect = :ssection  and tccus025.pono = :position
	selectdo
	
		ret = dal.change.object("tccus025")
		
		dal.set.field("tccus025.sect", ssection)
		dal.set.field("tccus025.slen", str$(slength.1))
		dal.set.field("tccus025.csle", str$(round(iw,0,0)))
		dal.set.field("tccus025.clle", str$(countlongbar))
		dal.set.field("tccus025.lbal", str$(mmbalance))
		dal.set.field("tccus025.olen", str$(long.lgth))
		dal.set.field("tccus025.ocut", tcyesno.no)
		dal.set.field("tccus025.wstg", 0)

		ret = dal.save.object("tccus025")
		commit.transaction()

	selectempty
		ret = dal.new.object("tccus025")
		
		dal.set.field("tccus025.pono", position)
		dal.set.field("tccus025.sect", ssection)
		dal.set.field("tccus025.slen", str$(slength.1))
		dal.set.field("tccus025.csle", str$(round(iw,0,0)))
		dal.set.field("tccus025.clle", str$(countlongbar))
		dal.set.field("tccus025.lbal", str$(mmbalance))
		dal.set.field("tccus025.olen", str$(long.lgth))
		dal.set.field("tccus025.ocut", tcyesno.no)
		dal.set.field("tccus025.wstg", 0)
				
		ret = dal.save.object("tccus025")
		commit.transaction()	
	endselect

	if (mmbalance = 0) then
		countlongbar = countlongbar + 1
		longbarsection.f = long.sect.f
		longbarsection.t = long.sect.t
		longbarlength = long.lgth
	
		select tccus024.*
		from tccus024
		where tccus024.tqty > 0 and tccus024.sect = :sect.no.1  and tccus024.lgth <= :longbarlength
		order by tccus024.lgth desc as set with 1 rows
		selectdo
			reloop()
		selectempty
			sect.no.1 = sect.no.1
			countlongbar = countlongbar + 1
			longbarsection.f = long.sect.f
			longbarsection.t = long.sect.t
			longbarlength = long.lgth

			|******* Update Cut List Table (Wastage) **************
			select tccus025.*
			from tccus025 for update
			where tccus025.sect = :ssection  and tccus025.pono = :position
			selectdo
				ret = dal.change.object("tccus025")
				dal.set.field("tccus025.wstg", mmbalance)
				ret = dal.save.object("tccus025")
				commit.transaction()
			endselect

			reloop()
		endselect
		
	else
		longbarsection.f = long.sect.f
		longbarsection.t = long.sect.t
		longbarlength = mmbalance
		prcm.notify("tccus024.refresh")

		reloop()
	endif
}
Reply With Quote
  #5  
Old 26th October 2018, 04:55
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
Quote:
Originally Posted by günther View Post
I would write a log file, run the session and see later what happens.
Hi, thanks for your reply. Below is my code.

Code:
function calculate.long.bar()
{	
	countlongbar = 0
	longbarlength = 0
	longbarsection.f = long.sect.f
	longbarsection.t = long.sect.t


		select count(tccus024.lgth):count.lgth, tccus024.sect
		from tccus024
		where tccus024.sect inrange {:longbarsection.f} and {:longbarsection.t} and tccus024.tqty > 0
		group by tccus024.sect
		selectdo
			sect.no = tccus024.sect	
			countlongbar = countlongbar + 1
			longbarsection.f = long.sect.f
			longbarsection.t = long.sect.t
			longbarlength = long.lgth - 15		|add -15 (6.9.18)

			|******* Update Cut List Table (Wastage) **************
			select tccus025.*
			from tccus025 for updatea
			where tccus025.sect = :ssection  and tccus025.pono = :position
			selectdo
				ret = dal.change.object("tccus025")
				dal.set.field("tccus025.wstg", mmbalance)
				ret = dal.save.object("tccus025")
				commit.transaction()
			endselect

			reloop()
			
		selectempty		
			message("Successful!")
			update.planned.order()
			check.balance.short.bar()
			generate.wh.order.lines()
			start.session(MODAL_OVERVIEW, "tccus0125m000", "", "")
			stop()
		endselect
}


function reloop()
{		
	sect.no.1 = sect.no

	select tccus024.*
	from tccus024
	where tccus024.tqty > 0 and tccus024.sect = :sect.no.1  and tccus024.lgth <= :longbarlength
	order by tccus024.lgth desc as set with 1 rows
	selectdo
	selectempty	
		select count(tccus024.lgth):count.lgth
		from tccus024
		where tccus024.sect = :sect.no.1 and  tccus024.tqty > 0
		group by tccus024.sect
		selectdo

			if (count.lgth > 0) then
				select tccus024.*
				from tccus024
				where tccus024.sect = :sect.no.1 and tccus024.tqty > 0
				selectdo
				endselect
	
				if long.lgth < tccus024.lgth then
					message("Order length is shorter than short length.")
					stop()
				else				
					countlongbar = countlongbar + 1
					longbarsection.f = long.sect.f
					longbarsection.t = long.sect.t
					longbarlength = long.lgth - 15	|add -15 (6.9.18)

					|******* Update Cut List Table (Wastage) **************
					select tccus025.*
					from tccus025 for update
					where tccus025.sect = :ssection  and tccus025.pono = :position
					selectdo
						ret = dal.change.object("tccus025")
						dal.set.field("tccus025.wstg", mmbalance)
						ret = dal.save.object("tccus025")
						commit.transaction()
					endselect

					reloop()
				endif
			else
				message("Successful!")
				update.planned.order()
				check.balance.short.bar()
				generate.wh.order.lines()
				start.session(MODAL_OVERVIEW, "tccus0125m000", "", "")
				stop()
			endif
		
		selectempty

			|******* Update Cut List Table (Wastage) **************
			select tccus025.*
			from tccus025 for update
			where tccus025.sect = :ssection  and tccus025.pono = :position
			selectdo
				ret = dal.change.object("tccus025")
				dal.set.field("tccus025.wstg", mmbalance)
				ret = dal.save.object("tccus025")
				commit.transaction()
			endselect

			if use.off.cut = tcyesno.yes then
				update.planned.order()
				check.balance.short.bar()
				calculate.off.cut()
			else
				update.planned.order()
				check.balance.short.bar()
				calculate.long.bar()
			endif
		endselect

	endselect

	get.code()

	ssection = tccus024.sect

	|***** Include Cut Loss (14.9.18) *****
	|**20mm
	if formwork.code = "LE" or formwork.code = "BHH" or formwork.code = "BHV" or formwork.code = "BHX" or 
	   formwork.code = "BHA" or formwork.code = "BHB" or formwork.code = "BHC" or formwork.code = "BHD" or 
	   formwork.code = "BHE" or formwork.code = "BHF" or formwork.code = "BHG" or formwork.code = "BHH" or 
           formwork.code = "BXC" or formwork.code = "LA" or formwork.code = "SP" or formwork.code = "BHC" then			
		slength = tccus024.lgth + 20
	
	|**70mm
	else if  formwork.code = "LAE" then		
		slength = tccus024.lgth + 70

	|**150mm
	else if  formwork.code = "LM" then		
		slength = tccus024.lgth + 150
	
	|**4mm
	else
		slength = tccus024.lgth + 4	| add +4 (6.9.18)
	endif
	endif
	endif

	


	slength.1 = tccus024.lgth
	squty = tccus024.tqty
	allocatedqty = tccus024.gqty	|tccus024.oqty

	longs = longbarlength						| assign long bar balance to a new variable longs
	
	iw = longs / slength						| use long bar balance to divide then we will get how many qty can produce

	if round(iw,0,0) = 0 then
		countlongbar = countlongbar + 1
		longbarsection.f = long.sect.f
		longbarsection.t = long.sect.t
		longbarlength = long.lgth

		|******* Update Cut List Table (Wastage) **************
		select tccus025.*
		from tccus025 for update
		where tccus025.sect = :ssection  and tccus025.pono = :position
		selectdo
			ret = dal.change.object("tccus025")
			dal.set.field("tccus025.wstg", mmbalance)
			ret = dal.save.object("tccus025")
			commit.transaction()
		endselect
	
		select tccus024.*
		from tccus024
		where tccus024.tqty > 0 and tccus024.sect = :sect.no.1  and tccus024.lgth <= :longbarlength
		order by tccus024.lgth desc as set with 1 rows
		selectdo
			reloop()
		selectempty
			sect.no.1 = sect.no.1
			countlongbar = countlongbar + 1
			longbarsection.f = long.sect.f
			longbarsection.t = long.sect.t
			longbarlength = long.lgth			
			reloop()
		endselect
	endif


	select max(tccus025.pono):posi
	from tccus025
	where tccus025.sect <> ""
	selectdo
		position = posi + 10
	selectempty
		position = 10
	endselect	

	
	mmbalance = 0							| use to store long bar balance
	
	temp = 0							| use to store the actual length of produce qty times short length

	balance = 0							| use to store if the short lgth still have balance qty after produce
	
	if (iw > squty) then
		balance = 0 						| set to zero
		newquty = squty						| set new qty = short lgth balance qty
		temp = slength * round(newquty,0,0)			| short lgth * new qty
		mmbalance = longs - temp				| current long bar balance - temp
		iw = newquty						| new short bar lgth able produce qty to new qty
	else
		balance = squty - round(iw,0,0)				| new short lgth balance qty
		temp = slength * round(iw,0,0)				| total produce short lgth
		mmbalance = longs - temp				| update long bar balance = current long bar balance - temp
	endif	

	|******* Update balance qty and temp total back to table **************
	select tccus024.*
	from tccus024 for update
	where tccus024.sect = :ssection and tccus024.lgth = :slength.1
	selectdo
		ret = dal.change.object("tccus024")		
		dal.set.field("tccus024.sect", ssection)
		dal.set.field("tccus024.lgth", str$(slength.1))
		dal.set.field("tccus024.tqty", str$(balance))				
		ret = dal.save.object("tccus024")
		commit.transaction()	
	endselect
		
	if balance = 0 then
		select tccus024.*
		from tccus024 for update
		where tccus024.sect = :ssection and tccus024.lgth = :slength.1
		selectdo
			ret = dal.change.object("tccus024")
			dal.set.field("tccus024.nqty", str$(balance))		
			ret = dal.save.object("tccus024")
			commit.transaction()	
		endselect
	endif

	|******* Insert Cut List Table **************
	select tccus025.*
	from tccus025 for update
	where tccus025.sect = :ssection  and tccus025.pono = :position
	selectdo
	
		ret = dal.change.object("tccus025")
		
		dal.set.field("tccus025.sect", ssection)
		dal.set.field("tccus025.slen", str$(slength.1))
		dal.set.field("tccus025.csle", str$(round(iw,0,0)))
		dal.set.field("tccus025.clle", str$(countlongbar))
		dal.set.field("tccus025.lbal", str$(mmbalance))
		dal.set.field("tccus025.olen", str$(long.lgth))
		dal.set.field("tccus025.ocut", tcyesno.no)
		dal.set.field("tccus025.wstg", 0)

		ret = dal.save.object("tccus025")
		commit.transaction()

	selectempty
		ret = dal.new.object("tccus025")
		
		dal.set.field("tccus025.pono", position)
		dal.set.field("tccus025.sect", ssection)
		dal.set.field("tccus025.slen", str$(slength.1))
		dal.set.field("tccus025.csle", str$(round(iw,0,0)))
		dal.set.field("tccus025.clle", str$(countlongbar))
		dal.set.field("tccus025.lbal", str$(mmbalance))
		dal.set.field("tccus025.olen", str$(long.lgth))
		dal.set.field("tccus025.ocut", tcyesno.no)
		dal.set.field("tccus025.wstg", 0)
				
		ret = dal.save.object("tccus025")
		commit.transaction()	
	endselect

	if (mmbalance = 0) then
		countlongbar = countlongbar + 1
		longbarsection.f = long.sect.f
		longbarsection.t = long.sect.t
		longbarlength = long.lgth
	
		select tccus024.*
		from tccus024
		where tccus024.tqty > 0 and tccus024.sect = :sect.no.1  and tccus024.lgth <= :longbarlength
		order by tccus024.lgth desc as set with 1 rows
		selectdo
			reloop()
		selectempty
			sect.no.1 = sect.no.1
			countlongbar = countlongbar + 1
			longbarsection.f = long.sect.f
			longbarsection.t = long.sect.t
			longbarlength = long.lgth

			|******* Update Cut List Table (Wastage) **************
			select tccus025.*
			from tccus025 for update
			where tccus025.sect = :ssection  and tccus025.pono = :position
			selectdo
				ret = dal.change.object("tccus025")
				dal.set.field("tccus025.wstg", mmbalance)
				ret = dal.save.object("tccus025")
				commit.transaction()
			endselect

			reloop()
		endselect
		
	else
		longbarsection.f = long.sect.f
		longbarsection.t = long.sect.t
		longbarlength = mmbalance
		prcm.notify("tccus024.refresh")

		reloop()
	endif
}
Reply With Quote
  #6  
Old 26th October 2018, 08:49
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,070
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
Quote:
When i run a session, then prompt the message "Fatal error: Number of Function calls exceeds maximum of 500 stack entries.
Refer to - Known limits
Quote:
Bshell
maximum string buffer size is 4K – be careful when concatenating strings with '&' sign
maximum function stack depth is 75
The online version here is old and from the latest programmer's manual -
Quote:
Known limits
Reports
sorting doubles correct to 6 decimal places
Report TIV < 1101: maximum of 255 fields on a report (including array elements)
Report TIV >= 1101: maximum of 512 fields on a report (including array elements)
Bshell
maximum function stack depth is 500

Bic
maximum 255 arguments per function
maximum 32K variables per compilation
maximum BRANCH of 32K (BRANCH refers to the amount of generated code per function, including macros etc.)
You can also use the Debug Bshell to figure out the issue -
Quote:
Bshell resources
debug_level DEBUG_LEVEL
SHOW_TRACE 040000000 dbgstack Show stack traces.

Bshell command line options
dbgstack -dbgstack Set the SHOW_TRACE flag in the debug_level resource.
So basically you have to change your code.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao

Last edited by NPRao : 26th October 2018 at 09:22.
Reply With Quote
  #7  
Old 27th October 2018, 06:55
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
Quote:
Originally Posted by NPRao View Post
Refer to - Known limits

The online version here is old and from the latest programmer's manual -

You can also use the Debug Bshell to figure out the issue -

So basically you have to change your code.
Hi, thanks for your advise. May i know which part coding i need to change? Thanks.
Reply With Quote
  #8  
Old 27th October 2018, 20:20
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,070
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
TracyLee,

I'm not a Functional developer to understand and fix your code.
Some parts of your code did not make sense to me -
Quote:
start.session(MODAL_OVERVIEW, "tccus0125m000", "", "")
stop()
Why you need to start a session in the selectempty and stop it or why do you need so many reloop() calls.

I suggested ways to debug and figure out the root cause of the issue and you know your Functional/business requirements, unless you can explain better others cannot help you out to rewrite your code efficiently.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #9  
Old 29th October 2018, 08:23
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 147
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
Quote:
Originally Posted by tracylee View Post
Hi, thanks for your advise. May i know which part coding i need to change? Thanks.
You're using a recursion in function reloop().
Quote:
Bshell maximum function stack depth is 500
I think this points to a problem with too many nested loops. Maybe you do have an endless loop condition in your data. (So your function reloop() is recursively called again and again. The stack is flooded, till the error is being raised,)
Reply With Quote
  #10  
Old 29th October 2018, 13:27
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,135
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Andreas is correct - looks like no matter what you are always hitting reloop continuously.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
  #11  
Old 30th October 2018, 22:54
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 531
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
You are hitting recursion.. So basically till 500 levels it can handle recursion, it seems
Reply With Quote
  #12  
Old 31st October 2018, 02:33
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
Quote:
Originally Posted by Ajesh View Post
You are hitting recursion.. So basically till 500 levels it can handle recursion, it seems
Thanks for your reply. If more than 500 level, then how to solve it? Please advise. Thanks.

Last edited by tracylee : 31st October 2018 at 02:40.
Reply With Quote
  #13  
Old 31st October 2018, 13:49
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,135
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I am not exactly sure what you are doing but you will need to figure out away to get a return in the code somewhere. It the BOM program we basically track the make item, position and level we are on when we go to the next level. This allows us to return to find the position in the bom we where at when we increased the level. We use arrays and a level counter to track where it is. Not sure if you have that kind of source code you can go look at.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #14  
Old 31st October 2018, 15:04
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 531
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
Quote:
Originally Posted by tracylee View Post
Thanks for your reply. If more than 500 level, then how to solve it? Please advise. Thanks.
Whats the Requirement? There is no easy fixes, i have to say..
Reply With Quote
  #15  
Old 8th November 2018, 09:33
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,356
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Quote:
Originally Posted by tracylee View Post
Thanks for your reply. If more than 500 level, then how to solve it? Please advise. Thanks.

Dynamic SQL is the solution here.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create an AFS pralash AFS/DDC/OLE: Function servers 7 11th October 2018 17:13
Error while opening opening purchase order naga ch Tools Administration & Installation 6 17th June 2016 23:42
How to call AFS in sp24? PV Ramone AFS/DDC/OLE: Function servers 4 2nd September 2008 12:06
xml question steveauckly Tools Development 4 27th July 2004 11:41


All times are GMT +2. The time now is 02:52.


©2001-2018 - Baanboard.com - Baanforums.com