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: 

How do you remove field from being primary key in an SAP table?

Former Member
0 Kudos

I created a table in SAP called ZPERS_FUNDING. The fields are

MANDT*

AREA*

SUBAREA*

DEPTCODE*

EFFDATE

DESCR

The astericks indicate the fields that I want in the primary key. I had originally included EFFDATE in the primary key and then realized that I didn't want it there. I removed the EFFDATE field from being a part of the primary key for the table. I saved it, but it won’t let me activate it. It gives me this error when I try to activate it.

TABL ZPERS_FUNDING was not activated

Check table ZPERS_FUNDING

Old key field EFFDATE is now non-key field

Is there a way to change the primary key, once the table has been saved and activated with it?

5 REPLIES 5

Former Member
0 Kudos

Hi raghavendra,

1. In se11 it will give error.

2. goto se14 for such modifications.

regards,

amit m.

hymavathi_oruganti
Active Contributor
0 Kudos

u go to se14 and give the table name and click on adjust databse.

it will be activated

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, you will have to adjust it. Go to SE14, enter the table name, click the radiobutton for "save data" and click activate and adjust.

REgard,

Rich Heilman

Former Member
0 Kudos

You have to use SE14. Enter the table name and press 'Edit'. In the subsequent screen, click on 'Activate and Adjust Database'. Make sure the radiobutton for 'Save data' is selected.

former_member184619
Active Contributor
0 Kudos

Hi Kulkarni,

I understand your problem.

what the folks are saying is correct, but it still will not be activated if u are having some data in table.

So first of all u have to remove all the data in this table and activate it.

then remove the field effdate and save the table n try to activate it.

if it not allow u to activate it then goto SE14

enter the name of table and make sure that tables radio button is clicked, now press edit button and choose the last button i.e. Activate and adjust database.

Once it is adjusted u can create the field EFFDATE again in ur Z table.

Hope this will help U.

regards

-


Sachin Dhingra