Hemant3498
4th November 2014, 13:44
Hi All,
I am trying to insert records in tibd001 session through AFS, but the sub-entity do not get updated.
When I insert a record manually and save the data the sub-entity gets filled from Item defaults.
Please help me on how this can be solved(see code below).
ret = stpapi.synchronize.dialog("tcibd0501m000", "add", error.msg)
if ret then
stpapi.put.field( "tcibd0101s000", "tcibd001.item.segment.1", "")
stpapi.put.field( "tcibd0101s000", "tcibd001.item.segment.2", str$(trim$(item)) )
stpapi.put.field( "tcibd0101s000", "tcibd001.citg", str$(citg))
stpapi.put.field( "tcibd0101s000", "tcibd001.kitm", str$((kitm)))
stpapi.put.field( "tcibd0101s000", "tcibd001.dscb", str$(dscb ))
stpapi.put.field( "tcibd0101s000", "tcibd001.dscc", str$(dscc))
stpapi.put.field( "tcibd0101s000", "tcibd001.cpln", str$(cpln))
stpapi.put.field( "tcibd0101s000", "tcibd001.dsca", str$(dsca ))
stpapi.put.field( "tcibd0101s000", "tcibd001.exin", str$(exin))
stpapi.put.field( "tcibd0101s000", "tcibd001.uset", str$(uset))
stpapi.put.field( "tcibd0101s000", "tcibd001.cuni", str$(cuni))
stpapi.put.field( "tcibd0101s000", "tcibd001.cwun", str$(cwun))
stpapi.put.field( "tcibd0101s000", "tcibd001.wght", str$(wght))
stpapi.insert("tcibd0101s000",true,error.insert)
| ret = stpapi.insert("tcibd0501m000",true,error.insert)
if not ret then
ret = stpapi.recover("tcibd0101s000", error.msg)
endif
stpapi.end.session("tcibd0501m000", error.end)
Thanks.
I am trying to insert records in tibd001 session through AFS, but the sub-entity do not get updated.
When I insert a record manually and save the data the sub-entity gets filled from Item defaults.
Please help me on how this can be solved(see code below).
ret = stpapi.synchronize.dialog("tcibd0501m000", "add", error.msg)
if ret then
stpapi.put.field( "tcibd0101s000", "tcibd001.item.segment.1", "")
stpapi.put.field( "tcibd0101s000", "tcibd001.item.segment.2", str$(trim$(item)) )
stpapi.put.field( "tcibd0101s000", "tcibd001.citg", str$(citg))
stpapi.put.field( "tcibd0101s000", "tcibd001.kitm", str$((kitm)))
stpapi.put.field( "tcibd0101s000", "tcibd001.dscb", str$(dscb ))
stpapi.put.field( "tcibd0101s000", "tcibd001.dscc", str$(dscc))
stpapi.put.field( "tcibd0101s000", "tcibd001.cpln", str$(cpln))
stpapi.put.field( "tcibd0101s000", "tcibd001.dsca", str$(dsca ))
stpapi.put.field( "tcibd0101s000", "tcibd001.exin", str$(exin))
stpapi.put.field( "tcibd0101s000", "tcibd001.uset", str$(uset))
stpapi.put.field( "tcibd0101s000", "tcibd001.cuni", str$(cuni))
stpapi.put.field( "tcibd0101s000", "tcibd001.cwun", str$(cwun))
stpapi.put.field( "tcibd0101s000", "tcibd001.wght", str$(wght))
stpapi.insert("tcibd0101s000",true,error.insert)
| ret = stpapi.insert("tcibd0501m000",true,error.insert)
if not ret then
ret = stpapi.recover("tcibd0101s000", error.msg)
endif
stpapi.end.session("tcibd0501m000", error.end)
Thanks.