cancel
Showing results for 
Search instead for 
Did you mean: 

Primary Key in Java Dictionary

Former Member
0 Kudos

Hello,

I'm creating some database tables in the Java Dictionary on Web AS 6.40. What is the best way to create unique identifiers for the primary key of these tables? In ABAP Dictionary you would use a number range. Is there an equivalent or other technique for the Java Dictionary?

Thanks,

Dustin

Accepted Solutions (0)

Answers (1)

Answers (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Dustin,

the best way is if the logic of your data represent a primary key. If your central data object for example is a project, it will have a project number, and this is unique, so predestinated to be the primary key. If a customer has an order for this project (maybe the project is handled via two or three single orders), you will have an "order" table. For single customers having unique order IDs, the combination of the customers order id and the project id (foreign key) are predestinated to be the primary key.

If such a logic does not work, it's up to you to implement something (automatic PK generation does not work with the Java Dictionary). A number range seems to be ABAP... I would prefer a PKGenerator, generation them out of a combination of timestamp and random number or chars (sure, managing that the generated keys are unique).

Hope it helps

Detlev