Application Development 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: 

Custom table key fields

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

This is no finite number for all tables.

former_member188685
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.