|
AFS 实现库存发料 首先 PUT数量到“发料数量”后执行“启动库存发料...” 参见进程 ticst0101m100 代码如下:- |********启动库存发料
- function initiateInventory(){
- domain tcstr.200 issu,sitm
-
- stpapi.put.field("ticst0101m100", "ticst001.pdno", trim$(str$(tisfc901.pdno)))
- select ticst001.pono
- from ticst001
- where ticst001.pdno =:tisfc901.pdno and ticst001.sitm =:tisfc901.invnty
- selectdo
- stpapi.put.field("ticst0101m100", "ticst001.pono", trim$(str$(ticst001.pono)))
- selectempty
- endselect
- |retval = stpapi.change.view("ticst0101m100", error.msg)
- retval = stpapi.find("ticst0101m100", error.msg)
- if retval then
- retval = stpapi.synchronize.dialog("ticst0101m100", "modify", error.msg)
- if retval then
- stpapi.put.field("ticst0101m100", "ticst001.issu", str$(tisfc901.cwarqana))
- retval = stpapi.update("ticst0101m100", true, error.msg)
- |stpapi.get.field("ticst0101m100", "ticst001.issu", issu)
- |stpapi.get.field("ticst0101m100", "ticst001.sitm", sitm)
- |message(sitm&"="&issu)
- if retval then
- stpapi.handle.subproc("ticst0101m100", "tisfc0207m000", "send")
- stpapi.continue.process("ticst0101m100", error.msg)
- inventoryIssue()
- else
- message(error.msg)
- retval = stpapi.recover("ticst0101m100", error.msg)
- return
- endif
- endif
- endif
- stpapi.end.session("tisfc0101m100", error.msg)
-
- |stpapi.get.field("ticst0101m100", "ticst001.sitm", pono)
-
- |message(str$(pono))
- }
- |*********库存发料
- function inventoryIssue(){
- |retval = stpapi.synchronize.dialog("tisfc0207m000", "modify", error.msg)
- |if retval then
- stpapi.put.field("tisfc0207m000", "pdno.f", str$(tisfc901.pdno))
- stpapi.put.field("tisfc0207m000", "pdno.t", str$(tisfc901.pdno))
- stpapi.put.field("tisfc0207m000", "way.of.selection", str$(tisfc.wybf.all))
- stpapi.put.field("tisfc0207m000", "upto.time", sprintf$("%u001", utc.num()))
- stpapi.put.field("tisfc0207m000", "upto.time.time", sprintf$("", utc.num()))
- |retval = stpapi.update("tisfc0207m000", true, error.msg)
- |if not retval then
- | retval = stpapi.recover("tisfc0207m000", error.msg)
- |endif
- stpapi.form.command("tisfc0207m000", 5, "exec.cont.process", error.msg)
- stpapi.set.report("tisfc0207m000", "tisfc020701000", "D", error.msg)
- stpapi.print.report("tisfc0207m000", error.msg)
- message(error.msg)
- |message("inventoryIssue")
- |endif
- stpapi.end.session("tisfc0207m000", error.msg)
- }
复制代码- 524dll->serv (getxml)
- 524dll->serv (startticst0101m100100)
- 526serv<-4gl (init.ready)
- ticst0101m100(526)-RUNNING:
- LOGGING STARTED
- 05-05-2010
- >ticst0101m100(526) put.field:ticst001.pdno 100000080
- >ticst0101m100(526) put.field:ticst001.pono 20
- >ticst0101m100 Find
- 524dll->serv (def.find526)
- ticst0101m100(526)-RUNNING:def.find
- 526serv<-4gl (def.find01)
- ticst0101m100(526)-RUNNING:
- <ticst0101m100 record found (1)
- 524dll->serv (startticst0101m1001ticst0101m100121)
- 527serv<-4gl (init.ready)
- ticst0101m100(527)-RUNNING:
- 524dll->serv (syncmodify526)
- ticst0101m100(526)-RUNNING:syncmodify
- 526serv<-4gl (syncmodify0)
- ticst0101m100(526)-RUNNING:
- >ticst0101m100(526) put.field:ticst001.issu 340.96
- >ticst0101m100 update
- 524dll->serv (modify.set+save527)
- ticst0101m100(527)-RUNNING:modify.set+save
- 527serv<-4gl (modify.set+save01)
- ticst0101m100(527)-RUNNING:
- <ticst0101m100
- >ticst0101m100 handle.subproc tisfc0207m000 send
- 524dll->serv (handle.subsessiontisfc0207m0003526)
- >ticst0101m100 continue.process
- 524dll->serv (cont.process526)
- ticst0101m100(526)-RUNNING:cont.process
- 526serv<-4gl (cont.process1)
- ticst0101m100(526)-RUNNING:
- <ticst0101m100 Command disabled
- 524dll->serv (starttisfc0207m000100)
- 528serv<-4gl (init.ready)
- tisfc0207m000(528)-RUNNING:
- >tisfc0207m000(528) put.fielddno.f 100000080
- >tisfc0207m000(528) put.fielddno.t 100000080
- >tisfc0207m000(528) put.field:way.of.selection 1
- >tisfc0207m000(528) put.field:upto.time 05-05-10
- >tisfc0207m000(528) put.field:upto.time.time 16:23
- >tisfc0207m000 form.command command type: 5 command prog: exec.cont.process
- 524dll->serv (form.command5exec.cont.process528)
- tisfc0207m000(528)-RUNNING:form.command
- 528serv<-4gl (form.command1)
- tisfc0207m000(528)-RUNNING:
- <tisfc0207m000 ?未?填?入?报?表?名?称
- >tisfc0207m000 set.report
- 524dll->serv (set.reporttisfc020701000D528)
- tisfc0207m000(528)-RUNNING:set.report
- 528serv<-4gl (set.report0)
- tisfc0207m000(528)-RUNNING:
- <tisfc0207m000
- >tisfc0207m000 print.report
- 524dll->serv (print.data528)
- tisfc0207m000(528)-RUNNINGrint.data
- 528serv<-4gl (print.data1)
- tisfc0207m000(528)-RUNNING:
- <tisfc0207m000 Command disabled
- >tisfc0207m000 end.session
- 524dll->serv (end.program528)
- tisfc0207m000(528)-RUNNING:end.program
- 528serv<-4gl (end.program0)
- tisfc0207m000(528)-RUNNING:
- 528dll->serv (tisfc0207m000: exit(528))
- >tisfc0101m100 end.session
复制代码 发料没有成功,请教高手给点指导,小弟谢过了 |
|