tan.wang
26th August 2016, 11:08
Could any one help me to solve my question?
we want open the session tfacp2600m000 by afs and set value in it
but It can not be direct open,
If we want to open "tfacp2600m000" we only can use form command
stpapi.form.command("tfgld1140m000", 5, "exec.cont.process",error.msg)
in session tfgld1140m000 first,it will open "tfacp2600m000" session
we try to
|==================AFS tfgld1140m000=========================
stpapi.put.field("tfgld1140m000", "tfgld140.user", logged.user)
ret = stpapi.find("tfgld1140m000", error.msg)
if ret = 1 then
stpapi.get.field("tfgld1140m000", "tfgld140.ttyp", l.afs.ttyp)
stpapi.get.field("tfgld1140m000", "tfgld140.btno", l.afs.btno)
ret = stpapi.mark("tfgld1140m000", error.msg)
if ret = 1 then
stpapi.handle.subproc("tfgld1140m000", "tfacp2600m000","add")
stpapi.form.command("tfgld1140m000", 5, "exec.cont.process", error.msg)
|==================AFS tfacp2600m000=========================
stpapi.put.field("tfacp2600m000", "tfacp200.ttyp", l.afs.ttyp)
stpapi.put.field("tfacp2600m000", "tfacp200.ninv", default)
stpapi.put.field("tfacp2600m000", "tfacp200.appr", str$(etol(tfacp.inv.purchase)))
stpapi.put.field("tfacp2600m000", "tfacp200.orno", tdddc002.orno)
stpapi.put.field("tfacp2600m000", "tfacp200.ifbp", tdddc002.ifbp)
l.docd = num.to.date$(tdddc002.usdt, 2)
stpapi.put.field("tfacp2600m000", "tfacp200.docd", l.docd)
stpapi.put.field("tfacp2600m000", "screen.amnt", str$(tdddc002.iamt))
stpapi.put.field("tfacp2600m000", "tfacp200.lvat", str$(etol(tfacp.vatc.header)))
stpapi.form.command("tfacp2600m000", 5, "exec.user.0", error.msg)
but it's not work,we can't set value on "tfacp2600m000" session and stpapi.form.command("tfacp2600m000", 5, "exec.user.0", error.msg)is not work, althoughwe set tfacp200.appr = tfacp.inv.purchase but there was a error return,the massage is tfacp200.appr<> tfacp.inv.purchase.
Does any body have an Idea about this issue?
thank you
we want open the session tfacp2600m000 by afs and set value in it
but It can not be direct open,
If we want to open "tfacp2600m000" we only can use form command
stpapi.form.command("tfgld1140m000", 5, "exec.cont.process",error.msg)
in session tfgld1140m000 first,it will open "tfacp2600m000" session
we try to
|==================AFS tfgld1140m000=========================
stpapi.put.field("tfgld1140m000", "tfgld140.user", logged.user)
ret = stpapi.find("tfgld1140m000", error.msg)
if ret = 1 then
stpapi.get.field("tfgld1140m000", "tfgld140.ttyp", l.afs.ttyp)
stpapi.get.field("tfgld1140m000", "tfgld140.btno", l.afs.btno)
ret = stpapi.mark("tfgld1140m000", error.msg)
if ret = 1 then
stpapi.handle.subproc("tfgld1140m000", "tfacp2600m000","add")
stpapi.form.command("tfgld1140m000", 5, "exec.cont.process", error.msg)
|==================AFS tfacp2600m000=========================
stpapi.put.field("tfacp2600m000", "tfacp200.ttyp", l.afs.ttyp)
stpapi.put.field("tfacp2600m000", "tfacp200.ninv", default)
stpapi.put.field("tfacp2600m000", "tfacp200.appr", str$(etol(tfacp.inv.purchase)))
stpapi.put.field("tfacp2600m000", "tfacp200.orno", tdddc002.orno)
stpapi.put.field("tfacp2600m000", "tfacp200.ifbp", tdddc002.ifbp)
l.docd = num.to.date$(tdddc002.usdt, 2)
stpapi.put.field("tfacp2600m000", "tfacp200.docd", l.docd)
stpapi.put.field("tfacp2600m000", "screen.amnt", str$(tdddc002.iamt))
stpapi.put.field("tfacp2600m000", "tfacp200.lvat", str$(etol(tfacp.vatc.header)))
stpapi.form.command("tfacp2600m000", 5, "exec.user.0", error.msg)
but it's not work,we can't set value on "tfacp2600m000" session and stpapi.form.command("tfacp2600m000", 5, "exec.user.0", error.msg)is not work, althoughwe set tfacp200.appr = tfacp.inv.purchase but there was a error return,the massage is tfacp200.appr<> tfacp.inv.purchase.
Does any body have an Idea about this issue?
thank you