patwanirav
18th July 2011, 10:08
stpapi.put.field("tdilc4103m000","runnumber","shb")
stpapi.put.field("tdilc4103m000","k.o.order",str$(tdilc.kooa.act.pur))
stpapi.put.field("tdilc4103m000","ordernr",str$(orno.f))
stpapi.handle.subproc("tdilc4103m000","tdilc4104s000","add")
stpapi.continue.process("tdilc4103m000",error.msg)
if not isspace(error.msg) then
stpapi.end.session("tdilc4103m000")
return
endif
stpapi.handle.subproc("tdilc4104s000","tdilc4515s000","add")
ret = stpapi.insert("tdilc4104s000",1,error.msg)
if ret = 1 then
stpapi.enum.answer("tdilc4515s000","tdilc402.koor",tdilc.kooa.act.pur)
stpapi.put.field("tdilc4515s000","tdilc402.orno",str$(orno.f))
stpapi.put.field("tdilc4515s000","tdilc402.pono",str$(pono.f))
stpapi.put.field("tdilc4515s000","tdilc402.sera",str$(tdilc402.sera))
stpapi.put.field("tdilc4515s000","tdilc402.item",item.f)
rc = stpapi.change.view("tdilc4515s000",error.msg)


when i execute this afs the stpapi.change.view returns me 0 , and the error.msg is also blank. I can't understand why this is happening.

pls help me regarding this...
thanks in advance...

mark_h
18th July 2011, 15:30
Try just using find instead of change view. That is what I use for outbound. The only thing I really do with this session is insert inbound for a production order.