on 2024 Jun 12 5:23 AM
Hi , I want to change custom table primary key. Already they are maintain WERKS,MATNR & MRP Area. I need to make VKORG as Key field in table but VKORG position also needs to correction. if i make the changes in table will it have any effect in existing data in the production server ??
Request clarification before answering.
Hello @rajsapabap-tech ,
If you change the key fields, the table will need adjustment. See Adjustment of Database Structures .
This can lead to a loss of data, depending on the new table key and the availability of the table during the adjustment period.
In your case you will probably not lose anything from the key change, since you are adding a key field, but the table will be unavailable to calling programms during the adjustment period and this can lead to runtime errors, loss of data etc. Meaning it can create problems somewhere else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @rajsapabap-tech
I'm no ABAP developer but coming from BW side. Usually you cannot change table keys with data included in it.
You usually would create a second table with correct keys. Load the data there and correct the data how it is supposed to be. Then check and verify. Afterwards you clear the original table, adjust the keys and reload the updated data from the second table. Done 🙂
BR, Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.