View Single Post
  #3  
Old 11th February 2016, 06:22
sam291091's Avatar
sam291091 sam291091 is offline
Member
 
Join Date: Feb 2014
Location: Surat Gujarat
Posts: 68
sam291091 is on a distinguished road
Baan: ERP LN FP9 - DB: MY SQL - OS: Windows
Thumbs up

Hi,
Try following code for Line Insertion
Code:
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