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 29th March 2017, 16:03
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 185
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
gen advice and release advice

hi,
i created generate advice and release advise inside the planned load and shipment session (whinh4180m000) but its not making any changes. i am not sure which part of the script is wrong.
Code:
function extern afs.run.owhinhf4182(
            domain tcorno i.orno.r,
            domain tcpono i.pono.r,
            domain tcpono i.seqn.r,
            domain tcwset i.oset.r,
            domain tccwar i.cwar.r,
         domain whinh.load i.load.r,
         domain whinh.shpm i.shpm.r)
{  |generate advice
   domain  tcmcs.str100 error.msg
   error.msg = ""
   long find.shipment, add.shipment, save.shipment, mark.shipment
   boolean update.shipment
   |* AFS Script
   stpapi.put.field("whinh4180m000","whinh480.oorg",str$(etol(whinh.oorg.sales)))
   stpapi.put.field("whinh4180m000","whinh480.orno",i.orno.r)
   stpapi.put.field("whinh4180m000","whinh480.pono",str$(i.pono.r))
   stpapi.put.field("whinh4180m000","whinh480.seqn",str$(i.seqn.r))
   stpapi.put.field("whinh4180m000","whinh480.boml",str$(0))
   stpapi.put.field("whinh4180m000","whinh480.cwar",i.load.r)
   stpapi.put.field("whinh4180m000","whinh480.cwar",i.shpm.r)
   stpapi.put.field("whinh4180m000","whinh480.cwar",i.cwar.r)
   find.shipment = stpapi.find("whinh4180m000",error.msg)
   if find.shipment = 1 then
      mark.shipment = stpapi.mark("whinh4180m000", error.msg)
      if mark.shipment then
         stpapi.form.command("whinh4180m000", 5, "whinh4201m000",error.msg)       
         stpapi.enum.answer("whinh4201m000","advice.log",whinh.oalg.no)
         stpapi.put.field("whinh4201m000", "overwrite.range", str$(etol(tcyesno.yes)))
         stpapi.put.field("whinh4201m000", "use.load.plan", str$(etol(tcyesno.yes)))
         stpapi.put.field("whinh4201m000", "load.f", i.load.r)
         stpapi.put.field("whinh4201m000", "load.t", i.load.r)
         stpapi.put.field("whinh4201m000", "shpm.f", i.shpm.r)
         stpapi.put.field("whinh4201m000", "shpm.t", i.shpm.r)
         stpapi.enum.answer("whinh4201m000","prerror",tcyesno.yes)
         stpapi.put.field("whinh4201m000", "order.prio", str$(etol(whinh.oorg.sales)),1)
         stpapi.put.field("whinh4201m000", "order.prio", str$(etol(whinh.oorg.sales.sched)),2)
         stpapi.put.field("whinh4201m000", "order.prio", str$(etol(whinh.oorg.sales.man)),3)
         stpapi.put.field("whinh4201m000", "include.org", str$(etol(tcyesno.yes)),1)
         stpapi.put.field("whinh4201m000", "include.org", str$(etol(tcyesno.yes)),2)
         stpapi.put.field("whinh4201m000", "include.org", str$(etol(tcyesno.yes)),3)
         stpapi.enum.answer("whinh4201m000","whinhs0039",whinh.sapp.ok) |run must be filled
         stpapi.enum.answer("whinh4201m000","whinh0007",tcyesno.yes)
         stpapi.enum.answer("whinh4201m000","pradvice",tcyesno.yes)
         stpapi.enum.answer("whinh4201m000","prshortage",tcyesno.yes)
         stpapi.enum.answer("whinh4201m000","print.ownership",tcyesno.yes)
         stpapi.put.field("whinh4201m000", "label.printing", str$(etol(whinh.plbs.order.settings)))
         stpapi.put.field("whinh4201m000", "device.selection", str$(etol(tcdvsl.default)))
         stpapi.set.report("whinh4201m000", "rwhinh420011000","N", error.msg)
         stpapi.set.report("whinh4201m000", "rwhinh420021000","N", error.msg)
         stpapi.set.report("whinh4201m000", "rwhinh420041000","N", error.msg)
         stpapi.form.command("whinh4201m000", 5, "read.and.load.run",error.msg)
         stpapi.form.command("whinh4201m000", 5, "advise",error.msg)
      endif
   endif
   stpapi.end.session("whinh4201m000")
   stpapi.end.session("whinh4180m000")
}

function extern afs.run.owhinhf4183(
            domain tcorno i.orno.s,
            domain tcpono i.pono.s,
            domain tcpono i.seqn.s,
            domain tcwset i.oset.s,
            domain tccwar i.cwar.s,
         domain whinh.load i.load.s,
         domain whinh.shpm i.shpm.s)
{  |released advice
   domain  tcmcs.str100 error.msg
   error.msg = ""
   long find.shipment, add.shipment, save.shipment, mark.shipment
   boolean update.shipment
   |* AFS Script
   stpapi.put.field("whinh4180m000","whinh480.oorg",str$(etol(whinh.oorg.sales)))
   stpapi.put.field("whinh4180m000","whinh480.orno",i.orno.s)
   stpapi.put.field("whinh4180m000","whinh480.pono",str$(i.pono.s))
   stpapi.put.field("whinh4180m000","whinh480.seqn",str$(i.seqn.s))
   stpapi.put.field("whinh4180m000","whinh480.boml",str$(0))
   stpapi.put.field("whinh4180m000","whinh480.cwar",i.load.s)
   stpapi.put.field("whinh4180m000","whinh480.cwar",i.shpm.s)
   stpapi.put.field("whinh4180m000","whinh480.cwar",i.cwar.s)
   find.shipment = stpapi.find("whinh4180m000",error.msg)
   if find.shipment = 1 then
      mark.shipment = stpapi.mark("whinh4180m000", error.msg)
      if mark.shipment = 1 then
         stpapi.form.command("whinh4180m000", 5, "whinh4202m000",error.msg)
         stpapi.put.field("whinh4202m000", "oorg.f", str$(etol(whinh.oorg.sales)))
         stpapi.put.field("whinh4202m000", "oorg.t", str$(etol(whinh.oorg.sales)))
         stpapi.put.field("whinh4202m000", "orno.f", i.orno.s)
         stpapi.put.field("whinh4202m000", "orno.t", i.orno.s)
         stpapi.put.field("whinh4202m000", "oset.f", str$(i.oset.s))
         stpapi.put.field("whinh4202m000", "oset.t", str$(i.oset.s))
         stpapi.put.field("whinh4202m000", "pono.f", str$(i.pono.s))
         stpapi.put.field("whinh4202m000", "pono.t", str$(i.pono.s))
         stpapi.put.field("whinh4202m000", "label.printing", str$(etol(whinh.plbs.order.settings)))
         stpapi.put.field("whinh4202m000", "use.load.plan", str$(etol(tcyesno.yes)))
         stpapi.put.field("whinh4202m000", "load.f", i.load.s)
         stpapi.put.field("whinh4202m000", "load.t", i.load.s)
         stpapi.put.field("whinh4202m000", "shpm.f", i.shpm.s)
         stpapi.put.field("whinh4202m000", "shpm.t", i.shpm.s)
         stpapi.enum.answer("whinh4202m000","whinhs0039",whinh.sapp.ok)
         stpapi.enum.answer("whinh4202m000","whinh0007",tcyesno.yes)
         stpapi.enum.answer("whinh4202m000","advice.log",whinh.oalg.no)
         stpapi.enum.answer("whinh4202m000","pradvice",tcyesno.no)
         stpapi.enum.answer("whinh4202m000","prshortage",tcyesno.yes)
         stpapi.enum.answer("whinh4202m000","print.ownership",tcyesno.no)
         stpapi.set.report("whinh4202m000", "rwhinh420021000","ASCIT", error.msg)
         stpapi.form.command("whinh4202m000", 5, "read.and.load.run",error.msg)
         stpapi.form.command("whinh4202m000", 5, "release.advice",error.msg)

      endif
   endif
   stpapi.end.session("whinh4202m000")
   stpapi.end.session("whinh4180m000")
}
psl help. thanks.
regards,
jojo

Last edited by mark_h : 29th March 2017 at 16:50. Reason: add code tags
Reply With Quote
  #2  
Old 29th March 2017, 17:00
mark_h's Avatar
mark_h mark_h is online now
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
I don't have LN so not sure I will be much help the first thing I would look at in debug mode is the stpapi.form.command("whinh4180m000", 5, "whinh4201m000",error.msg) command. Is that the correct format to launch the next session? If this is correct then in debug mode right after you step thru this command you should see whinh4180m000 running in the background process. In 4c4 I can start a shell from the option dialog and watch the processes.
__________________
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
  #3  
Old 30th March 2017, 12:26
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
It will help if you can point the exact line where there is an issue. You can step into debugger and check for the return values.

Also, I'm not sure, but I remember, there are a few activities which need a DLL call for AFS to work. Yes, that sounds bad. But, there are a number of places where we need to do that. If you have source code, that should be a big help. Else, you just need to keep playing and debugging it.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #4  
Old 31st March 2017, 15:02
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 185
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
how to start new line for a header/line session (MMT session)? there is no form command to enter new line, new command is from the menu. synchronize command is available only when there is already the first line entered.
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
maintain outbound advice ubhat12 Distribution, Transportation & Warehousing 2 20th June 2014 17:37
Handling Unit functionality baazigar Distribution, Transportation & Warehousing 4 19th February 2012 16:54
Dal king1980 Tools Development 6 19th March 2010 13:10
whinh2520m000 advice shortage message Andy.. AFS/DDC/OLE: Function servers 3 3rd September 2006 18:16
Baan IVc4 ILC Lot Control: Outbound advice without Lot Smolawa Distribution, Transportation & Warehousing 1 23rd February 2004 23:25


All times are GMT +2. The time now is 15:47.


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