tomzak
21st August 2009, 11:04
Hi @all
I want to write an automatic session to insert records into the general ledger. I can create the batch-status (tfgld100) and the main transaction (tfgld101). But when I try to insert a voucher into tfgld102 i allways get the message "command disabled". My code looks like that:
retVal = stpapi.browse.view("tfgld1101m000", "last.view", error.msg)
if (retVal = 1) then
retVal = stpapi.mark("tfgld1101m000", error.msg)
if (retVal = 1) then
stpapi.put.field("tfgld1114s000", "tfgld102.ttyp", "CAB")
retVal = stpapi.change.view("tfgld1114s000", error.msg)
retVal = stpapi.browse.view("tfgld1103s000", "last.view", error.msg)
stpapi.handle.subproc("tfgld1101m000", "tfgld1103s000", "add")
stpapi.continue.process("tfgld1101m000", error.msg)
retVal = stpapi.change.view("tfgld1103s000", error.msg)
endif
endif
stpapi.put.field("tfgld1103s000", "tfgld102.ttyp", str$("CAB"))
stpapi.put.field("tfgld1103s000", "tfgld102.docn", str$(201))
.
.
retVal = stpapi.insert("tfgld1103s000", 1, error.msg)
if (retVal = 0) then
rc = stpapi.recover("tfgld1103s000", w.err.msg)
endif
return (retVal)
At the "stpapi.continue.process" the error.message is "command disabled". I searched the forum for this problem, but didn't found any solution for this. We are using BaanERP (B50Ccstnd)
Kind regards
Thomas
I want to write an automatic session to insert records into the general ledger. I can create the batch-status (tfgld100) and the main transaction (tfgld101). But when I try to insert a voucher into tfgld102 i allways get the message "command disabled". My code looks like that:
retVal = stpapi.browse.view("tfgld1101m000", "last.view", error.msg)
if (retVal = 1) then
retVal = stpapi.mark("tfgld1101m000", error.msg)
if (retVal = 1) then
stpapi.put.field("tfgld1114s000", "tfgld102.ttyp", "CAB")
retVal = stpapi.change.view("tfgld1114s000", error.msg)
retVal = stpapi.browse.view("tfgld1103s000", "last.view", error.msg)
stpapi.handle.subproc("tfgld1101m000", "tfgld1103s000", "add")
stpapi.continue.process("tfgld1101m000", error.msg)
retVal = stpapi.change.view("tfgld1103s000", error.msg)
endif
endif
stpapi.put.field("tfgld1103s000", "tfgld102.ttyp", str$("CAB"))
stpapi.put.field("tfgld1103s000", "tfgld102.docn", str$(201))
.
.
retVal = stpapi.insert("tfgld1103s000", 1, error.msg)
if (retVal = 0) then
rc = stpapi.recover("tfgld1103s000", w.err.msg)
endif
return (retVal)
At the "stpapi.continue.process" the error.message is "command disabled". I searched the forum for this problem, but didn't found any solution for this. We are using BaanERP (B50Ccstnd)
Kind regards
Thomas