earizmendi
23rd May 2007, 20:28
Hi Everybody,
I'm working with my second AFS program, trying to complete the automatization of 1 session and 4 subsessions:
tfgld9110m000 (our version of tfgld1100m000)
tfgld1101s000
tfcmg2100s000 (Maintain Bank Transactions)
tfcmg2102s000(Reconciliation of anticipated payments/receipts)
tfcmg2103s000(Reconciliation of payments/receipts)
everything working fine until trying to open/handle the tfcmg2102s000 subsession, when the program execute the line "retval = stpapi.insert("tfcmg2100s000",true,error.msg)" its hangs.
Executing manually the process, the session tfcmg2102s000 its open when you save the record in tfcmg2100s000, maybe i have to do something else...
Please give some help with this, i insert the code...
thks!!!
| stpapi.put.field("tfgld9110m000","tfgld100.tedt",num.to.date$(date.num(),2))
stpapi.put.field("tfgld9110m000","tfgld100.tedt",str$(date.num()))
stpapi.put.field("tfgld9110m000","tfgld100.year",str$(year))
stpapi.put.field("tfgld9110m000","tfgld100.bref","AFS en Mantener Asientos")
stpapi.put.field("tfgld9110m000","tfgld100.fprd",str$(mont))
stpapi.put.field("tfgld9110m000","tfgld100.rprd",str$(mont))
stpapi.put.field("tfgld9110m000","tfgld100.vprd",str$(mont))
retval = stpapi.insert("tfgld9110m000",true,error.msg)
if not retval then
retval = stpapi.recover("tfgld9110m000", error.msg)
else
stpapi.save("tfgld9110m000",error.msg)
stpapi.handle.subproc("tfgld9110m000","tfgld1101s000","add")
stpapi.continue.process("tfgld9110m000",error.msg)
stpapi.put.field("tfgld1101s000","tfgld101.ttyp","B08")
| stpapi.continue.process("tfgld1101s000",error.msg)
retval = stpapi.insert("tfgld1101s000",true,error.msg)
| retval = stpapi.save("tfgld1101s000",error.msg)
if not retval then
retval = stpapi.recover("tfgld1101s000", error.msg)
else
stpapi.handle.subproc("tfgld1101s000","tfcmg2100s000","add")
stpapi.continue.process("tfgld1101s000",error.msg)
stpapi.put.field("tfcmg2100s000","tfcmg204.docn","0")
stpapi.put.field("tfcmg2100s000","tfcmg204.docd",str$(date.num()))
stpapi.put.field("tfcmg2100s000","tfcmg204.ccur"," MN")
stpapi.put.field("tfcmg2100s000","tfcmg204.tran",str$(etol(tfcmg.tran.reconc.suppl)))
retval = stpapi.insert("tfcmg2100s000",true,error.msg)
stpapi.handle.subproc("tfcmg2100s000","tfcmg2102s000","add")
stpapi.continue.process("tfcmg2100s000",error.msg)
stpapi.put.field("tfcmg2102s000","tfcmg110.bank","R08")
stpapi.put.field("tfcmg2102s000","tfcmg110.tdoc","PC1")
stpapi.put.field("tfcmg2102s000","tfcmg110.pdoc","1724")
retval = stpapi.find("tfcmg2102s000",error.msg)
if retval then
stpapi.handle.subproc("tfcmg2102s000","tfcmg2103s000","add")
stpapi.continue.process("tfcmg2102s000",error.msg)
stpapi.put.field("tfcmg2103s000","bank.stpd",str$(etol(tfcmg.stpd.complete)))
stpapi.continue.process("tfcmg2103s000",error.msg)
stpapi.end.session("tfcmg2103s000")
endif
| retval = stpapi.insert("tfcmg2100s000",true,error.msg)
stpapi.end.session("tfcmg2102s000")
| retval = stpapi.save("tfgld1101s000",error.msg)
if not retval then
retval = stpapi.recover("tfcmg2100s000", error.msg)
else
endif
stpapi.end.session("tfcmg2100s000")
endif
stpapi.end.session("tfgld1101s000")
endif
stpapi.end.session("tfgld9110m000")
}
I'm working with my second AFS program, trying to complete the automatization of 1 session and 4 subsessions:
tfgld9110m000 (our version of tfgld1100m000)
tfgld1101s000
tfcmg2100s000 (Maintain Bank Transactions)
tfcmg2102s000(Reconciliation of anticipated payments/receipts)
tfcmg2103s000(Reconciliation of payments/receipts)
everything working fine until trying to open/handle the tfcmg2102s000 subsession, when the program execute the line "retval = stpapi.insert("tfcmg2100s000",true,error.msg)" its hangs.
Executing manually the process, the session tfcmg2102s000 its open when you save the record in tfcmg2100s000, maybe i have to do something else...
Please give some help with this, i insert the code...
thks!!!
| stpapi.put.field("tfgld9110m000","tfgld100.tedt",num.to.date$(date.num(),2))
stpapi.put.field("tfgld9110m000","tfgld100.tedt",str$(date.num()))
stpapi.put.field("tfgld9110m000","tfgld100.year",str$(year))
stpapi.put.field("tfgld9110m000","tfgld100.bref","AFS en Mantener Asientos")
stpapi.put.field("tfgld9110m000","tfgld100.fprd",str$(mont))
stpapi.put.field("tfgld9110m000","tfgld100.rprd",str$(mont))
stpapi.put.field("tfgld9110m000","tfgld100.vprd",str$(mont))
retval = stpapi.insert("tfgld9110m000",true,error.msg)
if not retval then
retval = stpapi.recover("tfgld9110m000", error.msg)
else
stpapi.save("tfgld9110m000",error.msg)
stpapi.handle.subproc("tfgld9110m000","tfgld1101s000","add")
stpapi.continue.process("tfgld9110m000",error.msg)
stpapi.put.field("tfgld1101s000","tfgld101.ttyp","B08")
| stpapi.continue.process("tfgld1101s000",error.msg)
retval = stpapi.insert("tfgld1101s000",true,error.msg)
| retval = stpapi.save("tfgld1101s000",error.msg)
if not retval then
retval = stpapi.recover("tfgld1101s000", error.msg)
else
stpapi.handle.subproc("tfgld1101s000","tfcmg2100s000","add")
stpapi.continue.process("tfgld1101s000",error.msg)
stpapi.put.field("tfcmg2100s000","tfcmg204.docn","0")
stpapi.put.field("tfcmg2100s000","tfcmg204.docd",str$(date.num()))
stpapi.put.field("tfcmg2100s000","tfcmg204.ccur"," MN")
stpapi.put.field("tfcmg2100s000","tfcmg204.tran",str$(etol(tfcmg.tran.reconc.suppl)))
retval = stpapi.insert("tfcmg2100s000",true,error.msg)
stpapi.handle.subproc("tfcmg2100s000","tfcmg2102s000","add")
stpapi.continue.process("tfcmg2100s000",error.msg)
stpapi.put.field("tfcmg2102s000","tfcmg110.bank","R08")
stpapi.put.field("tfcmg2102s000","tfcmg110.tdoc","PC1")
stpapi.put.field("tfcmg2102s000","tfcmg110.pdoc","1724")
retval = stpapi.find("tfcmg2102s000",error.msg)
if retval then
stpapi.handle.subproc("tfcmg2102s000","tfcmg2103s000","add")
stpapi.continue.process("tfcmg2102s000",error.msg)
stpapi.put.field("tfcmg2103s000","bank.stpd",str$(etol(tfcmg.stpd.complete)))
stpapi.continue.process("tfcmg2103s000",error.msg)
stpapi.end.session("tfcmg2103s000")
endif
| retval = stpapi.insert("tfcmg2100s000",true,error.msg)
stpapi.end.session("tfcmg2102s000")
| retval = stpapi.save("tfgld1101s000",error.msg)
if not retval then
retval = stpapi.recover("tfcmg2100s000", error.msg)
else
endif
stpapi.end.session("tfcmg2100s000")
endif
stpapi.end.session("tfgld1101s000")
endif
stpapi.end.session("tfgld9110m000")
}