View Single Post
  #7  
Old 11th February 2016, 19:58
eric.dizon's Avatar
eric.dizon eric.dizon is offline
Senior Member
 
Join Date: Feb 2012
Posts: 151
eric.dizon is on a distinguished road
Baan: ERP LN - DB: MS SQL - OS: 2003
Hi sam291091,

I tried your code below to include handle ? I get same error command disabled.
If I try to add this after stpapi.handle using "add" - I still get command disabled.
ret = stpapi.synchronize.dialog(sync.sess, "add", errmsg)

else if I use modify I get Adjustment Order not found. Enter another order.
ret = stpapi.synchronize.dialog(sync.sess, "modify", errmsg)

stpapi.put.field(main.sess, "whinh520.orno", l.orno ) |"ADJ003147")
ret = stpapi.find(main.sess , errfindmsg)
stpapi.handle.subproc(main.sess ,sync.sess ,"add")
stpapi.put.field(sync.sess, "whinh521.orno", l.orno)
stpapi.put.field(sync.sess, "whinh521.pono", "1")
stpapi.put.field(sync.sess, "whinh521.cwar", "300832")
stpapi.put.field(sync.sess, "whin521.item.segment.1", "" ) |value(1; 9)
stpapi.put.field(sync.sess, "whin521.item.segment.2", "CSBP043-030AAAA") | CSBP043-030AAAA
stpapi.put.field(sync.sess, "whinh521.clot", l.clot) |B00000575-15-10-0016
stpapi.put.field(sync.sess, "whinh521.stun", "m") | Handling Unit
stpapi.put.field(sync.sess, "whinh521.qadr", str$(l.rmmt)) | Inventory Adjusted
l.vari = v.qhnd - l.rmmt
stpapi.put.field(sync.sess, "whinh521.qrvr", str$(l.vari)) | Variance
stpapi.put.field(sync.sess, "whinh521.adrn", "INV17")
rval = stpapi.insert(sync.sess,true,errmsg)
Reply With Quote