umadevi
8th September 2009, 16:23
Hi All,
I am automating the Match and Approval of Purchase Invoices.
My Problem is while i am insering the reocrd in tfacp111s000 ,tfacp1230s000 is running in the background.
Where in tfacp1230s000 session I have to set the Match and Approve fileds to "Yes". I am not understanding how its happening(this session tfacp1230s000 running in background).Hope i get the solution here.
My code is
transaction.type = "PRM"
stpapi.application.option("tfgld1101m000",1, 1, error.msg1)
stpapi.put.field("tfgld1101m000", "tedt.f", str$(tedt))
stpapi.put.field("tfgld1101m000", "tfgld101.year", str$(year))
ret.code = stpapi.change.view("tfgld1101m000", error.msg1)
stpapi.application.option("tfgld1101m000",1, 14, error.msg1)
stpapi.put.field("tfgld1101m000", "tfgld101.ttyp", ransaction.type)
insert.retval = stpapi.insert("tfgld1101m000", true, message.i)
if not insert.retval then
fail.retval = stpapi.recover("tfgld1101m000", dummy.msg)
else
last.found = stpapi.browse.set("tfgld1101m000", "last.set",error1)
if last.found then
stpapi.get.field("tfgld1101m000","tfgld101.year",year1)
stpapi.get.field("tfgld1101m000","tfgld101.btno",btno)
stpapi.get.field("tfgld1101m000","tfgld101.ttyp",tfgld101.ttyp)
stpapi.put.field("tfgld1101m000","tfgld101.year",str$(year))
stpapi.put.field("tfgld1101m000","tfgld101.btno",str$(btno))
stpapi.put.field("tfgld1101m000","tfgld101.ttyp","tfgld101.ttyp")
retval = stpapi.find("tfgld1101m000", error.msg)
retval = stpapi.mark("tfgld1101m000", error.msg)
if retval = 1 then
stpapi.handle.subproc( "tfgld1101m000", "tfacp1110s000", "add")
stpapi.zoom.option("tfgld1101m000", 1, "tfacp1110s000", error.msg)
stpapi.continue.process("tfacp1110s000", process.error.msg)
browse.val = stpapi.browse.view("tfacp1110s000", "last.view", error.msg)
ret.code = stpapi.change.view("tfacp1110s000", error.msg1)
stpapi.put.field("tfacp1110s000", "tfacp200.suno",str$(tdpur040.suno))
stpapi.put.field("tfacp1110s000","screen.amnt",str$(tdpwn002.iamt))
stpapi.put.field("tfacp1110s000","tfacp200.isup",str$(tdpwn002.invn))
|stpapi.put.field("tfacp1110s000",tfacp200.orno,str$(tdpwn002.orno))
retval1 = stpapi.insert("tfacp1110s000", true, error.msg2) | At this Point of |time i am able to see tfacp1230s000 in the background
if retval1 = 1 then
last.found1 = stpapi.browse.set("tfacp1110s000", "last.set",error2)
if last.found1 then
stpapi.get.field("tfacp1110s000","tfacp200.ttyp",tfacp200.ttyp)
stpapi.get.field("tfacp1110s000","tfacp200.ninv",doc1)
stpapi.get.field("tfacp1110s000","tfacp200.line",line1)
stpapi.get.field("tfacp1110s000","tfacp200.tdoc",tfacp200.tdoc)
stpapi.get.field("tfacp1110s000","tfacp200.docn",doc2)
stpapi.get.field("tfacp1110s000","tfacp200.lino",line2)
stpapi.put.field("tfacp1110s000","tfacp200.ttyp","tfacp200.ttyp")
stpapi.put.field("tfacp1110s000","tfacp200.ninv","tfacp200.ninv")
stpapi.put.field("tfacp1110s000","tfacp200.line","tfacp200.line")
stpapi.put.field("tfacp1110s000","tfacp200.tdoc","tfacp200.tdoc")
stpapi.put.field("tfacp1110s000","tfacp200.docn","tfacp200.docn")
stpapi.put.field("tfacp1110s000","tfacp200.lino","tfacp200.lino")
retval = stpapi.find("tfacp1110s000", error.msg3)
retval = stpapi.mark("tfacp1110s000", error.msg4)
if retval = 1 then
stpapi.handle.subproc( "tfacp1110s000", "tfacp1230s000", "add")
stpapi.continue.process("tfacp1230s000", process.error.msg)
endif
endif
endif
endif
Regards,
Uma
I am automating the Match and Approval of Purchase Invoices.
My Problem is while i am insering the reocrd in tfacp111s000 ,tfacp1230s000 is running in the background.
Where in tfacp1230s000 session I have to set the Match and Approve fileds to "Yes". I am not understanding how its happening(this session tfacp1230s000 running in background).Hope i get the solution here.
My code is
transaction.type = "PRM"
stpapi.application.option("tfgld1101m000",1, 1, error.msg1)
stpapi.put.field("tfgld1101m000", "tedt.f", str$(tedt))
stpapi.put.field("tfgld1101m000", "tfgld101.year", str$(year))
ret.code = stpapi.change.view("tfgld1101m000", error.msg1)
stpapi.application.option("tfgld1101m000",1, 14, error.msg1)
stpapi.put.field("tfgld1101m000", "tfgld101.ttyp", ransaction.type)
insert.retval = stpapi.insert("tfgld1101m000", true, message.i)
if not insert.retval then
fail.retval = stpapi.recover("tfgld1101m000", dummy.msg)
else
last.found = stpapi.browse.set("tfgld1101m000", "last.set",error1)
if last.found then
stpapi.get.field("tfgld1101m000","tfgld101.year",year1)
stpapi.get.field("tfgld1101m000","tfgld101.btno",btno)
stpapi.get.field("tfgld1101m000","tfgld101.ttyp",tfgld101.ttyp)
stpapi.put.field("tfgld1101m000","tfgld101.year",str$(year))
stpapi.put.field("tfgld1101m000","tfgld101.btno",str$(btno))
stpapi.put.field("tfgld1101m000","tfgld101.ttyp","tfgld101.ttyp")
retval = stpapi.find("tfgld1101m000", error.msg)
retval = stpapi.mark("tfgld1101m000", error.msg)
if retval = 1 then
stpapi.handle.subproc( "tfgld1101m000", "tfacp1110s000", "add")
stpapi.zoom.option("tfgld1101m000", 1, "tfacp1110s000", error.msg)
stpapi.continue.process("tfacp1110s000", process.error.msg)
browse.val = stpapi.browse.view("tfacp1110s000", "last.view", error.msg)
ret.code = stpapi.change.view("tfacp1110s000", error.msg1)
stpapi.put.field("tfacp1110s000", "tfacp200.suno",str$(tdpur040.suno))
stpapi.put.field("tfacp1110s000","screen.amnt",str$(tdpwn002.iamt))
stpapi.put.field("tfacp1110s000","tfacp200.isup",str$(tdpwn002.invn))
|stpapi.put.field("tfacp1110s000",tfacp200.orno,str$(tdpwn002.orno))
retval1 = stpapi.insert("tfacp1110s000", true, error.msg2) | At this Point of |time i am able to see tfacp1230s000 in the background
if retval1 = 1 then
last.found1 = stpapi.browse.set("tfacp1110s000", "last.set",error2)
if last.found1 then
stpapi.get.field("tfacp1110s000","tfacp200.ttyp",tfacp200.ttyp)
stpapi.get.field("tfacp1110s000","tfacp200.ninv",doc1)
stpapi.get.field("tfacp1110s000","tfacp200.line",line1)
stpapi.get.field("tfacp1110s000","tfacp200.tdoc",tfacp200.tdoc)
stpapi.get.field("tfacp1110s000","tfacp200.docn",doc2)
stpapi.get.field("tfacp1110s000","tfacp200.lino",line2)
stpapi.put.field("tfacp1110s000","tfacp200.ttyp","tfacp200.ttyp")
stpapi.put.field("tfacp1110s000","tfacp200.ninv","tfacp200.ninv")
stpapi.put.field("tfacp1110s000","tfacp200.line","tfacp200.line")
stpapi.put.field("tfacp1110s000","tfacp200.tdoc","tfacp200.tdoc")
stpapi.put.field("tfacp1110s000","tfacp200.docn","tfacp200.docn")
stpapi.put.field("tfacp1110s000","tfacp200.lino","tfacp200.lino")
retval = stpapi.find("tfacp1110s000", error.msg3)
retval = stpapi.mark("tfacp1110s000", error.msg4)
if retval = 1 then
stpapi.handle.subproc( "tfacp1110s000", "tfacp1230s000", "add")
stpapi.continue.process("tfacp1230s000", process.error.msg)
endif
endif
endif
endif
Regards,
Uma