Custom table ID generation?

So, I've created a custom form that stores its data in the UD01 table.
The only question I have is what is the best method for generating and
storing a new ID key for each entry that goes into the table?

The advanced customization instructor manual details a sample method of
storing an order incrementer in the Company table, but is that what
everyone else is doing - using the Company table and some method of
incrementing?

If anyone would/could share how they're doing it I would appreciate it.