09-30-2008 9:56 AM
I have three tables
Header
Doc No. --key field
Doc Yr --key field
Line Item
Doc No. --key field
Doc Yr --key field
Line Item --key field
Sub line item table
Doc No. --key field
Doc Yr --key field
Line Item --key field
Sub line item --key field
These tables do not have foreign key.
Now these tables have been transfered to production & they contain huge data.
I want to create maintenance view. For this i need to create Foreign key for:
Line item
Doc No. --key field --Foreign Key --Doc No. Of header
Doc Yr --key field --Foreign Key --Doc year. Of header
Line Item --key field
Sub line item table
Doc No. --key field --Foreign Key --Doc No. Of header
Doc Yr --key field --Foreign Key --Doc year. Of header
Line Item --key field --Foreign Key --Line Item Of line item
Sub line item --key field
My question is will this affect my data in the tables in production. Will it ask for conversion of table.
PLZ help!
09-30-2008 10:08 AM
it should not be a problem.Run Database Utility(SE14) before transporting the table.
Thanks,
KD
09-30-2008 10:10 AM
Hi
Good
I dont think there should be any problem if you create any Foreign key field in the development server, or neither it will affect the production data.
Thanks
mrutyun^
09-30-2008 10:39 AM
Hi ,
I dont think there will be any issues. You can go ahead and create the foreign keys .
but do the database udjustments using se14 in production.
Regards,
Raskhan T.
09-30-2008 11:13 AM
09-30-2008 11:19 AM
Hi,
SE14 will make sure there are no inconsistent data in these tables. If you are going to add check tables and foreign keys.
Imagine that there is data where the Header doesn't exist but the line and sub line entries are still present in the corresponding table, which is possible because you didn't have any check tables before, these entries will have to be adjusted.
regards,
Advait.
09-30-2008 11:35 AM
As u said that as check was not there b4 so there might be some data which is present in sub item table but do not exist in header then after running se14 what shall the system do.
09-30-2008 11:39 AM
in that case se14 would end up in error and it would not activate the table.You need to delete the inconsistent entries in the sub key table and then run SE14
Cheers,
KD
09-30-2008 11:44 AM
the concept is when you add a foreign key , u need to specify a check table. then the data that enters into that field will check the value with the check table.and if the entered value is not in the check table , inconsistency is there, hence se14 will throw an error.
09-30-2008 12:15 PM
Yes thats right, if you run SE14, you will run into trouble and if you dont there will be inconsistent entries. Its like a catch 22 situation and might be inconsistencies anyways.
So what I suggest is that you adjust the entries manually or write a program to delete the inconsistent entries.
regards,
Advait
09-30-2008 12:28 PM
Its huge data which at this point i cannot change. So can i just add foreign key in se11 and let me do not adjust the tables then old data will not be adjusted. I guess with that old data shall remain intact but the new data shall be created with keeping the checks in mind.
Is that going to create a problem.