prademaker
12th July 2002, 11:25
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:
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!
mark_h
12th July 2002, 15:08
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
prademaker
12th July 2002, 15:48
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
mark_h
12th July 2002, 16:01
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
prademaker
12th July 2002, 16:08
Here's the library
mark_h
12th July 2002, 16:36
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:
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
Youp2001
18th July 2002, 11:56
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
prademaker
22nd July 2002, 11:24
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