Hello All,
I have a strange problem while updating the Purchase order header with a new delivery date in Baan4c4
I am attaching the part of the code which I am using it does not give any error however the field does not get updated.
Also note that this session to update the delivery date is called in the Special of the session Maintain Purchase Order.Is it because the Maintain Purchase Order session is already open ?
function update.delivery.date.afs()
{
domain tcmcs.str10 ddat.2
stpapi.put.field( "tdpur4101m000", "tdpur040.orno", str$(orno.f) )
ret = stpapi.find( "tdpur4101m000" , error )
stpapi.change.view( "tdpur4101m000" )
stpapi.put.field( "tdpur4101m000", "tdpur040.orno", str$(orno.f) )
ret = stpapi.find( "tdpur4101m000" , error )
stpapi.put.field("tdpur4101m000","tdpur040.ddat",str$(ddat.1))
stpapi.get.field("tdpur4101m000","tdpur040.ddat",ddat.2)
ret = stpapi.update("tdpur4101m000",0,afs.err.msg)
stpapi.save("tdpur4101m000", afs.err.msg)
stpapi.recover("tdpur4101m000",afs.err.msg)
if not isspace(afs.err.msg) then
message("%s",afs.err.msg)
endif
stpapi.end.session("tdpur4101m000",afs.err.msg)
}
I have a strange problem while updating the Purchase order header with a new delivery date in Baan4c4
I am attaching the part of the code which I am using it does not give any error however the field does not get updated.
Also note that this session to update the delivery date is called in the Special of the session Maintain Purchase Order.Is it because the Maintain Purchase Order session is already open ?
function update.delivery.date.afs()
{
domain tcmcs.str10 ddat.2
stpapi.put.field( "tdpur4101m000", "tdpur040.orno", str$(orno.f) )
ret = stpapi.find( "tdpur4101m000" , error )
stpapi.change.view( "tdpur4101m000" )
stpapi.put.field( "tdpur4101m000", "tdpur040.orno", str$(orno.f) )
ret = stpapi.find( "tdpur4101m000" , error )
stpapi.put.field("tdpur4101m000","tdpur040.ddat",str$(ddat.1))
stpapi.get.field("tdpur4101m000","tdpur040.ddat",ddat.2)
ret = stpapi.update("tdpur4101m000",0,afs.err.msg)
stpapi.save("tdpur4101m000", afs.err.msg)
stpapi.recover("tdpur4101m000",afs.err.msg)
if not isspace(afs.err.msg) then
message("%s",afs.err.msg)
endif
stpapi.end.session("tdpur4101m000",afs.err.msg)
}