Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


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
37%
Manual into existing VRC
5%
Manual into new VRC
21%
Total votes: 43

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 11th January 2018, 17:07
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 127
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
function server continue process

Hi,

I'm creating a function server for a baan session and the process is giving me messages during the process.

how can I send a "enter" to the message so that the stpapi process continue?

Thanks.

PB
Reply With Quote
  #2  
Old 11th January 2018, 17:23
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,052
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
Refer to the AFS manual -

[quote]Send Start processing command to session
SYNTAX
void stpapi.continue.process(string session, ref string err.mesg)
ARGUMENTS
session Name of the session this command is executed on.
err.mesg This parameter will contain the text of the error message if the
function cannot complete normally.
DESCRIPTION
This causes the choice option cont.process to be executed in the specified
session
RETURN VALUES
None
EXAMPLE
stpapi.put.field("dtfsa1201s000", "seno.f", str$(i.seno))
stpapi.put.field("dtfsa1201s000", "seno.t", str$(i.seno))
stpapi.put.field("dtfsa1201s000", "proc.date", str$(date.num()))
stpapi.put.field("dtfsa1201s000", "do.update", str$(etol(dtyesno.no)))
stpapi.continue.process("dtfsa1201s000", error.msg)
Explanation:
For a processing session, the input fields are sent to the session, and the
continue process function of the session is executed.
USAGE NOTES
Functions in dll created by creatdll:
Function extern void <fs-name>.continue(ref string error)
This function is for Baan IV only. For Baan ERP 5.x and 6.0, use the
stpapi.form.command().
The error messages returned can be:
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #3  
Old 11th January 2018, 19:11
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 127
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
Hi,

do i need to do an update between fields?
here's what i'm doing.

stpapi.put.field("tisfc0101m000", "tisfc001.prdt", date1)
stpapi.put.field("tisfc0101m000", "tisfc001.dldt", date2)
stpapi.put.field("tisfc0101m000", "tisfc001.dldp", perc)
stpapi.update("tisfc0101m000", true, errmsg1)

but when i check errmsg1, it's like field tisfc001.dldt never changed.
Reply With Quote
  #4  
Old 11th January 2018, 19:13
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 127
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
here is the full function.

stpapi.put.field("tisfc0101m000", "tisfc001.pdno", pdno.str)
rc = stpapi.find("tisfc0101m000", errmsg1)
if rc <> 1 then
errmsg1 = "Production order not found"
stpapi.end.session("tisfc0101m000")
display("errmsg1")
end()
endif

stpapi.put.field("tisfc0101m000", "tisfc001.prdt", date1)
stpapi.put.field("tisfc0101m000", "tisfc001.dldt", date2)
stpapi.put.field("tisfc0101m000", "tisfc001.dldp", perc)
stpapi.update("tisfc0101m000", true, errmsg1)


stpapi.end.session("tisfc0101m000")

am i missing something?
Reply With Quote
  #5  
Old 11th January 2018, 23:05
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,041
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Based off the original post it sounds like you are receiving messages from the session as the process is running. Depending on the message (and or question) on what you need to do. If it is just warning messages or informational messages then you really need to do nothing. If they are questions then you need to use stpapi.enum.answer with the question number before the session asks the message. So typically before the stpapi.update.

On the fields you sending in the put are they all strings and in the correct format (date1,date2,perc)?
__________________
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
  #6  
Old 11th January 2018, 23:08
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,041
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
FYI - I moved it to this form. One of the things I recommend is searching this specific forum to see what others are doing for a given session. Like this thread - http://www.baanboard.com/baanboard/s...=tisfc0101m000 and this one http://www.baanboard.com/baanboard/s...=tisfc0101m000 - you can usually see samples of what others are trying. Not sure I have done one on tisfc0101m00 on our system.
__________________
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 12th January 2018, 16:50
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 127
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
date1, date2 and perc are strings.

the process is not a question but a message where i need to press enter.
in the regular Baan session, i get the message after i update the dates.
when i press enter, the dates get saved.

PB
Reply With Quote
  #8  
Old 12th January 2018, 20:28
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 127
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
is the process is the same since i'm trying to modify a date field?
Reply With Quote
  #9  
Old 12th January 2018, 22:46
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 127
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
ok, i'm at the point were i'm going crazy.

i'm trying to update the production start date and the delivery date in tisfc0101m000

here is my script

function update.record()
{
long ret
perc = "100"

stpapi.put.field("tisfc0101m000", "tisfc001.pdno", pdno.str)
rc = stpapi.find("tisfc0101m000", errmsg1)
| if rc <> 1 then
| errmsg1 = "Production order not found"
| stpapi.end.session("tisfc0101m000")
| display("errmsg1")
| end()
| else

stpapi.put.field("tisfc0101m000", "tisfc001.prdt", date1.str)
stpapi.put.field("tisfc0101m000", "tisfc001.dldt", date2.str)
stpapi.put.field("tisfc0101m000", "tisfc001.dldp", perc)
ret = stpapi.update("tisfc0101m000", true, errmsg1)

stpapi.handle.subproc("tisfc0101m000","tisfc0505m000","kill")
stpapi.end.session("tisfc0101m000", errmsg1)

| endif
}

if i follow in debug, errmsg1 has the mesaage: ''estimated BOM and Routing will reset to standard press <return>

when i check the data, nothing is changed.
help!
Reply With Quote
  #10  
Old 13th January 2018, 23:44
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,041
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
It might be a case where you need to see what the code is doing. There is always a possibility where a field (or session variable) does not get filled while running in api mode. If it is not a question then what you can try to do is first do a stpapi.save - then follow it with an update. Sometimes that gets things to work.
__________________
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
  #11  
Old 15th January 2018, 20:21
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 127
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
Hi,
fsaw and fixed the issue.
problem was my date field.
it needs to be in the internal baan 3gl format.

so not stpapi.put.field("tisfc0101m000", "tisfc001.dldt", date2.str)
but stpapi.put.field("tisfc0101m000", "tisfc001.dldt", str$(date.num()))

it's working now.
thanks for all the info about this,

PB
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
Compile error,help! gavin_wusj Tools Development 5 5th April 2005 09:09
API for the session timps4701m000 lli-baan AFS/DDC/OLE: Function servers 5 30th March 2005 15:50
Function Server Error roderigo73 AFS/DDC/OLE: Function servers 1 15th April 2004 14:26
problem with function server and menu DEM console AFS/DDC/OLE: Function servers 1 5th November 2003 14:44


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


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