cherokee
13th August 2019, 04:19
Hello all,

I am trying to release Purchase Orders thru session tdpur4246m000 (BaaN V) with FS but keeps returning "Command disable" when command "continue" is executed, no other errors while setting up the FS. I do not know what can be the problem. Any help is welcome.

function release.to.warehouse()
{
domain tcmcs.str50 error.message
domain tcmcs.long l.month,l.day,l.year,l.hh,l.mm,l.ss
domain tiutcd l.utc.f, l.utc.t

num.to.date(date.num(), l.year, l.month, l.day)
l.utc.t = date.to.utc(l.year,l.month,l.day,0,0,0)

spool.device = "FTP_ASCIF"
spool.fileout = "test.123"
stpapi.put.field("tdpur4246m000","orno.f",orno.f)
stpapi.put.field("tdpur4246m000","orno.t",orno.f)
stpapi.put.field("tdpur4246m000","cotp.f","")
stpapi.put.field("tdpur4246m000","cotp.t","ZZZ")
stpapi.put.field("tdpur4246m000","cofc.f","")
stpapi.put.field("tdpur4246m000","cofc.t","ZZZZZZ")
stpapi.put.field("tdpur4246m000","otbp.f","")
stpapi.put.field("tdpur4246m000","otbp.t","ZZZZZZZZZ")
stpapi.put.field("tdpur4246m000","sfbp.f","")
stpapi.put.field("tdpur4246m000","sfbp.t","ZZZZZZZZZ")
stpapi.put.field("tdpur4246m000","log.report","1") |Yes
stpapi.put.field("tdpur4246m000","log.succes","1") |Yes
stpapi.put.field("tdpur4246m000","ref.date",str$(l.utc.t))
stpapi.put.field("tdpur4246m000","proc.device","1")
stpapi.put.field("tdpur4246m000","alt.dev","FTP_ASCIF")
stpapi.put.field("tdpur4401m000","alt.spoolout","c:\temp\test.rel.whse.txt")
stpapi.set.report("tdpur4246m000","rtdpur424611000",spool.device,error.message)
stpapi.continue.process("tdpur4246m000",error.message)
| stpapi.print.report("tdpur4246m000",error.message)
stpapi.end.session("tdpur4246m000")
}

Thank you in advance

cintact
13th August 2019, 12:23
Hello,

two things i find strange.
You write, you are using Baan V, We have only baaniv and ERPLN.
i think baan v uses stpapi.form.command and not stpapi.continue.process.
This command is for baan IV.
I do not know this session very good, but you are using tdpur4246m000,
in following line you use tdpur4401m000. Is this correct?

stpapi.put.field("tdpur4401m000","alt.spoolout","c:\temp\test.rel.whse.txt")

Marcus

cherokee
13th August 2019, 15:29
Thank you for your feedback.

Thank you for your help... stpapi.form.command, did the job! (I also corrected the wrong session code(4401m000) )

Thank you for your help!