Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


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

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 9th May 2005, 21:27
steiner's Avatar
steiner steiner is offline
Junior Member
 
Join Date: Mar 2002
Posts: 3
steiner is on a distinguished road
Baan: B4c3 - DB: Oracle - OS: HPUinx
Question AFS for Matching Purchase Order Invoices

I'm writing an AFS to match purchase order invoices to receipts. The problem I'm having is handling cascaded child sessions. Specifically, executing a continue.process on session tfacp1110s000 starts the sub-session tfacp1130s000 which I can handle, but before I can handle it tfacp1130s000 starts it's own sub-session tfacp1131s000. So my function server hangs due to the lack of a handle for the tfacp1131s000. Has anyone else written an AFS to match purchase order invoices to receipts or handled this problem for another reason that is willing to share a solution?
steiner
Reply With Quote
  #2  
Old 10th May 2005, 13:35
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,114
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
We used Qkey in tfacp1131s000 to stop the session. I did not write this code but here is what we did.

Calling code:
Code:
	|------------------------------------------------------------
	| I'm using the free$ (baan system variable) to let some
	| sessions (tfacp1131s000, tfacp1133s000) know they were
	| called from this contractor api process. Each of these
	| sessions were compiled with Qkey overriding event calls.
	|------------------------------------------------------------
	free$ = "contractor.api"
             |bunch of code here that I cut to show what we did.

	| 5.5 tfacp1133s000 End
	stpapi.end.session(sess.acp1133) 
	
	| 4.2 tfacp1230s000 End
	stpapi.end.session(sess.acp1230) 

	stpapi.handle.subproc(sess.acp1110, sess.acp1130, "add")
	stpapi.continue.process(sess.acp1110, e.msg)
	e.msg = ""

	stpapi.handle.subproc(sess.acp1130, sess.acp1131, "add")
	stpapi.end.session(sess.acp1131) 

	stpapi.handle.subproc(sess.acp1130, sess.acp1140, "add")
	stpapi.application.option( sess.acp1130, 1, 0, e.msg )	| Approve button

And the qkey code in tfacp1131s000:
Code:
before.program:
	if free$ = "contractor.api" then
		end()
	else
		|#call
	endif

There are other wrapper programs that could be used besides qkey - RMCis also has a product. Plus there is the extend source code post by ~Vamsi in the code and utlities forum.
__________________
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
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
Subcontracting Purchase Order LittleJohn Manufacturing & Supply Chain 3 30th May 2005 05:01
AFS for Matching Purchase Order Invoices steiner Finance, Invoicing and Integration 2 9th May 2005 21:26
purchase order activity skipped rcitra Distribution, Transportation & Warehousing 8 21st February 2005 02:30
India Localization problem while making afs of Purchase Order crdeshpande AFS/DDC/OLE: Function servers 6 26th November 2003 10:25
Traceability of Purchase Invoices after running Process Delivered Purchase Orders Neal Matthews Finance, Invoicing and Integration 15 27th November 2001 12:12


All times are GMT +2. The time now is 21:47.


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