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
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 2nd December 2002, 17:12
arunprasath's Avatar
arunprasath arunprasath is offline
Member
 
Join Date: Feb 2002
Location: Delhi
Posts: 90
arunprasath is on a distinguished road
Baan: Baan IV c4 - DB: MS Sql - OS: Windows NT
Handling Two subsessions after single insert.

Hi,
When I put values in the session tfacr1110s000 and then say stpapi.insert(), it starts two subsessions one by one.
The First subsession is tfacr1102s000(Maintain One time customer) and after we enter values into this session and when we close this session, the next subsession pops up. This subsession is tfacr1111s000. so I need to enter values into this subsession and then close this session.

I have created two handles for these two session in the main session.
As soon as I say insert in the parent session tfacr1110s000, the first subsession pops up and as I close this session after insertion, I am able to see the next subsession that has been started in the background .(using ps).
now when I use the line stpapi.put.field("") into this second session, I am getting a fatal error.

index 0 out of dims[1] 3
Cannot continue

I hope AFS can take care of two subsessions that will be popped up after a single insert.

Here is my code
After putting values in the session tfacr1110s000,
stpapi.handle.subproc("tfacr1110s000","tfacr1102s000","add")
stpapi.handle.subproc("tfacr1110s000","tfacr1111s000","add")
ret=stpapi.insert("tfacr1110s000",true,error.code)

Now first subsession starts up.
stpapi.put.field("tfacr1102s000","tfacr202.ccty",str$(" "))
stpapi.insert("tfacr1102s000",true,neglect)
stpapi.end.session("tfacr1102s000")

Now in the background I am able to see the next subsession started.
here in this line below,when I try to put values, I am getting this fatal error.
stpapi.put.field("tfacr1111s000","tfgld102.leac",str$(ledgeraccount))

Where did I went wrong?
or is this again a bug with Baan?
thanks for your suggestions
regards,
s.arun prasath
__________________
<< Never Never Never give up!!>>
Reply With Quote
  #2  
Old 2nd December 2002, 17:46
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
What I think....

What happens when you do it manually? After inputing data into tfacr1110s000 and hitting insert does it then start the two sub-sessions one at time. By this I mean does tfacr1102s000 start, then you do your insert, exit and return to tfacr1110s000. Then the tfacr1111s000 sub-session starts. If so I suspect it is a bug in Baan. It almost looks like if the session is running in the background it does not wait for data in one before continuing and starting the next session.

I am not sure if you can do this, but maybe use kill on the second session. Then do the first sub-session to finish it. Then back in the main session (tfacr1110s000) run a zoom or something else to re-launch the second session to process the data thru it.

Just a guess.

Mark
Reply With Quote
  #3  
Old 2nd December 2002, 17:53
arunprasath's Avatar
arunprasath arunprasath is offline
Member
 
Join Date: Feb 2002
Location: Delhi
Posts: 90
arunprasath is on a distinguished road
Baan: Baan IV c4 - DB: MS Sql - OS: Windows NT
Thanks mark for your reply.

Actually, when I run manually,
1.the first subsession pops up and
2.I do a save and exit and then
3.the second subsession pops up
4. I again insert data and then save and exit
5.now I come back to the main session.

I have tried killing the second subsession mark, by issuing stpapi.handle.subsession("","","kill").
even then, after I close the first subsession the second session is still running.
so I tried issuing a stpapi.end.session("tfacr1111s000")
even then, this session is not getting closed.

so I am unable to go back to the main session and then start the second subsession with continue option.

I think I should kill this session programmatically, using kill command.
so donno what to do..
How many bugs does this AFS have??
__________________
<< Never Never Never give up!!>>
Reply With Quote
  #4  
Old 2nd December 2002, 18:29
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Hmm..

That makes we wonder, which session actually controls the tfacr1111s000. Hmm - went and glanced at the script for tfacr1110. It looks like the session tfacr1102s000 is zoomed to from tfacr1110s000, which would make the session controlled by tfacr1110s000. But the tfacr1111s000 session is declared in a pragma used statement, which means it is probably a back ground session. This means the "add" and "kill" would not work since the session is not controlled by tfacr1110s000. I would expect that if you just ended tfacr1110s000 right after tfacr1102s000 sub-session it would also end. Like this:
Code:
stpapi.handle.subproc("tfacr1110s000","tfacr1102s000","add")
ret=stpapi.insert("tfacr1110s000",true,error.code)
stpapi.put.field("tfacr1102s000","tfacr202.ccty",str$(" "))
stpapi.insert("tfacr1102s000",true,neglect) 
stpapi.end.session("tfacr1102s000")
stpapi.end.session("tfacr1110s000")

But then I do not know how you would go about getting data input into the tfacr1111s000 sub-session. We do not have any code for the tfacr1111s000 session so I really do not know how you would control that sub-session. Hoping this helps you.

As for how many errors are in the AFS - well probably about as many programmers as Baan has, times the number of coding techniques you could use, times the number of lines of code in Baan. It probably is not that bad, but the coding is not standard all the way through all modules, so sometimes the sessions are not very friendly to the AFS style of coding.

Mark
Reply With Quote
  #5  
Old 3rd December 2002, 15:48
arunprasath's Avatar
arunprasath arunprasath is offline
Member
 
Join Date: Feb 2002
Location: Delhi
Posts: 90
arunprasath is on a distinguished road
Baan: Baan IV c4 - DB: MS Sql - OS: Windows NT
Mark,

After executing
stpapi.handle.subproc("tfacr1110s000","tfacr1102s000","add")
ret=stpapi.insert("tfacr1110s000",true,error.code)
stpapi.put.field("tfacr1102s000","tfacr202.ccty",str$(" "))
stpapi.insert("tfacr1102s000",true,neglect)
stpapi.end.session("tfacr1102s000")
stpapi.end.session("tfacr1111s000")

the session tfacr1111s000 is still running in the background.
I have tried ending the parent session stpapi.end.session("tfacr1110s000"). even then this session tfacr1111s000 is still running.

so I found the process id of the session tfacr1111s000 and then killed it.
then I am closing the parent sessions tfacr1110s000 and also tfgld1101m000. I could come back to the session again.
when I come back again, the simultaneous popping up of two sessions is not there. Only one session is coming.(tfacr1111s000).
I could handle this.
I know using kill is not advised. but at times, I gotto...
thanks again
__________________
<< Never Never Never give up!!>>
Reply With Quote
Sponsored Links
  #6  
Old 3rd December 2002, 16:02
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Yep..

As long as it works, use it. I have done things to get these function servers to work, that really was not recommended - but I do not worry about it. Just remember that new releases of these sessions may require changes to the function servers.

Mark
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 insert record in type3 form via AFS??? alibaba AFS/DDC/OLE: Function servers 5 17th September 2004 05:19
Item code disappears before insert tin2210 AFS/DDC/OLE: Function servers 2 11th May 2004 10:53
Connect to multiple informix databases within a single informix instance fdhfdh Operating Systems & Databases 6 25th March 2004 17:31
migration from multi fin multi log to single fin single log company veyant Tools Administration & Installation 1 25th July 2003 16:06
Re: Berechtigungen mittels DEM für Subsessions Kai's Forum Users Deutsches Forum 1 7th August 2000 01:00


All times are GMT +2. The time now is 03:49.


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