ppchong
21st September 2011, 11:29
Hi Baan Expert,
i face a problem of using the AFS to delete record in a session call "Maintain Estimated End items (pspmg0113m000). Found that not able to select/mark a record and delete it. Details of the script as below :
*****************************************************
long retValFind, retValMark, retValDelete, retVal1, retVal2,rc
stpapi.put.field("pspmg0113m000", "pspmg013.orno", strip$(str$(ornoTxt)))
stpapi.put.field("pspmg0113m000", "pspmg013.cntr", strip$(str$(pspmg801.cntr)))
retValFind = stpapi.find("pspmg0113m000",error.msg)
if retValFind then |found
rc = stpapi.change.view("pspmg0113m000",error.msg)
retValMark = stpapi.Mark("pspmg0113m000")
if retValMark then
retValDelete = stpapi.delete("pspmg0113m000", true, error.msg)
if not isspace(error.msg) then
retval2 = stpapi.recover("pspmg0113m000", recover.msg)
Error.desc = "Error occur in Maintain Estimated end item -- during Delete container"
brp.ready(brp1.id)
else
|** Production size will be changed; Continue ?
stpapi.enum.answer("pspmg0113m000", "pspmg01132", tcyesno.yes)
stpapi.continue.process("pspmg0113m000",error.msg)
endif
endif
else
Error.desc = "Error occur in maintain Estimated end item FIND process -- during Delete container"
brp.ready(brp1.id) |**** send_error_report
endif
stpapi.end.session("pspmg0113m000")
*********************************************
i face a problem of using the AFS to delete record in a session call "Maintain Estimated End items (pspmg0113m000). Found that not able to select/mark a record and delete it. Details of the script as below :
*****************************************************
long retValFind, retValMark, retValDelete, retVal1, retVal2,rc
stpapi.put.field("pspmg0113m000", "pspmg013.orno", strip$(str$(ornoTxt)))
stpapi.put.field("pspmg0113m000", "pspmg013.cntr", strip$(str$(pspmg801.cntr)))
retValFind = stpapi.find("pspmg0113m000",error.msg)
if retValFind then |found
rc = stpapi.change.view("pspmg0113m000",error.msg)
retValMark = stpapi.Mark("pspmg0113m000")
if retValMark then
retValDelete = stpapi.delete("pspmg0113m000", true, error.msg)
if not isspace(error.msg) then
retval2 = stpapi.recover("pspmg0113m000", recover.msg)
Error.desc = "Error occur in Maintain Estimated end item -- during Delete container"
brp.ready(brp1.id)
else
|** Production size will be changed; Continue ?
stpapi.enum.answer("pspmg0113m000", "pspmg01132", tcyesno.yes)
stpapi.continue.process("pspmg0113m000",error.msg)
endif
endif
else
Error.desc = "Error occur in maintain Estimated end item FIND process -- during Delete container"
brp.ready(brp1.id) |**** send_error_report
endif
stpapi.end.session("pspmg0113m000")
*********************************************