05-05-2006 1:05 PM
Dear ALL,
I need create the table with unique key numeric field.
Could you tell me How I can create this table (maybe I must use number range).
Then I need create the view for entry new record in this table.
Thanks a lot.
05-05-2006 1:12 PM
I hope u r talking about creating a key in a z* table
You can use the datatype NUMC and specify the length of the field. You can create it by clicking on 'Predefined Type' and directly enter NUMC and length of the field or Create a domain.. assign it to a data element.. and then assign the data element to the field you have created
Check this field as 'KEY' in the table
05-05-2006 1:15 PM
Igor,
Yes you will have to use the number range. But however, you will have to manually, get the next number and update the table while updatig the other rows.
You can create a number range in SNRO transaction.
Regards,
Ravi
Note : Please mark the helpful answers
05-05-2006 1:16 PM
Hello Igor,
When u create any table with primary key, it will always create uniqe entries as duplicates are not allowd. However u can use number range to create numeric values for this field, as in case of purchase order or material.
05-05-2006 1:21 PM
Hi,
The FM, NUMBER_GET_NEXT may be useful to you.
Regards,
Ravi
05-05-2006 1:40 PM
I think that it is possible use number range automatically...
05-05-2006 2:11 PM
Hello Igor,
It will not come automatically, u will have to create a number range object and use this object to generate next number which will be populated into the field of the table which is key.
U can use get_next_number Fm to generate the next number.