<?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: Foreign key dependency checking in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706317#M1105713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Hung Kai, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Yah you ve set the cardinality perfectly. But one thing you remember that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can delete record in master table : it wont check in the transaction table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but while you delete record in transaction table : it will check record existance in master table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Nov 2008 10:44:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-03T10:44:22Z</dc:date>
    <item>
      <title>Foreign key dependency checking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706315#M1105711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question about foreign key checking.&lt;/P&gt;&lt;P&gt;Let's say I have two Z table, one is master table and one is transaction table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The master table contains a primary key named CustNo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The transaction table have two primary keys named CustNo and OrderNo.&lt;/P&gt;&lt;P&gt;The CustNo has foreign key (mandt + CustNo) point to master table, with setting&lt;/P&gt;&lt;P&gt;"Key fields/candidates  1:N"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expected that, delete record in master table should check if there is any dependency in the transaction table,&lt;/P&gt;&lt;P&gt;but I am wrong.  I am able to delete anything in master table even there are records in transaction table using the same CustNo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, how can I make the dependency check?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Hung Kai, Michael Cheng on Nov 3, 2008 5:29 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 04:28:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706315#M1105711</guid>
      <dc:creator>former_member457651</dc:creator>
      <dc:date>2008-11-03T04:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Foreign key dependency checking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706316#M1105712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;    For this u need to change the cardinality.&lt;/P&gt;&lt;P&gt;Below are the list of cardinalities and their functionality.Chack it and use the proper one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The left side (n) of the cardinality is defined as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n=1: There is exactly one record assigned to the check table for each record of the foreign key table. &lt;/P&gt;&lt;P&gt;n=C: The foreign key table may contain records which do not correspond to any record of the check table because the foreign key field is empty. This can occur for example if the field of the foreign key table is optional, in which case it does not have to be filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The right side (m) of the cardinality is defined as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;m=1: There is exactly one dependent record for each record of the check table. &lt;/P&gt;&lt;P&gt;m=C: There is at most one dependent record for each record of the check table. &lt;/P&gt;&lt;P&gt;m=N: There is at least one dependent record for each record of the check table. &lt;/P&gt;&lt;P&gt;m=CN: There may be any number of dependent records for each record of the check table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shafi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 09:41:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706316#M1105712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-03T09:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Foreign key dependency checking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706317#M1105713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Hung Kai, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Yah you ve set the cardinality perfectly. But one thing you remember that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can delete record in master table : it wont check in the transaction table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but while you delete record in transaction table : it will check record existance in master table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 10:44:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706317#M1105713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-03T10:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Foreign key dependency checking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706318#M1105714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, the conclusion is, in order to ensure that there is no dependent records in the master table, I need to check it myself??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not that difficult, but is kind of strange &lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2008 02:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706318#M1105714</guid>
      <dc:creator>former_member457651</dc:creator>
      <dc:date>2008-11-14T02:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Foreign key dependency checking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706319#M1105715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's the awful truth. The FK relationships you can define play a role in Dynpros, for example, a message can be issued automatically in SM30 if you enter a key on the transactional table which does not exist in the master table.&lt;/P&gt;&lt;P&gt;But you cannot set restrictions, cascading deletion or something like that. Anything you code in Open SQL (INSERTs, DELETEs, etc) can break the DB integrity. So you have to do all the checks by yourself previously.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2008 03:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-dependency-checking/m-p/4706319#M1105715</guid>
      <dc:creator>alejandro_bindi</dc:creator>
      <dc:date>2008-11-14T03:32:30Z</dc:date>
    </item>
  </channel>
</rss>

