avy666
21st January 2010, 12:51
Hi :)
I need to update the field "frm.mat.to.cancel" in session "timfc0101m000" and to run process change quantity (process.chg.qty). But when the field "frm.mat.to.cancel" has been changed,the action "when.field.changes" is not ran and the variable "changed.header" is not changed to "true" at the script.
stpapi.put.field("ticst0101m000","ticst001.pdno",_pdno)
stpapi.put.field("ticst0101m000","ticst001.pono",str$(_pono))
ret=stpapi.find("ticst0101m000", err.msg)
if ret then
ret=stpapi.mark("ticst0101m000", err.msg)
if ret then
stpapi.handle.subproc("ticst0101m000", "timfc0101m000", "add")
stpapi.form.command("ticst0101m000",2,"timfc0101m000", err.msg)
stpapi.put.field("timfc0101m000","timfc001.pdno",_pdno)
stpapi.put.field("timfc0101m000","timfc001.pono",str$(_pono))
ret=stpapi.find("timfc0101m000", msg.out)
if ret then
stpapi.synchronize.dialog("timfc0101m000", "modify", err.msg)
stpapi.put.field("timfc0101m000","frm.mat.to.cancel",str$(_iswh))
stpapi.update("timfc0101m000", false, err.msg)
stpapi.form.command("timfc0101m000",5,"process.chg.qty",err.msg)
endif
endif
stpapi.end.session("timfc0101m000")
endif
stpapi.end.session("ticst0101m000")
How can i cancel the material line in this session via AFS?
I need to update the field "frm.mat.to.cancel" in session "timfc0101m000" and to run process change quantity (process.chg.qty). But when the field "frm.mat.to.cancel" has been changed,the action "when.field.changes" is not ran and the variable "changed.header" is not changed to "true" at the script.
stpapi.put.field("ticst0101m000","ticst001.pdno",_pdno)
stpapi.put.field("ticst0101m000","ticst001.pono",str$(_pono))
ret=stpapi.find("ticst0101m000", err.msg)
if ret then
ret=stpapi.mark("ticst0101m000", err.msg)
if ret then
stpapi.handle.subproc("ticst0101m000", "timfc0101m000", "add")
stpapi.form.command("ticst0101m000",2,"timfc0101m000", err.msg)
stpapi.put.field("timfc0101m000","timfc001.pdno",_pdno)
stpapi.put.field("timfc0101m000","timfc001.pono",str$(_pono))
ret=stpapi.find("timfc0101m000", msg.out)
if ret then
stpapi.synchronize.dialog("timfc0101m000", "modify", err.msg)
stpapi.put.field("timfc0101m000","frm.mat.to.cancel",str$(_iswh))
stpapi.update("timfc0101m000", false, err.msg)
stpapi.form.command("timfc0101m000",5,"process.chg.qty",err.msg)
endif
endif
stpapi.end.session("timfc0101m000")
endif
stpapi.end.session("ticst0101m000")
How can i cancel the material line in this session via AFS?