Infor LN (BaaN ERP)论坛

 找回密码
 加入Baan会员

QQ登录

只需一步,快速开始

QQ群一:61560730(已满)QQ群二:34342363
查看: 10016|回复: 0

AFS "Initiate Inventory Issue..." 二次开发 “库存发料”

[复制链接]
发表于 2010-5-5 19:51:38 | 显示全部楼层 |阅读模式
AFS 实现库存发料 首先 PUT数量到“发料数量”后执行“启动库存发料...” 参见进程 ticst0101m100 代码如下:
  1. |********启动库存发料
  2. function initiateInventory(){
  3.         domain tcstr.200 issu,sitm
  4.         
  5.         stpapi.put.field("ticst0101m100", "ticst001.pdno", trim$(str$(tisfc901.pdno)))
  6.         select ticst001.pono
  7.         from ticst001
  8.         where ticst001.pdno =:tisfc901.pdno and ticst001.sitm =:tisfc901.invnty
  9.         selectdo        
  10.                 stpapi.put.field("ticst0101m100", "ticst001.pono", trim$(str$(ticst001.pono)))                                
  11.         selectempty
  12.         endselect        
  13.         |retval = stpapi.change.view("ticst0101m100", error.msg)
  14.         retval = stpapi.find("ticst0101m100", error.msg)
  15.         if retval then
  16.                 retval = stpapi.synchronize.dialog("ticst0101m100", "modify", error.msg)
  17.                 if retval then
  18.                         stpapi.put.field("ticst0101m100", "ticst001.issu", str$(tisfc901.cwarqana))
  19.                         retval = stpapi.update("ticst0101m100", true, error.msg)
  20. |stpapi.get.field("ticst0101m100", "ticst001.issu", issu)
  21. |stpapi.get.field("ticst0101m100", "ticst001.sitm", sitm)
  22. |message(sitm&"="&issu)
  23.                         if retval then
  24.                                 stpapi.handle.subproc("ticst0101m100", "tisfc0207m000", "send")
  25.                                 stpapi.continue.process("ticst0101m100", error.msg)
  26.                                 inventoryIssue()
  27.                         else
  28.                                 message(error.msg)
  29.                                 retval = stpapi.recover("ticst0101m100", error.msg)
  30.                                 return
  31.                         endif
  32.                 endif
  33.         endif
  34.         stpapi.end.session("tisfc0101m100", error.msg)
  35.         
  36.         |stpapi.get.field("ticst0101m100", "ticst001.sitm", pono)
  37.         
  38.         |message(str$(pono))
  39. }
  40. |*********库存发料
  41. function inventoryIssue(){
  42.         |retval = stpapi.synchronize.dialog("tisfc0207m000", "modify", error.msg)
  43.         |if retval then
  44.                 stpapi.put.field("tisfc0207m000", "pdno.f", str$(tisfc901.pdno))
  45.                 stpapi.put.field("tisfc0207m000", "pdno.t", str$(tisfc901.pdno))
  46.                 stpapi.put.field("tisfc0207m000", "way.of.selection", str$(tisfc.wybf.all))
  47.                 stpapi.put.field("tisfc0207m000", "upto.time", sprintf$("%u001", utc.num()))
  48.                 stpapi.put.field("tisfc0207m000", "upto.time.time", sprintf$("", utc.num()))
  49.                 |retval = stpapi.update("tisfc0207m000", true, error.msg)
  50.                 |if not retval then
  51.                 |        retval = stpapi.recover("tisfc0207m000", error.msg)
  52.                 |endif
  53.                 stpapi.form.command("tisfc0207m000", 5, "exec.cont.process", error.msg)
  54.                 stpapi.set.report("tisfc0207m000", "tisfc020701000", "D", error.msg)
  55.                 stpapi.print.report("tisfc0207m000", error.msg)
  56. message(error.msg)
  57. |message("inventoryIssue")
  58.         |endif
  59.         stpapi.end.session("tisfc0207m000", error.msg)
  60. }
复制代码
  1. 524dll->serv (getxml)
  2. 524dll->serv (startticst0101m100100)
  3. 526serv<-4gl (init.ready)
  4. ticst0101m100(526)-RUNNING:
  5. LOGGING STARTED
  6. 05-05-2010
  7. >ticst0101m100(526) put.field:ticst001.pdno 100000080
  8. >ticst0101m100(526) put.field:ticst001.pono 20
  9. >ticst0101m100 Find
  10. 524dll->serv (def.find526)
  11. ticst0101m100(526)-RUNNING:def.find
  12. 526serv<-4gl (def.find01)
  13. ticst0101m100(526)-RUNNING:
  14. <ticst0101m100 record found (1)
  15. 524dll->serv (startticst0101m1001ticst0101m100121)
  16. 527serv<-4gl (init.ready)
  17. ticst0101m100(527)-RUNNING:
  18. 524dll->serv (syncmodify526)
  19. ticst0101m100(526)-RUNNING:syncmodify
  20. 526serv<-4gl (syncmodify0)
  21. ticst0101m100(526)-RUNNING:
  22. >ticst0101m100(526) put.field:ticst001.issu 340.96
  23. >ticst0101m100 update
  24. 524dll->serv (modify.set+save527)
  25. ticst0101m100(527)-RUNNING:modify.set+save
  26. 527serv<-4gl (modify.set+save01)
  27. ticst0101m100(527)-RUNNING:
  28. <ticst0101m100
  29. >ticst0101m100 handle.subproc tisfc0207m000 send
  30. 524dll->serv (handle.subsessiontisfc0207m0003526)
  31. >ticst0101m100 continue.process
  32. 524dll->serv (cont.process526)
  33. ticst0101m100(526)-RUNNING:cont.process
  34. 526serv<-4gl (cont.process1)
  35. ticst0101m100(526)-RUNNING:
  36. <ticst0101m100 Command disabled
  37. 524dll->serv (starttisfc0207m000100)
  38. 528serv<-4gl (init.ready)
  39. tisfc0207m000(528)-RUNNING:
  40. >tisfc0207m000(528) put.fielddno.f 100000080
  41. >tisfc0207m000(528) put.fielddno.t 100000080
  42. >tisfc0207m000(528) put.field:way.of.selection 1
  43. >tisfc0207m000(528) put.field:upto.time 05-05-10
  44. >tisfc0207m000(528) put.field:upto.time.time 16:23
  45. >tisfc0207m000 form.command command type: 5 command prog: exec.cont.process
  46. 524dll->serv (form.command5exec.cont.process528)
  47. tisfc0207m000(528)-RUNNING:form.command
  48. 528serv<-4gl (form.command1)
  49. tisfc0207m000(528)-RUNNING:
  50. <tisfc0207m000 ?未?填?入?报?表?名?称
  51. >tisfc0207m000 set.report
  52. 524dll->serv (set.reporttisfc020701000D528)
  53. tisfc0207m000(528)-RUNNING:set.report
  54. 528serv<-4gl (set.report0)
  55. tisfc0207m000(528)-RUNNING:
  56. <tisfc0207m000
  57. >tisfc0207m000 print.report
  58. 524dll->serv (print.data528)
  59. tisfc0207m000(528)-RUNNINGrint.data
  60. 528serv<-4gl (print.data1)
  61. tisfc0207m000(528)-RUNNING:
  62. <tisfc0207m000 Command disabled
  63. >tisfc0207m000 end.session
  64. 524dll->serv (end.program528)
  65. tisfc0207m000(528)-RUNNING:end.program
  66. 528serv<-4gl (end.program0)
  67. tisfc0207m000(528)-RUNNING:
  68. 528dll->serv (tisfc0207m000: exit(528))
  69. >tisfc0101m100 end.session
复制代码
发料没有成功,请教高手给点指导,小弟谢过了
您需要登录后才可以回帖 登录 | 加入Baan会员

本版积分规则

QQ|Archiver|手机版|小黑屋|Infor LN Baan论坛 沪ICP备20006045号-3

GMT+8, 2024-5-2 19:53 , Processed in 0.141488 second(s), 17 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表