View Single Post
  #4  
Old 3rd March 2016, 16:31
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,307
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

Surprisingly, your code works just fine for me.

Though, I would suggest to put the stpapi.enum.answer() before using any put() functions.

Code:
stpapi.enum.answer("ttadv1140s000", "ttadv11403", ttyeno.yes )
stpapi.put.field("ttadv1140m000", "ttadv140.clan", cust.clan)
stpapi.put.field("ttadv1140m000", "ttadv140.cpac", cust.cpac)
ret = stpapi.change.view("ttadv1140m000", err)

ret = stpapi.synchronize.dialog("ttadv1140m000", "add", err)
if ret = 1 then

stpapi.put.field("ttadv1140s000", "ttadv140.vers", cust.vers)
stpapi.put.field("ttadv1140s000", "ttadv140.rele", cust.rele)
stpapi.put.field("ttadv1140s000", "ttadv140.cust", cust.cust)

stpapi.put.field("ttadv1140s000", "ttadv140.zc_cont", str$(etol (ttadv.cont.general)))
stpapi.put.field("ttadv1140s000", "ttadv140.desc", str$(trim$(new.label)))
stpapi.put.field("ttadv1140s000", "ttadv140.clab", trim$(f.prefix & str$(get.count)))

ret = stpapi.insert("ttadv1140s000",true, err)
if ret then
stpapi.get.field("ttadv1140s000", "ttadv140.desc", get.desc)
stpapi.get.field("ttadv1140s000", "ttadv140.clab", get.clab)
endif
stpapi.end.session("ttadv1140s000")
stpapi.end.session("ttadv1140m000")
endif
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote