blanchap
23rd April 2018, 23:02
Hi,
trying to insert record in tfacp1110s000 with an AFS.
stpapi.put.field("tfgld1100m000", "tfgld100.year", str$(year.x))
stpapi.put.field("tfgld1100m000", "tfgld100.btno", btno.x)
rc = stpapi.find("tfgld1100m000", errmsg)
if rc <> 1 then
stpapi.end.session("tfgld1100m000")
end()
endif
stpapi.handle.subproc("tfgld1100m000", "tfgld1101s000", "add")
stpapi.continue.process("tfgld1100m000", errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif
stpapi.put.field("tfgld1101s000", "tfgld101.year", str$(year.x))
stpapi.put.field("tfgld1101s000", "tfgld101.btno", btno.x)
stpapi.put.field("tfgld1101s000", "tfgld101.ttyp", ttyp.z)
rc = stpapi.find("tfgld1101s000", errmsg)
if rc <> 1 then
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif
stpapi.handle.subproc("tfgld1101s000", "tfacp1110s000", "add")
stpapi.continue.process("tfgld1101s000", errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfgld1110s000")
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif
stpapi.put.field("tfacp1110s000", "tfacp200.ttyp", ttyp.z)
stpapi.put.field("tfacp1110s000", "tfacp200.docn", str$(seq.number))
stpapi.put.field("tfacp1110s000", "tfacp200.suno", str$(tdwsl750.suno))
stpapi.put.field("tfacp1110s000", "tfacp200.docd", str$(date.num()))
stpapi.put.field("tfacp1110s000", "screen.amnt", str$(tdwsl750.amnt))
stpapi.put.field("tfacp1110s000", "tfacp200.isup", tdwsl750.invn)
stpapi.put.field("tfacp1110s000", "tfacp200.vatc", "020")
stpapi.put.field("tfacp1110s000", "tfacp200.vaty", "2017")
stpapi.put.field("tfacp1110s000", "tfacp200.vatp", "11")
stpapi.put.field("tfacp1110s000", "way.bill", "1")
stpapi.put.field("tfacp1110s000", "weight", "1")
stpapi.put.field("tfacp1110s000", "unit", "LB")
rc = stpapi.insert("tfacp1110s000", true, errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfacp1110s000")
stpapi.end.session("tfacp1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif
ran it in debug and it's all ok until i reach the stpapi.insert
once i reach that line, it hangs. does not go anywhere. no error message.
am i missing something?
Thanks
trying to insert record in tfacp1110s000 with an AFS.
stpapi.put.field("tfgld1100m000", "tfgld100.year", str$(year.x))
stpapi.put.field("tfgld1100m000", "tfgld100.btno", btno.x)
rc = stpapi.find("tfgld1100m000", errmsg)
if rc <> 1 then
stpapi.end.session("tfgld1100m000")
end()
endif
stpapi.handle.subproc("tfgld1100m000", "tfgld1101s000", "add")
stpapi.continue.process("tfgld1100m000", errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif
stpapi.put.field("tfgld1101s000", "tfgld101.year", str$(year.x))
stpapi.put.field("tfgld1101s000", "tfgld101.btno", btno.x)
stpapi.put.field("tfgld1101s000", "tfgld101.ttyp", ttyp.z)
rc = stpapi.find("tfgld1101s000", errmsg)
if rc <> 1 then
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif
stpapi.handle.subproc("tfgld1101s000", "tfacp1110s000", "add")
stpapi.continue.process("tfgld1101s000", errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfgld1110s000")
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif
stpapi.put.field("tfacp1110s000", "tfacp200.ttyp", ttyp.z)
stpapi.put.field("tfacp1110s000", "tfacp200.docn", str$(seq.number))
stpapi.put.field("tfacp1110s000", "tfacp200.suno", str$(tdwsl750.suno))
stpapi.put.field("tfacp1110s000", "tfacp200.docd", str$(date.num()))
stpapi.put.field("tfacp1110s000", "screen.amnt", str$(tdwsl750.amnt))
stpapi.put.field("tfacp1110s000", "tfacp200.isup", tdwsl750.invn)
stpapi.put.field("tfacp1110s000", "tfacp200.vatc", "020")
stpapi.put.field("tfacp1110s000", "tfacp200.vaty", "2017")
stpapi.put.field("tfacp1110s000", "tfacp200.vatp", "11")
stpapi.put.field("tfacp1110s000", "way.bill", "1")
stpapi.put.field("tfacp1110s000", "weight", "1")
stpapi.put.field("tfacp1110s000", "unit", "LB")
rc = stpapi.insert("tfacp1110s000", true, errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfacp1110s000")
stpapi.end.session("tfacp1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif
ran it in debug and it's all ok until i reach the stpapi.insert
once i reach that line, it hangs. does not go anywhere. no error message.
am i missing something?
Thanks