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
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 17th November 2016, 12:02
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 184
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
afs process result

hi,

I just need one help on how can i get the result from tdsls4201s000 process. this is a sales order copy, is there a get command to get the result order number which is the destination order?

thanks,
jojo
Reply With Quote
  #2  
Old 17th November 2016, 13:55
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,905
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Is it on the form somewhere? I am not familiar with the session myself.
__________________
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 17th November 2016, 14:07
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 184
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
hi mark,
thanks for reply. this session copy from an existing sales order and generate new sales order and then display a report showing source SO and new SO numbers. what i need is how to get the new SO number by using afs?

regards,
jojo
Reply With Quote
Sponsored Links
  #4  
Old 17th November 2016, 14:28
benito's Avatar
benito benito is offline
Guru
 
Join Date: Jan 2002
Location: Eastern US
Posts: 514
benito is on a distinguished road
Baan: ERPLn 10.2.1 / BaanIVc4 - DB: Oracle11/Informix - OS: Unix/Linux
if you just need the resulting order number, you can probably create a logic in the report to grab "orno.dest" variable.
Reply With Quote
  #5  
Old 17th November 2016, 14:58
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 184
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
hi,
thanks. i will try on this.

regards,
jojo
Reply With Quote
  #6  
Old 21st November 2016, 00:21
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,905
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
As a backup plan the other thing you can do is write the report to a file and read the file.
__________________
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 22nd November 2016, 04:54
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 184
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
hi mark,

thanks. thats exactly what i did but i'm thinking of a possibility of putting get command within the copy afs? have u tried this in any of your afs scripts? maybe i just don't know the right way to do it.

regards,
jojo
Reply With Quote
  #8  
Old 22nd November 2016, 06:42
manish_patel's Avatar
manish_patel manish_patel is offline
Senior Member
 
Join Date: Apr 2007
Location: Surat-->Bangalore, INDIA
Posts: 183
manish_patel is on a distinguished road
Baan: Baan IVc4, Baan 5.0 b - DB: Oracle 11g R2 - OS: HP-UX 11.31
Quote:
Originally Posted by jojovalenton View Post
hi mark,

thanks. thats exactly what i did but i'm thinking of a possibility of putting get command within the copy afs? have u tried this in any of your afs scripts? maybe i just don't know the right way to do it.

regards,
jojo
I think Get command will not work for this session as on clicking continue button, end.program executed automatically.

You can try to import "tdsls041.orno" or "tdsls040.pono"
__________________
Thanks & Regards,
Manish
Reply With Quote
  #9  
Old 22nd November 2016, 19:38
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,905
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
In difficult situations I use qkey for the session code. Then I can do things like export and import of variables to get what I need(I use if api.mode then do something). I mean I use the get command on some of the function servers I write to read fields - but if like Manish says the session ends once you save(or continue) and before you execute the get command it will not work. Does it get put in a table you could go read?

below is a quick snippet of code where I create a po and get the po number, but the session stays open in my case. You can also see a quick update that I write directly to a table since putting it on the form did not always work.
Code:
	rc = stpapi.save( "tdpur4101m000", msg )
	if(strip$(msg)<>"") then
		msg = sprintf$("Save PO: %s",msg)
		stpapi.end.session( "tdpur4101m000" )
		return(0)
	endif
	
	stpapi.get.field( "tdpur4101m000", "tdpur040.orno", some.field )
	created.po = val(some.field)
| IF buyer did not update correctly update it here.
	stpapi.get.field( "tdpur4101m000", "tdpur040.ccon", some.field )
	buyer = val(some.field)
	if buyer = 0 then
		db.retry.point()
		select	tdpur040.*
		from	tdpur040 for update
		where	tdpur040._index1 = {:created.po}
		as set with 1 rows
		selectdo
			tdpur040.ccon = po.buyer
			db.update(ttdpur040,db.retry)
		endselect
		commit.transaction()
	endif
__________________
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
  #10  
Old 23rd November 2016, 15:27
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 184
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
hi mark,
thanks. this is a nice script but i think it works after saving an afs create po.
regards,
jojo
Reply With Quote
  #11  
Old 27th November 2016, 00:25
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,905
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
That was just an example of a get that I use, showing that if the session stays open you can get form fields after a save. If your session closes before you can execute a get then you have to find another method - be it import/export or reading a table. We do not use the sales module so I don't have sample code for anything using those sessions.
__________________
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
  #12  
Old 28th November 2016, 05:37
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 184
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
thanks mark for tip.
regards,
jojo
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
Use of "background" keyword in Baan kruyoupatel Tools Development 2 27th April 2016 07:03
Convert a nominal to words Eddie Monster Tools Development 5 3rd December 2012 21:45
current.mwindow() spartacus Tools Development 2 10th September 2009 12:43
Problem with an AFS Sales Order process zymmon AFS/DDC/OLE: Function servers 2 28th May 2009 14:21
Webtop vs. Worktop kmcinc Tools Administration & Installation 16 19th July 2007 14:37


All times are GMT +2. The time now is 02:33.


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