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 6th November 2008, 11:09
indian_sumesh's Avatar
indian_sumesh indian_sumesh is offline
Member
 
Join Date: Dec 2004
Location: Pune
Posts: 93
indian_sumesh is an unknown quantity at this point
Baan: B40c4in5 - DB: Oracle10g - OS: Sun Solaris
Question Steps to create AFS

Dear Baan Friends,

I wants to learn AFS, so Please explain me the steps to be taken to develop a AFS for any standard session. Also Please clear my doubts as

1)Some sessions are not AFS friendly - what it means?
2)Is BOI is different than create a AFS -DLL ?
3) If BOI is different then How to create it for a session and how to use it?
4) Is it ncessary to create AFS DLL for every session which we want to use in AFS? or only the standard stpapihand - DLL is sufficeint?


In short Please give me the steps to create a AFS for Standard session with one example.

Thanks & Regards
Umesh
Reply With Quote
  #2  
Old 6th November 2008, 18:32
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,934
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Not familiar with BOI's, but to create a AFS using the stpapi commands I do a couple of things before writing the code.
(1) Practise using the session. Document what happens when - keep track of questions, error messages, etc.
(2) If necessary check for other sessions which might provide the same functionality.
(3) Run ttstpcreatdll to just see the command that baan thinks are available. This is not always correct for all sessions. I do not do this anymore.
So for example the user might always zoom to a subsession to change production planning - you can do this but sometimes it is easier to use main sessions versus zoomed to subsessions.

Basically from the documentation from step (1) you can write the code. So example if you wanted to insert an item you would know from step (1) above the fields you had to enter, so the first thing you do is stpapi.put.field, then the second thing was hit save button - so you do a stpapi.insert. Read the documentation in the sticky thread in this forum for a list of commands. You can always search this forum for examples and maybe even find working code for your session. ALWAYS keep in mind what works on one system may not work on yours. Also read my mantra.

Note using the api commands you typically just put fields first and then an action. So put fields, find record, change record, perform update.
Here is a quick simple sample from one of my API libraries for print goods received notes.
Code:
function extern print_goods_received(domain  tcorno	print.order,
				domain	tdpur.kofl	print.line.type,
				ref     string          msg())
{
	msg = ""

	stpapi.put.field("tdpur4410m000","orno.f",str$(print.order))
	stpapi.put.field("tdpur4410m000","orno.t",str$(print.order))
	stpapi.put.field("tdpur4410m000","date.t",str$(date.num()+5000))
	stpapi.put.field("tdpur4410m000","printed",str$(print.line.type))
|012304 - over write and user defaults for all fields.  Found some users
|saved defaults for this session - need to override all fields.
	stpapi.put.field("tdpur4410m000","selection",str$(tcyesno.no))
	stpapi.put.field("tdpur4410m000","suno.f","")
	stpapi.put.field("tdpur4410m000","suno.t","ZZZZZZ")
	stpapi.put.field("tdpur4410m000","comp.f",str$(0))
	stpapi.put.field("tdpur4410m000","comp.t",str$(999))
	stpapi.put.field("tdpur4410m000","tdpur999.dpas",str$(tcyesno.yes))
	stpapi.put.field("tdpur4410m000","prnt.clan",str$(tcyesno.yes))
	stpapi.put.field("tdpur4410m000","prnt.options",str$(tcyesno.no))
|012304	
	stpapi.set.report("tdpur4410m000","rtdpur441001000",spool.device,msg)
	if isspace(msg) then
		stpapi.continue.process("tdpur4410m000",msg)
		stpapi.get.mess.code("tdpur4410m000",msg)
	endif
	stpapi.end.session("tdpur4410m000")
}
__________________
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
Use AFS to create a patch file. Ruskin AFS/DDC/OLE: Function servers 4 24th December 2013 12:22
Question about AFS in tdsls4101m000 baanfans AFS/DDC/OLE: Function servers 4 31st July 2006 08:47
AFS : Create a sales Order Line for a Generic Item van_math AFS/DDC/OLE: Function servers 2 1st June 2004 15:32
AFS (tfgld1101m000) don´t run fine since a user with a Dynamic menu (DEM) garias AFS/DDC/OLE: Function servers 4 20th January 2004 15:24
Try to create AFS for session ttadv6420m000 gous99 AFS/DDC/OLE: Function servers 6 9th January 2003 19:27


All times are GMT +2. The time now is 20:42.


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