raikar_raviraj
7th August 2007, 13:02
Hi,
I am trying to create Receipt for both lot and without lot controlled item. AFS works fine for without lot controlled Item. But in case of lot controlled item, it inserts the record properly in tdilc4113s000 for the first item.
But when i try to end the session to insert another lot controlled item.. the session tdilc4113s000 doesnt end.. instead 2 objects get invoked tfgld4200 and tfgld1201. I am not able to figure out why this objects are getting invoked..
The script which i wrote is as below
select ltlnt041.*
from ltlnt041
where ltlnt041._index1 = {:import.orno}
and ltlnt041.chall = :chall
and (ltlnt041.oqua - ltlnt041.dqua)>0
selectdo
if etol(ltlnt041.chck) = 1 then
stpapi.put.field("tdpur4120m000", "tdpur045.diqu", str$(ltlnt041.pqua))
stpapi.put.field("tdpur4120m000", "tdpur045.date", str$(date.num()))
if etol(ltlnt041.kltc) <> 1 then
stpapi.put.field("tdpur4120m000", "tdpur045.dqua", str$(ltlnt041.rqua))
endif
stpapi.enum.answer("tdpur4120m000", "tdind00008", tcyesno.yes)
ret = stpapi.update("tdpur4120m000",1,err)
stpapi.handle.subproc( "tdpur4120m000", "tdilc4113s000", "add")
if etol(ltlnt041.kltc) = 1 then
stpapi.put.field("tdilc4113s000","tdilc402.item",ltlnt041.item)
stpapi.put.field("tdilc4113s000","tdilc402.clot",ltlnt041.clot)
stpapi.put.field("tdilc4113s000","tdilc402.date",str$(date.num()))
get.storage.unit()
stpapi.put.field("tdilc4113s000","tdilc402.stun",tdpur041.cuqp)
stpapi.enum.answer("tdilc4113s000", "tdind41131", tcyesno.yes)
ret = stpapi.insert("tdilc4113s000",1,err)
stpapi.end.session("tdilc4113s000") | when i try to end this session
| two objects get activated
| tfgld4200 & tfgld1201
endif
endif
endselect
stpapi.get.field("tdpur4120m000", "tdpur045.reno", rcptno)
stpapi.end.session("tdpur4120m000")
please tell me where im going wrong.
Regards
Raviraj
I am trying to create Receipt for both lot and without lot controlled item. AFS works fine for without lot controlled Item. But in case of lot controlled item, it inserts the record properly in tdilc4113s000 for the first item.
But when i try to end the session to insert another lot controlled item.. the session tdilc4113s000 doesnt end.. instead 2 objects get invoked tfgld4200 and tfgld1201. I am not able to figure out why this objects are getting invoked..
The script which i wrote is as below
select ltlnt041.*
from ltlnt041
where ltlnt041._index1 = {:import.orno}
and ltlnt041.chall = :chall
and (ltlnt041.oqua - ltlnt041.dqua)>0
selectdo
if etol(ltlnt041.chck) = 1 then
stpapi.put.field("tdpur4120m000", "tdpur045.diqu", str$(ltlnt041.pqua))
stpapi.put.field("tdpur4120m000", "tdpur045.date", str$(date.num()))
if etol(ltlnt041.kltc) <> 1 then
stpapi.put.field("tdpur4120m000", "tdpur045.dqua", str$(ltlnt041.rqua))
endif
stpapi.enum.answer("tdpur4120m000", "tdind00008", tcyesno.yes)
ret = stpapi.update("tdpur4120m000",1,err)
stpapi.handle.subproc( "tdpur4120m000", "tdilc4113s000", "add")
if etol(ltlnt041.kltc) = 1 then
stpapi.put.field("tdilc4113s000","tdilc402.item",ltlnt041.item)
stpapi.put.field("tdilc4113s000","tdilc402.clot",ltlnt041.clot)
stpapi.put.field("tdilc4113s000","tdilc402.date",str$(date.num()))
get.storage.unit()
stpapi.put.field("tdilc4113s000","tdilc402.stun",tdpur041.cuqp)
stpapi.enum.answer("tdilc4113s000", "tdind41131", tcyesno.yes)
ret = stpapi.insert("tdilc4113s000",1,err)
stpapi.end.session("tdilc4113s000") | when i try to end this session
| two objects get activated
| tfgld4200 & tfgld1201
endif
endif
endselect
stpapi.get.field("tdpur4120m000", "tdpur045.reno", rcptno)
stpapi.end.session("tdpur4120m000")
please tell me where im going wrong.
Regards
Raviraj