Material Transactions

tragiclos

New Member
Hi, I'm new to Syteline and I'm trying to write a utility that can move/adjust inventory using ADO to access the database. The problem with this is that I'm not sure how to generate new material transactions. I can insert a new row in the matltran table, but getting a proper trans-num value is problematic.

My first idea was to use an aggregate function to get the last trans-num and increment to generate the new one, but this wouldn't work well because:
  1. It takes a LONG time to process.
  2. This doesn't guarantee a unique transaction number.
Is there any way I can easily get the next trans-num value using an SQL query? I looked in the data dictionary hoping there would be a trigger or sequence to generate them, but didn't find anything. How does Syteline generate new material transaction numbers?

Thanks in advance.

PS - We are currently running Syteline 6.
 
Top