SandraP
3rd November 2008, 17:35
Hi,
I'm hoping somebody can help me.
I have a generic item that has a inventory unit of each and a selling unit of metres. I need to create a conversion factor in the table tcibd003
To do this I have been told by support to write a constraint. This is it below but it only seems to be partially working. I have attached the constraint to Generic BOM's, so it will update/insert a record at this point (after the item code has been generated).
!table ttcibd003
!domain tcitem l.item
!db.retry.point()
!l.item = item_data
!select tcibd003.*
!from tcibd003 for update
!where tcibd003._index1 = {:l.item,"","ech","m"}
!as set with 1 rows
!selectdo
!tcibd003.item = l.item
!tcibd003.citg = ""
!tcibd003.basu = "ech"
!tcibd003.unit = "m"
tcibd003.conv = 50
tcibd003.rpow = 0
!db.insert(ttcibd003, db.retry)
!endselect
!commit.transaction()
But this updates the table with a blank item and doesn't actually select the product variant item that has been created.
Had anybody else done this before? or is there somebody out there who can help with Baan scripting?
Thanks,
SandraP
I'm hoping somebody can help me.
I have a generic item that has a inventory unit of each and a selling unit of metres. I need to create a conversion factor in the table tcibd003
To do this I have been told by support to write a constraint. This is it below but it only seems to be partially working. I have attached the constraint to Generic BOM's, so it will update/insert a record at this point (after the item code has been generated).
!table ttcibd003
!domain tcitem l.item
!db.retry.point()
!l.item = item_data
!select tcibd003.*
!from tcibd003 for update
!where tcibd003._index1 = {:l.item,"","ech","m"}
!as set with 1 rows
!selectdo
!tcibd003.item = l.item
!tcibd003.citg = ""
!tcibd003.basu = "ech"
!tcibd003.unit = "m"
tcibd003.conv = 50
tcibd003.rpow = 0
!db.insert(ttcibd003, db.retry)
!endselect
!commit.transaction()
But this updates the table with a blank item and doesn't actually select the product variant item that has been created.
Had anybody else done this before? or is there somebody out there who can help with Baan scripting?
Thanks,
SandraP