garlapati
21st September 2012, 15:27
Hi,
Im getting bdb_erro520 in while running my custom script whil using the standard function shell.update.occurance() used in tdpur4102.
i am using shell.update.occurance() in my custom script & trying to deallocate - the inventory & calling again shell.update.occurance() to reallocate + inventory with new date/qunatity. it is working fine when i am executing this script for records of same company.
if there are records belongs to different companies, after processing one company records & commit is done when it is processing another company record at the 2nd call of shell.update.occurance() it is failing to fatal error

2012-09-21[08:45:19]:E:baan100: ******* S T A R T of Error message *******
2012-09-21[08:45:19]:E:baan100: Log message called from /port.6.1c.06.02/vobs/tt/lib/dbc/c_func.c: #416 keyword: domain_check
2012-09-21[08:45:19]:E:baan100: Pid 28498 Uid 988 Euid 988 Gid 125 Egid 125
2012-09-21[08:45:19]:E:baan100: user_type S language 2 user_name baan100 tty locale ISO88591/NULL
2012-09-21[08:45:19]:E:baan100: Errno 0 bdb_errno 0
2012-09-21[08:45:19]:E:baan100: Log_mesg: Reference does not exist: tdpur051.cwar->tcmcs003.cwar [32L]
2012-09-21[08:45:19]:E:baan100: ******* E N D of Error message *******
2012-09-21[08:45:19]:E:baan100:
2012-09-21[08:45:19]:E:baan100: ******* S T A R T of Error message *******
2012-09-21[08:45:19]:E:baan100: Log message called from /port.6.1c.06.02/vobs/tt/mir/mir/bdb_fun.c: #1026 keyword: DB error
2012-09-21[08:45:19]:E:baan100: Pid 28498 Uid 988 Euid 988 Gid 125 Egid 125
2012-09-21[08:45:19]:E:baan100: user_type S language 2 user_name baan100 tty locale ISO88591/NULL
2012-09-21[08:45:19]:E:baan100: Errno 0 bdb_errno 520 (Error during buffered updates)
2012-09-21[08:45:19]:E:baan100: Log_mesg: Error 606 (Reference does not exist) on tdpur051131 in SELECT
2012-09-21[08:45:19]:E:baan100: ******* E N D of Error message *******

this error is not coming while inserting but while select on tiitm001 table in isls0005.read.standard.item() function of tdpur4102.update.occurance(..) on 2nd call of shell.update.occurance()


Im puzzled to understand where it is failing? even after i commit transactions and switch to new company, why its refering the previous company & running into fatal error?

any suggestion is greatly appreciated

regards
Sunil

BaanInOhio
21st September 2012, 19:18
You have to explicitly set the company before updating or inserting in the record buffer. Something like:


tdpur051._compnr = other.company | Other company is a number.
tdpur051.cwar = my.warehouse
:
:
db.update(ttdpur051, db.retry)

benito
21st September 2012, 19:35
i don't have tdpur4102 in my system but i would make sure first that values in tdpur051.cwar also exists in tcmcs003.cwar.

garlapati
21st September 2012, 20:32
i have done initializing it explicitly setting the company. then same issue popped up for another table tdinv150. i again explicitly set company for that but internally some where it is resetting the value to tdinv150._compnr = -1 & the same issue repeating. So even if set it explicitly inside some where it is resetting it which i can't modify becuase it is standard.
seems its very peculiar issue i came across...

any other inputs / fixes? :(

garlapati
21st September 2012, 21:47
even when i initialize them with ._compnr when the db.set.defaults() is called the ._compnr is being set to -1 resulting into fatal error. this db.set.defaults is being called in standard function & we can't modify them.
can we deal with that?