<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Primary Key / Foreign Key relationship in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436061#M1411611</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can add code in maintenance screen to check deleted values against INSTANCE_TABLE. I want to know if that is the only way to go or this can be established using table relationship. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set STATUS field in INSTANCE_TABLE as a foreign key, with MASTER_TABLE as check table . This helps to restrict only master "STATUS' values to be entered into INSTANCE_TABLE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sid on Nov 19, 2009 12:10 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Nov 2009 23:10:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-18T23:10:30Z</dc:date>
    <item>
      <title>Primary Key / Foreign Key relationship</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436059#M1411609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a MASTER_TABLE which has master values . This table has two fields, STATUS &amp;amp; STATUS_TEXT,  Key field is STATUS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a check table for another table INSTANCE_TABLE which also has field STATUS; this is not a key field though. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The requirement is:&lt;/EM&gt; If I  attempt to delete a STATUS value from MASTER_TABLE, it should not allow me if there is any record in INSTANCE_TABLE which has the same STATUS value. Is there a way to establish such a relationship between the two tables? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 22:06:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436059#M1411609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T22:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key / Foreign Key relationship</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436060#M1411610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Total Questions:  5 (4 unresolved)  &lt;/P&gt;&lt;P&gt;What have you tried yourself so far? Have you created a maintenance view?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 22:56:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436060#M1411610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T22:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key / Foreign Key relationship</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436061#M1411611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can add code in maintenance screen to check deleted values against INSTANCE_TABLE. I want to know if that is the only way to go or this can be established using table relationship. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set STATUS field in INSTANCE_TABLE as a foreign key, with MASTER_TABLE as check table . This helps to restrict only master "STATUS' values to be entered into INSTANCE_TABLE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sid on Nov 19, 2009 12:10 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 23:10:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436061#M1411611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T23:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key / Foreign Key relationship</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436062#M1411612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thing this can be established using table relationship.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 12:53:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436062#M1411612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-23T12:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key / Foreign Key relationship</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436063#M1411613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only through table Maintaince only it can be acheived , by table relatio it can not be  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because as you know the  non primary key cannot be be  check table field  .means&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Mater table STATUS is primary key so you are  making it as check table field to  Insance table  STATUS Field.&lt;/P&gt;&lt;P&gt;But  in Instance table is not a primary key so , without primary key you will not be able to  do the foriegn key relation to the master table ,so that  it will not be check table becs of that they check will not happen for your  scenario  . to acheieve this you need to either make your STATUS field in Instance table also as primary key and  do the foerign key relationship with  Master table  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or else  write an event in the table maintainance  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2009 05:37:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-foreign-key-relationship/m-p/6436063#M1411613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-24T05:37:44Z</dc:date>
    </item>
  </channel>
</rss>

