fvdpbaan
5th September 2007, 14:29
Hello,
I'm trying to invoke session tipcf5120s000 from session tdsls4102s000 with AFS functionality. Session doesn't become active. I've added the part of the script that adds a sales orderline.
Item 38 is a generic item and after answering questioncode tdsls41045 with "yes" the session zooms to session tipcf5120s000 when you do this manually.
Has anyone an idea how to do this with AFS?
Kind regards,
Frank
function fill.afs.functions.tdslsf4102s000()
{
if first = 1 then
stpapi.handle.subproc("tdsls4101m000", "tdsls4102s000", "add")
stpapi.continue.process("tdsls4101m000", error.msg)
endif
stpapi.put.field("tdsls4102s000", "tdsls041.item", str$(38))
stpapi.handle.subproc("tdsls4102s000", "tipcf5120s000", "add")
stpapi.enum.answer("tdsls4102s000", "tdsls41045", tcyesno.yes)
stpapi.put.field("tipcf5120s000", "tipcf520.copt", tdvrk024.refa)
stpapi.application.option("tipcf5120s000", 1, 1, error.msg)
stpapi.enum.answer("tipcf5120s000", "tipcf51204", tcpcfa.end.program)
stpapi.enum.answer("tipcf5120s000", "tipcf51208", tcyesno.no)
stpapi.put.field("tdsls4102s000", "tdsls041.oqua", str$(tdvrk024.oqua))
stpapi.enum.answer("tdsls4102s000", "tdsls4102p", tcyesno.no)
stpapi.put.field("tdsls4102s000", "tdsls041.drct", str$(etol(tcyesno.no)))
stpapi.put.field("tdsls4102s000", "tdsls041.pric", str$(tdvrk024.pric))
stpapi.end.session("tdsls0130s000")
ret = stpapi.insert("tdsls4102s000", 1, error.msg)
}
I'm trying to invoke session tipcf5120s000 from session tdsls4102s000 with AFS functionality. Session doesn't become active. I've added the part of the script that adds a sales orderline.
Item 38 is a generic item and after answering questioncode tdsls41045 with "yes" the session zooms to session tipcf5120s000 when you do this manually.
Has anyone an idea how to do this with AFS?
Kind regards,
Frank
function fill.afs.functions.tdslsf4102s000()
{
if first = 1 then
stpapi.handle.subproc("tdsls4101m000", "tdsls4102s000", "add")
stpapi.continue.process("tdsls4101m000", error.msg)
endif
stpapi.put.field("tdsls4102s000", "tdsls041.item", str$(38))
stpapi.handle.subproc("tdsls4102s000", "tipcf5120s000", "add")
stpapi.enum.answer("tdsls4102s000", "tdsls41045", tcyesno.yes)
stpapi.put.field("tipcf5120s000", "tipcf520.copt", tdvrk024.refa)
stpapi.application.option("tipcf5120s000", 1, 1, error.msg)
stpapi.enum.answer("tipcf5120s000", "tipcf51204", tcpcfa.end.program)
stpapi.enum.answer("tipcf5120s000", "tipcf51208", tcyesno.no)
stpapi.put.field("tdsls4102s000", "tdsls041.oqua", str$(tdvrk024.oqua))
stpapi.enum.answer("tdsls4102s000", "tdsls4102p", tcyesno.no)
stpapi.put.field("tdsls4102s000", "tdsls041.drct", str$(etol(tcyesno.no)))
stpapi.put.field("tdsls4102s000", "tdsls041.pric", str$(tdvrk024.pric))
stpapi.end.session("tdsls0130s000")
ret = stpapi.insert("tdsls4102s000", 1, error.msg)
}