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 22nd August 2017, 20:25
Altrev Altrev is offline
Junior Member
 
Join Date: Oct 2009
Posts: 21
Altrev is on a distinguished road
Baan: BaaB IV c4 - DB: Informix - OS: HP-UX 11
Question Sales Quotation AFS continue opens a wrong subsession

Hi,

I have two BaaN companies, and each company opens a different Quotation Lines subsession due to setup when opening from the menu:

Company A: When using tdsls1101m000 and add lines the subsession tdsls1102s000 - Maintain Quotation Lines is opened

Company B: When using tdsls1101m000 and add lines the subsession tdsls1107s000 - Maintain Quotation Lines (Wholesale) is opened

But I'm using AFS to generate Sales Quotation, and being in Company B when I used the continue option the subsession opened is tdsls1102s000 instead of tdsls1107s000.

stpapi.continue.process( "tdsls1101m000", error )

Even if before I set the sub process to tdsls1107s000:
stpapi.handle.subproc( "tdsls1101m000", "tdsls1107s000","add")

Could someone have an idea why the continue process in AFS opens a different subsession that when using the Run Program?

Thanks in advance for your help
Reply With Quote
  #2  
Old 22nd August 2017, 23:41
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,929
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Not familiar with the sessions, but it is always possible that in 4c4 in api mode it skips some code that makes the tdsls1107s000 sub-session kick off instead of tdsls1102s000. Do you own source code to where you can debug it?
__________________
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
  #3  
Old 23rd August 2017, 02:05
Altrev Altrev is offline
Junior Member
 
Join Date: Oct 2009
Posts: 21
Altrev is on a distinguished road
Baan: BaaB IV c4 - DB: Informix - OS: HP-UX 11
Hi Mark,
Unfortunately I do not have the source code of the api.
Thanks!
Reply With Quote
  #4  
Old 23rd August 2017, 15:05
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,929
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Well then that makes it a lot tougher - it could really be anything. I know in one session I had set something called boi.call before the function server would work. The only thing I can suggest is to run ttstpcreatdll to just create the DLL and just see what is in it. The other thing you could possible try is to do a save or an update on tdsls1101m000 before the continue. One of those commands might trigger a piece of code to set the subsession for the continue.

stpapi.update(tdsls1101m000", 1, error)
stpapi.handle.subproc( "tdsls1101m000", "tdsls1107s000","add")stpapi.continue.process( "tdsls1101m000", error )

Of course I assume in company b if you run tdsls1101m000 by hand and hit continue it launches the tdsls1107s000 using the data that would run thru the AFS code.
__________________
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
  #5  
Old 23rd August 2017, 16:02
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
What version are you on? Also, moved the thread to the correct forum - AFS/DDC/OLE - Function servers
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
Sponsored Links
  #6  
Old 24th August 2017, 05:13
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,929
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Bhushan - in the other forum it was 4c4. I was leaving it there just in case somebody on the functional side might know something to check.
__________________
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
  #7  
Old 29th August 2017, 19:16
Altrev Altrev is offline
Junior Member
 
Join Date: Oct 2009
Posts: 21
Altrev is on a distinguished road
Baan: BaaB IV c4 - DB: Informix - OS: HP-UX 11
Hi,
Here is an Update, the continue process still opens the wrong session, this is what I had to do in order to open the correct session using API for Sales Quotations:

Before accessing the API I had to select the record table by code:

select tdsls001.*
from tdsls001
where tdsls001.refa = :quote.item
order by tdsls001.refa
selectdo
sq.num = tdsls001.qono
endselect

with this select the following API works fine without the continue.process

tdslsf1101m000.handle.sub.process(prog.name$,"send")
tdslsf1101m000.put.Quotation_Number( sq.num )
ret = tdslsf1101m000.find(error.msg)

tdslsf1101m000.handle.sub.process("tdsls1107s000","add")
tdslsf1107s000.put.Quotation_Number( sq.num )
tdslsf1107s000.put.Position_Number.tdsls002.pono( sq.line.num )
tdslsf1107s000.put.Alternative( sq.altn )
tdslsf1107s000.put.Item( quote.item )
tdslsf1107s000.put.Planned_Delivery_Date( quote.date )
tdslsf1107s000.put.Ordered_Quantity( quote.qty )
tdslsf1107s000.put.Tax_Code( tax.code )
ret = tdslsf1107s000.insert( 1, error.msg )

sq.line.num = tdslsf1107s000.get.Position_Number.tdsls002.pono()

tdslsf1107s000.end(error.msg)

tdslsf1101m000.end(error.msg)

Thanks Mark and Bhushan for your help.

Regards,
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
AFS Sales Order Insert eric.dizon AFS/DDC/OLE: Function servers 3 11th June 2014 23:46
Sales Quotation for a generic business partner & With Text newconsultant Distribution, Transportation & Warehousing 1 14th June 2011 15:02
Sales Quotation - Margin Control Bond007 Distribution, Transportation & Warehousing 0 6th June 2011 05:57
Recalculation of sales quotation from budget s_amrutkar7 Distribution, Transportation & Warehousing 0 16th December 2009 08:30
AFS Sales Invoice -Baan 5 Predator AFS/DDC/OLE: Function servers 4 30th March 2008 15:51


All times are GMT +2. The time now is 19:39.


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