Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom table key fields

Former Member
0 Likes
900

Hi all,

I have to create some custom(Z) tables.

I just want to know how many key fields are necessary in creating a Ztable.

just one key field is o.k. or I have to check 2 or 3 fields as key fields.

I only have 4 fields in my custom table.

Any help will be appreciated.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
847

u can assign all 4 fields as a key field, but atleast one is necessary.but when u assign a field as a key field that field should be a 'CHAR' field other wise it will not accept.

Thanks'

Vikranth

5 REPLIES 5
Read only

Former Member
0 Likes
847

As many as you want. It is recommended to put a client (MANDT) as a prmary key field.

Read only

Former Member
0 Likes
847

As many as it takes to make each and every record in the table unique.

This is no finite number for all tables.

Read only

Former Member
0 Likes
847

Hi,

it depends on your requirement,based on that you can make them key fields, and you need to make MANDT is the primary key filed before that along with other key fields.

Regards

vijay

Read only

Former Member
0 Likes
848

u can assign all 4 fields as a key field, but atleast one is necessary.but when u assign a field as a key field that field should be a 'CHAR' field other wise it will not accept.

Thanks'

Vikranth

Read only

0 Likes
847

Andy,

To be truthful, your question is a bit alarming.

If you have been tasked with creating tables and you have no formal training in DB design, I would suggest researching http://help.sap.com or making a visit to a local bookstore for beginning level book about DB design and implementation.