<?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 problem in foreign key relationship.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446027#M1413021</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created 2 table. First is Ztab1 which is check table and second is Ztab2 as foreign key table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created couple of nonprimary key fields in table Ztab2 as foreign key fields, i want to know can i create primary key field in table Ztab2 as foreign key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after creation of foreign key table, i want to know if i'll delete any record from  table Ztab1 then should the same record be deleted automatically from table Ztab2 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Nov 2009 06:50:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-23T06:50:26Z</dc:date>
    <item>
      <title>problem in foreign key relationship..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446027#M1413021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created 2 table. First is Ztab1 which is check table and second is Ztab2 as foreign key table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created couple of nonprimary key fields in table Ztab2 as foreign key fields, i want to know can i create primary key field in table Ztab2 as foreign key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after creation of foreign key table, i want to know if i'll delete any record from  table Ztab1 then should the same record be deleted automatically from table Ztab2 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 06:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446027#M1413021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-23T06:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: problem in foreign key relationship..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446028#M1413022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It wont delete automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to keep some deletion indicator in your primary table and update it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use maintenance view for data manipulation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 06:54:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446028#M1413022</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-23T06:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: problem in foreign key relationship..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446029#M1413023</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;Yes you can keep the primary key fields of ZTAB2 as a part of foreign keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if you delete records from table ZTAB1, then the records from table ZTAB2 won't be deleted automatically.&lt;/P&gt;&lt;P&gt;Instead, you will not be able to delete those records from ZTAB1 because of the foreign key relationship.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the you need to first delete the records from table ZTAB2 and then delete from ZTAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 07:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446029#M1413023</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-11-23T07:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: problem in foreign key relationship..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446030#M1413024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for ur reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u please tell me how to set deletion indicator in table ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can please answer my first questions also&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 07:11:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446030#M1413024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-23T07:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: problem in foreign key relationship..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446031#M1413025</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;Yes you can delete the entry from check table but it wont get deleted from foreign key table. I suggest you create maintainence view for both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through below blog, it will clear your doubt:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1502703"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abhii&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 07:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446031#M1413025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-23T07:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: problem in foreign key relationship..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446032#M1413026</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;Tarun has answered your question. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just put a new field as like MARA-LVORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when deleting just mark it with a value say 'D' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so while picking data just ignore where deletion indicator is 'D'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 07:14:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-foreign-key-relationship/m-p/6446032#M1413026</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-23T07:14:33Z</dc:date>
    </item>
  </channel>
</rss>

