cherokee
19th August 2019, 04:07
Hello all,
I have a stack of orders to be printed, I use an AFS, it prints the first order, when loops for the next order does not work, no error message on the error.message var.
Note: I have changed the sort order in the stack, to print bottom to top and it prints the first instance but not the next one(it only works the first time no matter what order I want to print), is not data related.
for i = 1 to reqs.index
spool.device = <MY_ASCI_DEVICE>
l.orno = pur.req.stack(1,i;9)
spool.fileout = "c:\temp\"&logname$&"_req_"&strip$(shiftl$(l.orno))&".txt"
stpapi.put.field("timrpc421m000","orno.f",str$(l.orno))
stpapi.put.field("timrpc421m000","orno.t",str$(l.orno))
stpapi.put.field("timrpc421m000","psdt.f",str$(l.utc.f))
stpapi.put.field("timrpc421m000","psdt.t",str$(l.utc.t))
stpapi.put.field("timrpc421m000","pfdt.f",str$(l.utc.f))
stpapi.put.field("timrpc421m000","pfdt.t",str$(l.utc.t))
stpapi.set.report("timrpc421m000","rtimrpc42111001",spool.device,error.message)
stpapi.print.report("timrpc421m000",error.message)
stpapi.end.session("timrpc421m000")
endfor
Any inputs are welcome.
Thanks in advance
I have a stack of orders to be printed, I use an AFS, it prints the first order, when loops for the next order does not work, no error message on the error.message var.
Note: I have changed the sort order in the stack, to print bottom to top and it prints the first instance but not the next one(it only works the first time no matter what order I want to print), is not data related.
for i = 1 to reqs.index
spool.device = <MY_ASCI_DEVICE>
l.orno = pur.req.stack(1,i;9)
spool.fileout = "c:\temp\"&logname$&"_req_"&strip$(shiftl$(l.orno))&".txt"
stpapi.put.field("timrpc421m000","orno.f",str$(l.orno))
stpapi.put.field("timrpc421m000","orno.t",str$(l.orno))
stpapi.put.field("timrpc421m000","psdt.f",str$(l.utc.f))
stpapi.put.field("timrpc421m000","psdt.t",str$(l.utc.t))
stpapi.put.field("timrpc421m000","pfdt.f",str$(l.utc.f))
stpapi.put.field("timrpc421m000","pfdt.t",str$(l.utc.t))
stpapi.set.report("timrpc421m000","rtimrpc42111001",spool.device,error.message)
stpapi.print.report("timrpc421m000",error.message)
stpapi.end.session("timrpc421m000")
endfor
Any inputs are welcome.
Thanks in advance