gtuser
30th May 2006, 22:51
We are able add headers for sales order tdsls4101m000 using AFS. But we get the error message "Input cancelled on field ordered quantity". This just happens to be the last field before we try to populate the table.
We can manually enter this order with no problem. The only pop up we get is for insuff inventory. Could anyone tell me by looking at my code below if there is something else that I need to add to make sure I have that pop up covered?
Here is a sample of our coding for the sub session:
function run.sub.sess()
{
|*** This function invokes sub-session tdsls4102s001 and updates the
|*** quantity field
stpapi.handle.subproc( "tdsls4101m001", "tdsls4102s001", "add")
stpapi.continue.process("tdsls4101m001",error.msg)
stpapi.handle.subproc("tdsls4102s001", "mtdsls000090451", "10")
work.pono = "2"
error.msg2 = ""
stpapi.put.field("tdsls4102s001", "tdsls041.orno",work.orno)
stpapi.put.field("tdsls4102s001", "tdsls041.pono",str$(2))
|stpapi.put.field("tdsls4102s001", "tdsls041.pono",str$(3))
stpapi.put.field("tdsls4102s001", "tdsls041.cuno",cuno)
stpapi.put.field("tdsls4102s001", "tdsls041.eseq",eseq)
stpapi.put.field("tdsls4102s001", "tdsls041.item",work.item)
stpapi.put.field("tdsls4102s001", "tdsls041.oqua",oqua)
retval1 = stpapi.insert("tdsls4102s001",1 ,error.msg)
if not retval1 then
message("tdsls4102s001 Order Lines = %s ", error.msg)
error.msg2 = error.msg
retval2 = stpapi.recover("tdsls4102s001", error.msg)
all.ok = false
endif
|if error.msg2 <> "" then
| rprt_send()
|endif
stpapi.end.session("tdsls4102s001")
stpapi.end.session("tdsls4101m001")
stpapi.end.session("tdsls4503s001")
}
Thank you,
Mar
We can manually enter this order with no problem. The only pop up we get is for insuff inventory. Could anyone tell me by looking at my code below if there is something else that I need to add to make sure I have that pop up covered?
Here is a sample of our coding for the sub session:
function run.sub.sess()
{
|*** This function invokes sub-session tdsls4102s001 and updates the
|*** quantity field
stpapi.handle.subproc( "tdsls4101m001", "tdsls4102s001", "add")
stpapi.continue.process("tdsls4101m001",error.msg)
stpapi.handle.subproc("tdsls4102s001", "mtdsls000090451", "10")
work.pono = "2"
error.msg2 = ""
stpapi.put.field("tdsls4102s001", "tdsls041.orno",work.orno)
stpapi.put.field("tdsls4102s001", "tdsls041.pono",str$(2))
|stpapi.put.field("tdsls4102s001", "tdsls041.pono",str$(3))
stpapi.put.field("tdsls4102s001", "tdsls041.cuno",cuno)
stpapi.put.field("tdsls4102s001", "tdsls041.eseq",eseq)
stpapi.put.field("tdsls4102s001", "tdsls041.item",work.item)
stpapi.put.field("tdsls4102s001", "tdsls041.oqua",oqua)
retval1 = stpapi.insert("tdsls4102s001",1 ,error.msg)
if not retval1 then
message("tdsls4102s001 Order Lines = %s ", error.msg)
error.msg2 = error.msg
retval2 = stpapi.recover("tdsls4102s001", error.msg)
all.ok = false
endif
|if error.msg2 <> "" then
| rprt_send()
|endif
stpapi.end.session("tdsls4102s001")
stpapi.end.session("tdsls4101m001")
stpapi.end.session("tdsls4503s001")
}
Thank you,
Mar