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

User login

Frontpage Sponsor


As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
Handover everything to System Integrator from drawing BP till implementation of ERP
Hire more inhouse skilled & capable IT Resource to work directly with SI
Rely on SI Architects/Consultants
Total votes: 4

Baanboard at LinkedIn

Reference Content

Thread Tools Display Modes
Old 19th August 2019, 03:07
cherokee's Avatar
cherokee cherokee is offline
Join Date: Jan 2003
Location: Montreal, Canada
Posts: 306
cherokee is on a distinguished road
Baan: Baan IVc3 A&D - DB: Oracle - OS: IBM AIX
Cool AFS runs once second time fails

Hello all,

I have a stack of orders to be printed, I use an AFS, it prints the first order, when loops for the next order does not work, no error message on the error.message var.

Note: I have changed the sort order in the stack, to print bottom to top and it prints the first instance but not the next one(it only works the first time no matter what order I want to print), is not data related.

for i = 1 to reqs.index
                spool.device = <MY_ASCI_DEVICE>
                l.orno = pur.req.stack(1,i;9)
                spool.fileout = "c:\temp\"&logname$&"_req_"&strip$(shiftl$(l.orno))&".txt"
Any inputs are welcome.

Thanks in advance
Carlos Gonzalez CPIM,CSCP
Reply With Quote
Old 19th August 2019, 12:39
andreas.toepper andreas.toepper is offline
Senior Member
Join Date: Jun 2004
Posts: 184
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
I'm using LN 10.2.1. When I did call a print session serveral times (i.e. in a loop) I had to "export" spool.device to the session controlled by AFS.

So I would try somethink like this:

stpapi.put.field("timrpc421m000", spool.fileout, "c:\temp\"&logname$&"_req_"&strip$(shiftl$(l.orno))&".txt")

This will set spool.fileout of the session timrpc421m000. You've set spool.fileout for your AFS session.
Reply With Quote
Sponsored Links
Old 19th August 2019, 14:11
mark_h's Avatar
mark_h mark_h is offline
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,446
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Hmmm... - never tried it that way. I always exported(AFS session) and imported spool.fileout(baan session).

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
Old 19th August 2019, 14:12
cherokee's Avatar
cherokee cherokee is offline
Join Date: Jan 2003
Location: Montreal, Canada
Posts: 306
cherokee is on a distinguished road
Baan: Baan IVc3 A&D - DB: Oracle - OS: IBM AIX
Thumbs up

Thank you Andreas for your help, it did work, really appreciated. Just to add to your solution, spool.device has to between quotes. (compiles without quotes but does not work) So, as any other stpapi.put.field, it has to be "spool.device".

stpapi.put.field("timrpc421m000", "spool.fileout", "c:\temp\"&logname$&"_req_"&strip$(shiftl$(l.orno))&".txt")
Carlos Gonzalez CPIM,CSCP
Reply With Quote

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
Is there a way to write a function that is triggered every time a session/report runs tmannais Tools Development 9 25th February 2019 02:33
AFS waiting timed out (frozen) jp.aalders AFS/DDC/OLE: Function servers 4 20th December 2011 20:48
Baan Session Runs slower when runs First time baantechy Tools Development 6 15th November 2006 16:56
Maintain Outbound in AFS fails for Order Type: "Collect Order" FoxZapper AFS/DDC/OLE: Function servers 7 3rd November 2005 14:45
AFS fails when huge data is loaded arunprasath AFS/DDC/OLE: Function servers 9 5th December 2002 14:39

All times are GMT +2. The time now is 14:56.

©2001-2018 - -