Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
33%
Installation Wizard into new VRC
39%
Manual into existing VRC
6%
Manual into new VRC
22%
Total votes: 49

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 28th June 2008, 18:09
grzegorz grzegorz is offline
Senior Member
 
Join Date: Sep 2001
Location: Zabrze, Poland
Posts: 155
grzegorz is on a distinguished road
Baan: BaaN IV c4, Baan5c, ERP LN (at last) - DB: Tbase, Oracle - OS: SCO, SUSE, AIX. W2K3
Update PO lines with AFS

I have a strange problem with AFS for Purchase Order lines. My need is to update purchase price (field tdpur041.pric, i think). Should be simple, so I tried like this:

Code:
    stpapi.put.field( "tdpur4102m000" , "tdpur041.orno" , str$(my.orno) )
    stpapi.put.field( "tdpur4102m000" , "tdpur041.pono" , str$(my.pono) )
    loc.res = stpapi.find( "tdpur4102m000" , err.msg2 )
    stpapi.put.field( "tdpur4102m000", "tdpur041.pric" , str$(my.prip) )
    stpapi.enum.answer( "tdpur4102m000" , "tdpur41096" , tcyesno.yes )
    loc.res = stpapi.update( "tdpur4102m000" , 1 , err.msg )
    if not isspace(err.msg) then
      stpapi.recover( "tdpur4102m000" , err.msg2 )
      stpapi.end.session( "tdpur4102m000" , err.msg2 )
      return(1)
    endif
    stpapi.end.session( "tdpur4102s000" , err.msg2 )

Everything seems be fine, error messages are empty and stpapi.update returns with "1", but price is not updated. Of course, if I do the same manually, price change is accepted.
In afs.log I can't find any hint. Here is my log:

Code:
LOGGING STARTED
01-05-2007
120->get.fields
120<-get.fields0tdpur041.orno1tdpur041.pono1tdpur041.cprj1tipcs020.dsca0tdpur041.citt1form.aitc1tdpur041.item1tdpur041.cntr1itm.dsca0tdpur041.opol1tdpur041.revi1tdpur041.cwar1tcmcs003.dsca0disp.txta0tdpur041.cuqp1tdpur041.oqua1tdpur041.cupp0tdpur041.pric1tdpur041.plev0tdpur041.disc1tdpur041.ldam1tdpur041.dlev0ccur.dscb0tdpur041.amta1tdpur041.ddta1alt.date1back.t0order.t0disp.suno0disp.nama0tdpur041.orno0form.aitc0tdpur041.pono0tdpur041.cprj0tdpur041.item0tdpur041.cntr0itm.dsca0tdpur041.btsp1tdpur041.lsel1tdpur041.clot1tdpur041.sdsc1tdpur045.copr0tdpur041.qual1itm.stoc0itm.ordr0itm.allo0tdpur041.cono0tdpur041.posi0tdpur041.sorn0tdpur041.spon0tdpur045.torn0tdpur045.tpon0tdpur041.srvo0tdpur041.srvp0back.t0order.t0disp.suno0disp.nama0tdpur041.orno0tdpur041.pono0tdpur041.cprj0tdpur041.item0tdpur041.cntr0itm.dsca0tdpur041.cpla1tdpur041.cact1cact.desc0tdpur041.cspa1cspa.desc0tdpur041.cstl1cstl.desc0tdpur041.ccco1tppdm100.desc0tdpur041.cvat1tcmcs036.dsca0tdpur041.pacn1desc.ledger0tdpur041.dim11dim1.desc0tdpur041.dim21dim2.desc0tdpur041.dim31dim3.desc0tdpur041.dim41dim4.desc0tdpur041.dim51dim5.desc0form.aitc0back.t0order.t0disp.suno0disp.nama0labledim10labledim20labledim30labledim40labledim50
>tdpur4102m000 put.field:tdpur041.orno 300205
>tdpur4102m000 put.field:tdpur041.pono 10
>tdpur4102m000 Find
120->def.find
120<-def.find01
<tdpur4102m000 record found (1)
>tdpur4102m000 enum.answer tdpur41096:1
120->enum.answertdpur410961
120<-enum.answer0
>tdpur4102m000 put.field:tdpur041.pric 16
>tdpur4102m000 update
120->modify.set+save
120<-modify.set+save0
<tdpur4102m000 
>tdpur4102m000 end.session
120->end.program
120<-end.program1
This is a fragment of larger script, with many other AFS calls. Everything works fine, except the piece above. Can somebody help me with that?
__________________
Best regards
Grzegorz .
Reply With Quote
  #2  
Old 30th June 2008, 19:58
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,095
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Okay - don't know if tdpur5106s000 plays a roll on your system or not. The below works for me. Is there a reason you end tdpur4102s000 and not tdpur4102m000? You can also try stpapi.save. Another option is stpapi.update mode of 0 or false, followed by stpapi.save. Those are a couple of options I have tried before. Not sure if this helps.

Code:
	stpapi.put.field( "tdpur4102m000" , "tdpur041.orno" , "437980" )
	stpapi.put.field( "tdpur4102m000" , "tdpur041.pono" , "1" )
	rc = stpapi.find( "tdpur4102m000" , err )
	stpapi.handle.subproc("tdpur5106s000", "tdpur4102m000", "ADD")
	stpapi.put.field( "tdpur4102m000", "tdpur041.pric" , str$(150.00) )
|    stpapi.enum.answer( "tdpur4102m000" , "tdpur41096" , tcyesno.yes )
	rc = stpapi.update( "tdpur4102m000" , 1 , err )
	stpapi.continue.process("tdpur5106s000",err)
	stpapi.end.session("tdpur5106s000",err)
	stpapi.end.session( "tdpur4102m000" , err )
__________________
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
  #3  
Old 2nd July 2008, 11:46
grzegorz grzegorz is offline
Senior Member
 
Join Date: Sep 2001
Location: Zabrze, Poland
Posts: 155
grzegorz is on a distinguished road
Baan: BaaN IV c4, Baan5c, ERP LN (at last) - DB: Tbase, Oracle - OS: SCO, SUSE, AIX. W2K3
Thank you for your answer. I also tried a lot of things before posting my problem here. And, the most inspiring part of it was your "mantra". So, problem is solved by upgrading to newer SP and Porting Set!
However, when one problem is solved, at least two new raise (as usual). So, now I ran into known issue with Maintain Receipt and freezing session tdilc4113s000. Before update it was working fine and now it hangs on first stpapi.put.field for tdilc4113s000.

I tried to use the trick with boi.call variable
Code:
boi.call = "tdboidll0011.Create"
But it does not help.
Other suggestions found on forum also did't help in my case.

So, I would like to ask, if somebody has a running solution with AFS for Maintain Receipt with ILC. If yes, then please post it and state, on which porting set and service pack does it work. Also I will be grateful for any updated information about how to solve problem with freezing session tdilc4113s000.

BTW: I'm on SP18 and port 6.1c.07.06 now.
__________________
Best regards
Grzegorz .
Reply With Quote
  #4  
Old 2nd July 2008, 15:08
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,095
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Sorry to say, but I had to add code to the Baan sessions to get them to work. I had to do this for service pack 18. Do you own source code? I had to use qkey to make a few changes to get things to work. I also had to do this for maintain approvals.
__________________
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
  #5  
Old 2nd July 2008, 15:17
grzegorz grzegorz is offline
Senior Member
 
Join Date: Sep 2001
Location: Zabrze, Poland
Posts: 155
grzegorz is on a distinguished road
Baan: BaaN IV c4, Baan5c, ERP LN (at last) - DB: Tbase, Oracle - OS: SCO, SUSE, AIX. W2K3
Oh, no!. I dont have access to source code. Now I'm just installing service packs up to 24 andwe will see if it helps.
My luck that i work on a development box and can freely play around with service packs and porting sets.
__________________
Best regards
Grzegorz .
Reply With Quote
  #6  
Old 2nd July 2008, 16:00
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,095
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Please let me know if it works. I might be able to remove the coding changes I made - that would be nice.
__________________
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
  #7  
Old 2nd July 2008, 16:07
grzegorz grzegorz is offline
Senior Member
 
Join Date: Sep 2001
Location: Zabrze, Poland
Posts: 155
grzegorz is on a distinguished road
Baan: BaaN IV c4, Baan5c, ERP LN (at last) - DB: Tbase, Oracle - OS: SCO, SUSE, AIX. W2K3
Of course, please be patient. SP24 won't be ready until tomorow.
__________________
Best regards
Grzegorz .
Reply With Quote
  #8  
Old 2nd July 2008, 16:50
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,095
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I am impressed - it takes us months to do a service pack.
__________________
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
  #9  
Old 3rd July 2008, 12:52
grzegorz grzegorz is offline
Senior Member
 
Join Date: Sep 2001
Location: Zabrze, Poland
Posts: 155
grzegorz is on a distinguished road
Baan: BaaN IV c4, Baan5c, ERP LN (at last) - DB: Tbase, Oracle - OS: SCO, SUSE, AIX. W2K3
So, for now we raised from SP18 on SP23. Problem with tdilc4113s000 is still not solved completely, but the session behaves slightly different. In SP18 the session froze after first stpapi.put.field("tdilc4113s000"...) call. Now the session stops for several seconds and goes on. But, if it comes to stpapi.insert( "tdilc4113s000"...) it freezes forever.
Program script looks like that:
Code:
stpapi.put.field("tdpur4120m000","tdpur045.reno",str$(loc.reno))
      stpapi.put.field("tdpur4120m000","tdpur045.orno",str$(orno))
      stpapi.put.field("tdpur4120m000","tdpur045.pono",str$(pono))
      loc.res = stpapi.find("tdpur4120m000",err.msg)
      if not isspace( err.msg ) or loc.res <> 1 then
         stpapi.end.session("tdpur4120m000", err.msg2)
         zonk()  |show error
        return
      endif
      boi.call = "tdboidll0011.Create"  | not helpful much
      stpapi.put.field("tdpur4120m000","tdpur045.diqu",str$(diqu))
      stpapi.put.field("tdpur4120m000","tdpur045.date",str$(date))
      stpapi.put.field("tdpur4120m000","tdpur045.dqua",str$(dqua))
      stpapi.update("tdpur4120m000",1,err.msg)
      stpapi.handle.subproc("tdpur4120m000","tdilc4113s000","add")
      if not isspace(err.msg) then
        stpapi.recover( "tdpur4120m000" , err.msg2 )
        stpapi.end.session("tdilc4113s000", err.msg2)
        stpapi.end.session("tdpur4120m000", err.msg2)
        zonk()
        return
      endif
      stpapi.put.field("tdilc4113s000", "tdilc402.clot",clot)
      stpapi.put.field("tdilc4113s000",tdilc402.date",str$(date))
      stpapi.put.field("tdilc4113s000", "tdilc402.qstr",str$(dqua))
      stpapi.put.field("tdilc4113s000", "tdilc402.qstc",str$(nqua))
      stpapi.insert("tdilc4113s000",1,err.msg)
      if not isspace(err.msg) then
        stpapi.recover("tdilc4113s000" , err.msg2 )
        stpapi.recover("tdpur4120s000" , err.msg2 )
        stpapi.end.session("tdilc4113s000", err.msg2)
        stpapi.end.session("tdpur4120m000", err.msg2)
        zonk()
       return
      endif
      stpapi.end.session("tdilc4113s000", err.msg2)
      stpapi.end.session("tdpur4120m000", err.msg2)

In AFSLOG there are some new messages in this case:
Code:
...  *** here is stpapi.put.field("tdilc4113s000","tdilc402.clot", clot )
56dll->serv (handle.subsessiontdilc4113s0002166)
tdilc4113s000waiting for prev cont.proc
    *** here the session freezes for 10 seconds
tdilc4113s000waiting timed out
>tdilc4113s000(167) put.field:tdilc402.clot          ASDWSWS 
   *** and it goes forward, then come other fields:
tdilc4113s000waiting for prev cont.proc
tdilc4113s000waiting timed out
>tdilc4113s000(167) put.field:tdilc402.date 733403
tdilc4113s000waiting for prev cont.proc
tdilc4113s000waiting timed out
>tdilc4113s000(167) put.field:tdilc402.qstr 100
tdilc4113s000waiting for prev cont.proc
tdilc4113s000waiting timed out
>tdilc4113s000(167) put.field:tdilc402.qstc 100

   *** here is a stpapi.insert call
>tdilc4113s000 insert
tdilc4113s000waiting for prev cont.proc
tdilc4113s000waiting timed out
156dll->serv (add.set+save167)
tdilc4113s000(167)-RUNNING:add.set+save 
  *** farewell and goodbye
Have you seen something like that? What "cont.proc" is the session waiting for? - there is no active cont.proc option there. And I have a question for Mark : can you describe what changes have you done in source code, maybe it helps to understand the flow of opreation in tdilc4113s000 better.
__________________
Best regards
Grzegorz .
Reply With Quote
  #10  
Old 3rd July 2008, 15:17
grzegorz grzegorz is offline
Senior Member
 
Join Date: Sep 2001
Location: Zabrze, Poland
Posts: 155
grzegorz is on a distinguished road
Baan: BaaN IV c4, Baan5c, ERP LN (at last) - DB: Tbase, Oracle - OS: SCO, SUSE, AIX. W2K3
Additional info: SP24 doesn't change the situation.
__________________
Best regards
Grzegorz .
Reply With Quote
  #11  
Old 3rd July 2008, 17:56
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,095
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Okay - I did notice in your code you have the stpapi.handle after the update - you should reverse these lines.
Code:
      stpapi.update("tdpur4120m000",1,err.msg)
      stpapi.handle.subproc("tdpur4120m000","tdilc4113s000","add")
First here is my code - note I always create receipt for all lines and then modify only the line that is needed. Second please note that I used qkey to modify source scripts.
Code:
function extern domain tcrcno create_receipt(	domain	tcrcno		receipt.number,
				domain  tcorno		purchase.order,
				domain	tcpono  	purchase.line,
				domain	tcqiv1		packingslip.qty,
				domain	tcqiv1		received.qty,
				domain	tcdate		received.date,
				domain	tdltc.clot	purchase.lot,
				domain	tcdate		purchaselot.date,
				domain	tcconv		conv.factor,
				domain	tccuni		purchase.unit,
				domain	tcitem		purchase.item,
				ref     string          msg())
{
	string	dummy(6)

| Creating a receipt always use 0 for the tdpur045.reno field.
	msg = ""
	stpapi.handle.subproc("tdpur4120m000","tdpur4224s000","add")
 	stpapi.put.field("tdpur4120m000","tdpur045.reno",str$(0))
 	rc = stpapi.change.view("tdpur4120m000",msg)
	if not isspace(msg) then
		stpapi.end.session("tdpur4120m000")
		return(receipt.number)
	endif

| Always use tdpur4224s000 to create receipt for all lines.
   	stpapi.put.field("tdpur4224s000","form.orno",str$(purchase.order))
  	stpapi.continue.process("tdpur4224s000",msg)
 	stpapi.end.session("tdpur4224s000")
	if not isspace(msg) and strip$(msg)<> "Process is gone" then
		stpapi.end.session("tdpur4120m000")
		return(receipt.number)
	endif
	msg = ""
	
| Try a pause to make sure receipt is completed.	
	suspend(3000)
| Get the receipt so you can use the modify receipt to update. the field.
 	stpapi.get.field("tdpur4120m000","tdpur045.reno",dummy)
	receipt.number = val(dummy)
	stpapi.end.session("tdpur4120m000")
	
| Verify this receipt number has this PO and line on it.
	select	tdpur045.reno
	from	tdpur045
	where	tdpur045._index6 = {:receipt.number,:purchase.order,:purchase.line}
	as set with 1 rows
	selectdo
	selectempty
		receipt.number = 0
	endselect
	if receipt.number = 0 then
		msg = "Receipt failed."
		return(0)
	endif
	
| Now go modify the new receipt.	
	modify_receipt(	receipt.number,
			purchase.order,
			purchase.line,
			packingslip.qty,
			received.qty,
			received.date,
			purchase.lot,
			purchaselot.date,
			conv.factor,
			purchase.unit,
			purchase.item,
			msg)
	return(receipt.number)
}
|******************************************************************************
|* API Code for modifying an existing receipt.
|******************************************************************************
function extern modify_receipt(	domain	tcrcno		receipt.number,
				domain  tcorno		purchase.order,
				domain	tcpono  	purchase.line,
				domain	tcqiv1		packingslip.qty,
				domain	tcqiv1		received.qty,
				domain	tcdate		received.date,
				domain	tdltc.clot	purchase.lot,
				domain	tcdate		purchaselot.date,
				domain	tcconv		conv.factor,
				domain	tccuni		purchase.unit,
				domain	tcitem		purchase.item,
				ref     string          msg())
{
		string	dummy(6), error_code(16)
	domain	tcorno	get.orno
	domain	tcpono	get.pono
	
	select	tiitm001.stgu, tiitm001.kitm
	from	tiitm001
	where	tiitm001._index1 = {:purchase.item}
	as set with 1 rows
	selectdo
	endselect
	
	msg = ""
	boi.call = "tdboidll0011.Create"
 	stpapi.put.field("tdpur4120m000","tdpur045.reno",str$(receipt.number))
  	stpapi.put.field("tdpur4120m000","tdpur045.orno",str$(purchase.order))
 	stpapi.put.field("tdpur4120m000","tdpur045.pono",str$(purchase.line))
	rc = stpapi.find("tdpur4120m000",msg)
	if not isspace(msg) or rc<>1 then
		stpapi.end.session("tdpur4120m000")
		return
	endif

| Prepare to handle lot controlled items.	
	if ((not isspace(purchase.lot) or conv.factor>1 or  purchase.unit <> tiitm001.stgu)
	and (tiitm001.kitm=tckitm.purchase or tiitm001.kitm = tckitm.manufacture))	then
		stpapi.handle.subproc("tdpur4120m000","tdilc4113s000","add")
	endif
	
	stpapi.put.field("tdpur4120m000","tdpur045.diqu",str$(packingslip.qty))
	stpapi.put.field("tdpur4120m000","tdpur045.date",str$(received.date))
	stpapi.put.field("tdpur4120m000","tdpur045.dqua",str$(received.qty))
	rc = stpapi.update("tdpur4120m000",1,msg)
	if not isspace(msg) or rc<>1 then
		if not isspace(purchase.lot) or conv.factor>1 then
			stpapi.end.session("tdilc4113s000")
		endif
		stpapi.end.session("tdpur4120m000")
		return
	endif

| Need to handle the conversion factor.
	if ((not isspace(purchase.lot) or conv.factor>1 or  purchase.unit <> tiitm001.stgu)
	and (tiitm001.kitm=tckitm.purchase or tiitm001.kitm = tckitm.manufacture))	then
		stpapi.put.field("tdilc4113s000", "tdilc402.clot",purchase.lot)
		stpapi.put.field("tdilc4113s000", "tdilc402.date",str$(purchaselot.date))
		stpapi.put.field("tdilc4113s000", "tdilc402.qstr",str$(received.qty*conv.factor))
		stpapi.put.field("tdilc4113s000", "tdilc402.qstc",str$(received.qty*conv.factor))
		rc = stpapi.insert("tdilc4113s000",1,msg)
		error_code = stpapi.get.mess.code("tdilc4113s000",msg)
		if strip$(error_code) = "tdilc40062" then
			msg = ""
		endif
		stpapi.end.session("tdilc4113s000")
	endif
 	stpapi.end.session("tdpur4120m000")
}

Second here is the code from tdpur4120m000:
Code:
|******************************************************************************
|* 20050418	Mark Holland	04/18/2005
|* Added boi variables and set g.sub.session for service pack changes.  These
|* changes allow the receipt afs programs to work.
|******************************************************************************
|* Script Type: 123
|******************************************************************************
|****************************** DECLARATION SECTION ***************************
declaration:
	table	ttdpur045	| Purchase Orders
	table	ttdpur975	| Maintain Approvals Date Tracking
| 20060821.st Add additional tables	
	table	ttdpur041	| Purchase Order lines
	table	ttiitm001	| Item master
	
| 20050418.st Added these variables
	extern  domain  tcmcs.str132    boi.call
	extern		long		boi.bqua.flag
	extern	domain	tcbool		g.sub.session	| 20050418.end
| 20060821.st Add additional variable
	extern	domain	tckitm		check.item.type
	extern	domain	tcqrd1		ordr.qty, bcko.qty
	|#pobj added by QKEY 3.70
	|#end add by QKEY

field.tdpur045.dqua:
before.input:
|20050418.st Added this if statement. Might need to modify this to check
| the calling session to make sure it was tdapi.
	if api.mode then
		g.sub.session = true
	endif

No changes were actually made in tdilc4113s000.
__________________
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
  #12  
Old 3rd July 2008, 18:18
grzegorz grzegorz is offline
Senior Member
 
Join Date: Sep 2001
Location: Zabrze, Poland
Posts: 155
grzegorz is on a distinguished road
Baan: BaaN IV c4, Baan5c, ERP LN (at last) - DB: Tbase, Oracle - OS: SCO, SUSE, AIX. W2K3
Thank you for your answer. The version I posted is one of many I tried, and stpapi.handle.subproc was already almost everywhere, before update, on top of whole function, after update, no change. I'm doing quit the same procedure, first I create receipt for all PO lines, then (its different than in your case, but it should not matter ) I remove those lines that are not in delivery. In the end I want to put quantities in delivered lines. Unfortunately I dont have source codes nor qkey, so I have to find another way (if any exists). Thank you again.
__________________
Best regards
Grzegorz .
Reply With Quote
  #13  
Old 7th July 2008, 09:56
grzegorz grzegorz is offline
Senior Member
 
Join Date: Sep 2001
Location: Zabrze, Poland
Posts: 155
grzegorz is on a distinguished road
Baan: BaaN IV c4, Baan5c, ERP LN (at last) - DB: Tbase, Oracle - OS: SCO, SUSE, AIX. W2K3
Problem is solved. I must have been blind!
It's true, that a variable "boi.call" must be set. The session tdilc4113 imports it from parent process (tdpur4120). And tdpur4120 imports it from my session and it seems that import function is called somewhere in before.program section. So, in my sequece:
Code:
stpapi.put.field("tdpur4120m000","tdpur045.reno",str$(loc.reno))
stpapi.put.field("tdpur4120m000","tdpur045.orno",str$(orno))
stpapi.put.field("tdpur4120m000","tdpur045.pono",str$(pono))
loc.res = stpapi.find("tdpur4120m000",err.msg)
boi.call = "tdboidll0011.Create"
session tdpur4120m000 is started with first stpapi.put.field. It imports boi.call, which is NOT SET at this moment. So, setting boi.call at the place I've done is simply TOO LATE.

So, I moved up the line with boi.call = "tdboidll0011.Create" before first stdapi.call , and the session tdilc4114s000 does not freeze anymore.
__________________
Best regards
Grzegorz .
Reply With Quote
  #14  
Old 26th October 2017, 04:18
kmcinc kmcinc is offline
Senior Member
 
Join Date: Feb 2003
Location: Canton, OH
Posts: 155
kmcinc is on a distinguished road
Baan: Triton, Baan IV, Baan V, ERP LN 6.1 - DB: Oracle, MS SQL, Informix - OS: Unix, Windows
I would like to add that variable 'boi.call' should be declared as 'extern'.
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
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Update field value i.e. not a form field through AFS! Ankita AFS/DDC/OLE: Function servers 12 18th May 2008 03:06
how to update marked fields through multiocc form in AFS justknowledge Tools Development 7 19th January 2007 06:30
Extension to sales order header being updatesd thru AFS or update table will work darpan Tools Development 4 16th April 2005 09:16
AFS to update Sales Order Line Discount Percentage DStroud AFS/DDC/OLE: Function servers 4 18th March 2005 14:59


All times are GMT +2. The time now is 22:08.


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