<?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: problem with foreign key  relation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234754#M771819</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;you want to check the field deptno in dep Table while entering values in Field deptno of other Table.&lt;/P&gt;&lt;P&gt;so that it won't alow the duplicate values. Right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But validations are not possible at table level. that's why when ur entering the deptno diffrent from actual no also, it is storing in the database.(it will not check the value in the dept table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;validations can be defined at the application. we can &lt;/P&gt;&lt;P&gt;validate the screen field(Ex:deptno) before entering value into the database table.&lt;/P&gt;&lt;P&gt;we have to write a small code for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to do ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. U must have defined DOMAIN &lt;/P&gt;&lt;P&gt;thru se11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In that there is one TAB (Value Range)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. At the bottom most,&lt;/P&gt;&lt;P&gt;There is a VALUE TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. In that Enter the MASTER Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jan 2008 06:46:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-07T06:46:32Z</dc:date>
    <item>
      <title>problem with foreign key  relation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234749#M771814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i created two ztables ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maintaned foreign key relation for one field.but if i insert some entries other than the entries in check table it is taking those entries. there is no error message....pls explain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 11:28:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234749#M771814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T11:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: problem with foreign key  relation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234750#M771815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see this :&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/b2/fbb85cc64611d295dd00a0c929b3c3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/b2/fbb85cc64611d295dd00a0c929b3c3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/advancedsearch?query=foreign%20key%20relationships%20of%20tables%20&amp;amp;cat=sdn_all" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/advancedsearch?query=foreign%20key%20relationships%20of%20tables%20&amp;amp;cat=sdn_all&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Madhavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 11:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234750#M771815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T11:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: problem with foreign key  relation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234751#M771816</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;1. Foreign key relation ships,&lt;/P&gt;&lt;P&gt;in SAP abap,&lt;/P&gt;&lt;P&gt;allow to BYPASS IT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. They are just meant &lt;/P&gt;&lt;P&gt;for showing master list &lt;/P&gt;&lt;P&gt;in ABAP Module pool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. It won't DO ANY CHECK&lt;/P&gt;&lt;P&gt;while directly entering in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 11:39:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234751#M771816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T11:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem with foreign key  relation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234752#M771817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I just created 2 tables for your reqt and tested .its working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created ZEMP table with fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;empno --&amp;gt; char 4 --&amp;gt; Pkey&lt;/P&gt;&lt;P&gt;ename --&amp;gt; char20 --&amp;gt; not pkey&lt;/P&gt;&lt;P&gt;deptno --&amp;gt; char2 --&amp;gt; not pkey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i created 1 more table ZDEPT table with fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;deptno --&amp;gt; char2 --&amp;gt; pkey&lt;/P&gt;&lt;P&gt;dname --&amp;gt; char15 --&amp;gt; not pkey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maintain technical settings for 2 tables like &lt;/P&gt;&lt;P&gt;Data class: Appl0,&lt;/P&gt;&lt;P&gt;size category: 0&lt;/P&gt;&lt;P&gt;and activate both the tables.&lt;/P&gt;&lt;P&gt;In each table atleast 1 field should be pkey.otherwise u will get error that you can see in activation log when you do activation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maintaining foreign key relation ship:&lt;/P&gt;&lt;P&gt;goto ZEMP table and place cursor on deptno and press Foreign key button (after newrows 1 button is there na that button ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then enter ZDEPT in the place of check table text box ,short text and press "Generate proposal" button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will get proposal and just press " Copy " button or enter button.no need to enter other values in this screen if not required specifically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Testing:::::::::::&lt;/P&gt;&lt;P&gt;Now maintain table maitenance generator using &lt;/P&gt;&lt;P&gt;Utilities&lt;DEL&gt;-&amp;gt;TMG&lt;/DEL&gt;-&amp;gt;enter auth grp as &amp;amp;NC&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and go back and again goto&lt;/P&gt;&lt;P&gt;utilities--&amp;gt;Table contents-&amp;gt;create entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now you give some values.&lt;/P&gt;&lt;P&gt;you will get error there itself.because you didnt maintain entries in ZDEPT table as it is check table ZEMp table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Sivaparvathi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please dont forget to reward points if helpfull&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 14:28:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234752#M771817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T14:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: problem with foreign key  relation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234753#M771818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai ..i did the same thing... i insert some entries for deptno in dep table first.and i insert someother  entries which r not in dept table it accepts for deptno in emp table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i am using 4.7 version..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2008 18:39:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234753#M771818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-04T18:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: problem with foreign key  relation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234754#M771819</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;you want to check the field deptno in dep Table while entering values in Field deptno of other Table.&lt;/P&gt;&lt;P&gt;so that it won't alow the duplicate values. Right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But validations are not possible at table level. that's why when ur entering the deptno diffrent from actual no also, it is storing in the database.(it will not check the value in the dept table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;validations can be defined at the application. we can &lt;/P&gt;&lt;P&gt;validate the screen field(Ex:deptno) before entering value into the database table.&lt;/P&gt;&lt;P&gt;we have to write a small code for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to do ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. U must have defined DOMAIN &lt;/P&gt;&lt;P&gt;thru se11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In that there is one TAB (Value Range)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. At the bottom most,&lt;/P&gt;&lt;P&gt;There is a VALUE TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. In that Enter the MASTER Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 06:46:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234754#M771819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T06:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: problem with foreign key  relation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234755#M771820</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;Instead of just giving the check table fields, just  generate a proposal and then activate the table. I guess this will work for u. Also check if u have given the messsage class number correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 08:53:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234755#M771820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T08:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: problem with foreign key  relation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234756#M771821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create a table maintenance generator path is utilities--&amp;gt; table maintenance generator. and then maintain the values using sm30. u will have a reference check&lt;/P&gt;&lt;P&gt;awrd if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: prasanth kasturi on Jan 7, 2008 10:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 09:27:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-foreign-key-relation/m-p/3234756#M771821</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-01-07T09:27:24Z</dc:date>
    </item>
  </channel>
</rss>

