edjofego
25th August 2008, 23:22
Hi!
I'm developing on BaaN IV a session process that will insert automatically some records in session tfcmg1110m000, which come from a .csv file and a parameters table (tfgld900), through a library that contains AFS, to do this I'm using the stpapi.put.field() for fill the required fields, when I have finish, the stpapi.insert() is called, when I process the first record, all it's okay, the information is inserted in the table, but when I process the second one or all other records the return value of the stpapi.insert() is "false" and the error message says "No se permite Divisa" ("The Currency is not allowed") obviously the currency is allowed and exists in the currencies's table but the process always should be reads the same currency, and doing a debugger the field tfgld900.ccur always brings the same value as the first record that was processed successful, when I'm debugging I put some value to the field and get the same result, the variable error message tells me that do not allow the currency, maybe I'm doing some wrong... Can U help me??
Here is the script:
tfcmg1110m000f.put.Proveedor(tfgld900.suno)
tfcmg1110m000f.put.M_todo_contabilizaci_n(tfgld900.post)
tfcmg1110m000f.put.Importe(importe)
tfcmg1110m000f.put.Referencia(col6)
tfcmg1110m000f.put.M_todo_cobros_pagos(tfgld900.paym)
tfcmg1110m000f.put.Motivo_para_pago_extranjero(tfgld900.reas)
val.insert = tfcmg1110m000f.insert(true, errorm1)
if not val.insert then
val.recover1 = tfcmg1110m000f.recover(errorm2)
else
val.save = tfcmg1110m000f.save(errorm3)
if not val.save then
val.recover2 = tfcmg1110m000f.recover(errorm4)
endif
endif
Thanx a lot!!
EdJoFeGo :D
I'm developing on BaaN IV a session process that will insert automatically some records in session tfcmg1110m000, which come from a .csv file and a parameters table (tfgld900), through a library that contains AFS, to do this I'm using the stpapi.put.field() for fill the required fields, when I have finish, the stpapi.insert() is called, when I process the first record, all it's okay, the information is inserted in the table, but when I process the second one or all other records the return value of the stpapi.insert() is "false" and the error message says "No se permite Divisa" ("The Currency is not allowed") obviously the currency is allowed and exists in the currencies's table but the process always should be reads the same currency, and doing a debugger the field tfgld900.ccur always brings the same value as the first record that was processed successful, when I'm debugging I put some value to the field and get the same result, the variable error message tells me that do not allow the currency, maybe I'm doing some wrong... Can U help me??
Here is the script:
tfcmg1110m000f.put.Proveedor(tfgld900.suno)
tfcmg1110m000f.put.M_todo_contabilizaci_n(tfgld900.post)
tfcmg1110m000f.put.Importe(importe)
tfcmg1110m000f.put.Referencia(col6)
tfcmg1110m000f.put.M_todo_cobros_pagos(tfgld900.paym)
tfcmg1110m000f.put.Motivo_para_pago_extranjero(tfgld900.reas)
val.insert = tfcmg1110m000f.insert(true, errorm1)
if not val.insert then
val.recover1 = tfcmg1110m000f.recover(errorm2)
else
val.save = tfcmg1110m000f.save(errorm3)
if not val.save then
val.recover2 = tfcmg1110m000f.recover(errorm4)
endif
endif
Thanx a lot!!
EdJoFeGo :D