‎2007 Mar 05 6:09 PM
Hi,
I have to create a foreign key through an ABAP program (not through DDIC functionalities!) on a SAP NetWeaver 2004s system.
I have already found the Function module RPY_FOREIGN_KEY_INSERT but it doesn't work. It runs without any errors but the foreign key is not generated, even when call the Function module DDIF_TABL_ACTIVATE after RPY_FOREIGN_KEY_INSERT to avtivate the table again ( i also tried it with a COMMIT WORK).
Has anyone worked successfully with this Function module and can tell me how it works (e.g. how the parameters of the tables FORKEY_FIELDS and FORKEY_INF have to be set)?
Thank you very much for your help,
Jessica
‎2007 Mar 06 12:34 AM
Hi,
The best approach to this issue is to use the function module "RPY_FOREIGN_KEY_READ". First construct the table the way you want through the DDIC tools and then test this function module and you will get a clear idea of the values you need to pass in the interface.
Hope this helps,
Sudhi
Message was edited by: Sudhi
Sudhindra Chandrashekar
‎2007 Mar 06 8:41 AM
Hi Sudhi,
thanks for your answer! I just created a table with a foreign key through DDIC and read the information with "RPY_FOREIGN_KEY_READ". Then I deleted the foreign key and called the function module "RPY_FOREIGN_KEY_INSERT" with the identical values which have been readout before but the foreign key was not created.
Regards, Jessica
‎2007 Mar 08 11:56 PM
Hi,
I tried it too but unfortunately it is not working for me either. I am not sure why! In principle and theory it should work.
The table gets activated though!
Sudhi
‎2007 Mar 12 9:58 AM
Hi,
>>In principle and theory it should work.<<
That's true g. But nice to hear that I am not the only one with this problem.
Jessica