Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 12th July 2002, 10:25
prademaker's Avatar
prademaker prademaker is offline
Member
 
Join Date: Nov 2001
Location: Ternat, Belgium
Posts: 35
prademaker is on a distinguished road
Baan: B IV c4 - DB: Oracle - OS: Unix
Unhappy AFS - session hangs

Trying to develop some skills in using AFS (BaaN IV c4)
Created a dll based upon tdsls0510m000 and used it in a new session. Here's the code:
Code:
function read.main.table()
{ 
	domain tcpric 		my.price
	domain tcmcs.str80	my.mess

	select	tdsls041.*
	from	tdsls041  
	where   tdsls041._index1= {:orno.f, :pono.f}
	order by tdsls041._index1
	selectdo
		f0510m000.put.Customer( strip$(tdsls041.cuno))
		f0510m000.put.item( strip$(tdsls041.item ))
		f0510m000.put.itm.cntr(strip$( tdsls041.cntr ))
		f0510m000.put.unit(strip$(tdsls041.cuqs ))
		f0510m000.put.qana( tdsls041.oqua )
		f0510m000.continue( my.mess  )
		message( my.mess)
		my.price = f0510m000.get.Price( )
		message( str$(my.price))
	endselect 
}
Session "hang's" on f0510m000.continue( my.mess ).

Could anyone please look at this code and tell me what I'm doing wrong?

Your help is much appreciated!
__________________
Peter Rademaker

You can lead a horse to water,
but you can't make him drink.
Reply With Quote
  #2  
Old 12th July 2002, 14:08
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Source Code

If you own source code then I would recommend that you put tdsls0510m000 in debug mode and see where it is actually hanging. We do not use this session but I noticed that after inputing a qty and hitting tab the rest of the form is completed. I do not have source, but I suspect that it could be that the form is completed in the when.field.changes event of the quantity. If this is the case it could be the cause of the problem. Hopefully you have source and can debug it.

I searched the support site but did not see any mention of this problem for this session. So you may have to log a case.

Another thing you might try is to use the tdsls0510s000 sub-session instead. This session might work where the main session failed.

Just a few suggestions. Good Luck!

Mark
Reply With Quote
  #3  
Old 12th July 2002, 14:48
prademaker's Avatar
prademaker prademaker is offline
Member
 
Join Date: Nov 2001
Location: Ternat, Belgium
Posts: 35
prademaker is on a distinguished road
Baan: B IV c4 - DB: Oracle - OS: Unix
No source code available

Thanks Mark for your reply. Unfortunately we don't have the source code. Tried to use tdinv0510s000, results where the same.

However while debugging I noticed something strange. While putting values to the fields session tdsls0510s000 is in the list of running processes. Once the script is on the "continue"-line the process is gone, just as it was killed.
I've added a screencopy. Hope this might ring a bell....

Peter
Reply With Quote
  #4  
Old 12th July 2002, 15:01
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Hmm...

I have seen sessions do that before, but usually it was because of something I have done. Could you attach the library from tdsls0510m000? I would like to see what commands it found to put in the library.

Mark
Reply With Quote
Sponsored Links
  #5  
Old 12th July 2002, 15:08
prademaker's Avatar
prademaker prademaker is offline
Member
 
Join Date: Nov 2001
Location: Ternat, Belgium
Posts: 35
prademaker is on a distinguished road
Baan: B IV c4 - DB: Oracle - OS: Unix
Here's the library
Attached Files
File Type: zip function server dll tdslsf0510m000.zip (1.8 KB, 37 views)
__________________
Peter Rademaker

You can lead a horse to water,
but you can't make him drink.
Reply With Quote
  #6  
Old 12th July 2002, 15:36
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
On 4c3

Two things you may want to try:

(1) Try a f0510m000.save() before doing the continue. See if that might work. The save will execute some of the field events.

(2) I did a quick test on my system in my test function server:
Code:
        stpapi.put.field("tdsls0510m000","cuno", "001222")
	stpapi.put.field("tdsls0510m000","item", "PLM7031633")
	stpapi.put.field("tdsls0510m000","unit", "EA")
	stpapi.put.field("tdsls0510m000", "qana","20")
	stpapi.continue.process( "tdsls0510m000",msg  )
	message( msg)
	stpapi.get.field("tdsls0510m000","price",my.price)

When I did the continue the session did not abort or just close up. Of course since we do not use sls the price is always zero. From checking the idents on the session ours is 98/03/10, so you may have something different.

Mark
Reply With Quote
  #7  
Old 18th July 2002, 10:56
Youp2001's Avatar
Youp2001 Youp2001 is offline
Senior Member
 
Join Date: Oct 2001
Location: Netherlands
Posts: 121
Youp2001 is on a distinguished road
Baan: Baan IVc4, BaanERP 5.0c - DB: Oracle - OS: Unix
Works fine for me

Hi all,

I tested Mark's script and this just works fine on our system (Baan IV c4 sp07). Only thing that should be added is a stpapi.end.session at the end to remove tdsls0510m000 from the process list.

You should check your system if a recent version of the standard program (stpstandard) and api handler (stpapihand) is installed. Check the Baan support site for a recent version if needed.

I noticed that when using older versions of the standard program / api handler you will often get unexpected problems.

Success,

Youp
Reply With Quote
  #8  
Old 22nd July 2002, 10:24
prademaker's Avatar
prademaker prademaker is offline
Member
 
Join Date: Nov 2001
Location: Ternat, Belgium
Posts: 35
prademaker is on a distinguished road
Baan: B IV c4 - DB: Oracle - OS: Unix
Session doesn't hang anymore

Thanks guys,

I've tried the code as given by Mark, however the same result. No result I mean..

I was a bit puzzled when Youp told he was on c4 SP7 and didn't have the problem. We are also on c4 SP7!.
So we decided to install the latest solutions for ttstpapihand.
(I admit that this GOOD advice hase been given numerous times in this forum).
After having gone trough a loooooong list, everything works fine.

Thank you all guys, you've helped me a lot. Another piece of evidence that this forum really works!

Regards,

Peter
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
Handle sub session in AFS SriksAdi AFS/DDC/OLE: Function servers 1 28th July 2004 14:36
AFS - problem running session in a job aobrien AFS/DDC/OLE: Function servers 15 2nd April 2004 14:51
Calling subsession from subsession in AFS hangs fmorais AFS/DDC/OLE: Function servers 2 10th February 2003 22:36
Try to create AFS for session ttadv6420m000 gous99 AFS/DDC/OLE: Function servers 6 9th January 2003 18:27
AFS: How to Handle a session which gives two reports? Satish Nandeti AFS/DDC/OLE: Function servers 1 14th August 2002 14:44


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


©2001-2017 - Baanboard.com - Baanforums.com