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

Table can not activate again after changing

Former Member
0 Likes
6,459

Hi, everybody

For some reason that we create one more field call EKORG(Purchasing organisation) in table LFA1 and made choice for both Key and Initial value. Now, we are going to delete this field and activate table again, system show the following message, please kindly give us a hand and let me know how to solve this issue in more detail. We use T-code: se14 and try to Activate and adjust database that system show the same message as below.

Thanks you All.

<b>Primary key change not permitted for value table LFA1

Message no. AD300

Diagnosis

This table is defined as a check table. For reasons of consistency, changes to the primary key of the table are not allowed.

Procedure

If it is essential that you change the primary key, you must delete the relevant foreign keys. Refer to the where-used list to find all tables containing a field that is checked against this table. Delete the foreign keys for these fields.

If necessary, maintain the deleted foreign keys again.</b>

Message was edited by:

Alfred

Hi, everybody

For some reason that we create one more field call EKORG(Purchasing organisation) in table LFA1 and made choice for both Key and Initial value. Now, we are going to delete this field and activate table again, system show the following message, please kindly give us a hand and let me know how to solve this issue in more detail. We use T-code: se14 and try to Activate and adjust database that system show the same message as below.

Thanks you All.

<b>Primary key change not permitted for value table LFA1

Message no. AD300

Diagnosis

This table is defined as a check table. For reasons of consistency, changes to the primary key of the table are not allowed.

Procedure

If it is essential that you change the primary key, you must delete the relevant foreign keys. Refer to the where-used list to find all tables containing a field that is checked against this table. Delete the foreign keys for these fields.

If necessary, maintain the deleted foreign keys again.</b>

Message was edited by:

Alfred

11 REPLIES 11
Read only

Former Member
0 Likes
2,889

Hello,

Try to activate the table in SE14

Vasanth

Read only

Former Member
0 Likes
2,889

hi alfred,

1. This error is coming bcos of DEPENDENCY.

the primary key fields in this table LFA1

are used as CHECK TABLE in other standard sap tables.

2. So, we need to use where-used list,

and find out other tables,

where foreign key relation ship is maintained.

(first we need to temporarily delete this foreign key relation).

3. Only after that, it will allow to activate this table.

4. I had encountered similar problems, but all in z tables.

regards,

amit m.

Read only

Former Member
0 Likes
2,889

Hi Alfred,

The message sent by system is pretty clear : there are existing foreign keys in other tables associated with LFA1. As long as these keys exist, the system won't let you modify the primary key for LFA1.

What you need to do is :

1. Find all foreign keys refering to table LFA1 in your database which are using field EKORG.

2. Delete these keys (using SE11 for example)

3. Modify and activate LFA1

Please, reward points if this helps.

Regards,

Nicolas.

Read only

Former Member
0 Likes
2,889

Hi friend

Please let me know how to use where-used list and find out other tables? Please give more detail information. Thanks

Read only

0 Likes
2,889

Hi Alfred,

Pleae don't take offfence but If you don't know how to perform a where-used list for a table then you really shouldn't be playing around with the primary key of a SAP standard table.

If you got to SE11 and display table LFA1, place your cursor on the table name at the top of the screen and then click the where-used list button (8th from the left) on the toolbar you will be able to find where the table is used.

I have to ask, why where you changing the primary key of a standard SAP table?!

Gareth.

Read only

0 Likes
2,889

I can't beleive all you fools ( Except that Gareth bloke ) are giving him tips as to how to resolve the issue. Why would you want to change a standard field in a standard table.

Do you want to know about how to hide code aswell.

Read only

Former Member
0 Likes
2,889

Pls let me know hot to find all foreign keys which refering to table LFA1 in your database which are using field EKORG? Please provide detail information step by step. Thanks you All.

Read only

Former Member
0 Likes
2,889

Hi,

<b>Go to SE14.

ENTER <TABLE NAME> AS OBJ.NAME AND SELECT THE RADIO BUTTONS OF TABLE.

CLICK ON 'EDIT'.

NEW WINNDOW WILL OPEN.

CLICK ON 'ACTIVATE AND ADJUST DATABASE'.

SAVE IT.

THEN OPEN TABLE THROUGH SE11 AND ACTIVATE.</b>

Your probem will be solved

<i><b>Regards

Debjani

reward point for helpful answer</b></i>

Read only

Former Member
0 Likes
2,889

I go to se11 for table LFA1, and click where-used list. After that system show me a lot of choice " Used in" like Programs, Classes/Interfaces...., please knidly let us know use which one that we can finally find the primary key which links to other tables. Thanks!

Read only

0 Likes
2,889

Alfred,

If you can't figure this out you should stop what you are doing and get help from someone who knows how to fix this mess. I'll give you a hint, it isn't Programs... And it might be something to do with tables... Once you've got a list of all tables where LFA1 is used you will have to check them 1 by 1 to see if they use LFA1 as a check table.

I'd still love to know what posessed you to mess around with the primary key of a standard SAP table? And I'd also love to know why everyone is giving you help and suggestions on how to activate the table whilst no-one seems to care that you are changing a standard SAP primary key. I can't believe you managed to get an access key to change the table in this way and no-one in your company/client questioned what and why you were doing it!

LFA1 is a pretty important table in the SAP system (Vendor Master table) so to mess around with its primary key is utterly ridiculous.

The only thing you should learn here is that changing SAP standard objects is usually a no-no. Trying to change the primary key on a standard SAP table is a complete no-no. There must have been an alternative to whatever it is you are trying to achieve.

Gareth.

Read only

Former Member
0 Likes
2,889

First adjust all field lengths in SE14.. then try to activate..

in SE14.. Click on <b>Activate and Adjust Database..</b>

Reward if useful

Regards

Prax