<?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: Composite Primary Key in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124503#M445784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain a bit further?&lt;/P&gt;&lt;P&gt;There is no concept called composite primary key sap afaik.&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2007 16:21:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-11T16:21:40Z</dc:date>
    <item>
      <title>Composite Primary Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124502#M445783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I am good and expect the same from you guys..&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Kindly let me know  the tables in sap which are using composite primary key..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 16:18:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124502#M445783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T16:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Composite Primary Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124503#M445784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain a bit further?&lt;/P&gt;&lt;P&gt;There is no concept called composite primary key sap afaik.&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 16:21:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124503#M445784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T16:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Composite Primary Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124504#M445785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;To day i have attended an interview..&lt;/P&gt;&lt;P&gt;Interviewer asked me what the composite primary key.. I replied if a key is consists more than one field then it is called as composite primary key..&lt;/P&gt;&lt;P&gt;Then he asked me can u giv me some examples of tables which are having composite primary keys??&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;I would like to know the tables which are using composite primary keys&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 16:43:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124504#M445785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T16:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Composite Primary Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124505#M445786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there.  If that is what you consider a composite primary key, then the infotype tables (PA0001, etc.) would be a good example of tables with this type of key.  Their keys include the fields of PERNR, BEGDA, and ENDDA, among other fields.  I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-  April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 16:56:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124505#M445786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T16:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Composite Primary Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124506#M445787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well, there are lots...EKPO, VBAP, LFB1, KNB1, STKO, STPO, etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 22:04:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124506#M445787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T22:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Composite Primary Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124507#M445788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are many tables in SAP with composite key as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPFLI,SFLIGHT,SBOOK,KNA1,VBAK,VBAP etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want all the tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can follow the below logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  BEGIN OF FS_TABLES,&lt;/P&gt;&lt;P&gt;    TABNAME TYPE DD02L-TABNAME,&lt;/P&gt;&lt;P&gt;  END OF FS_TABLES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  T_TABLES LIKE STANDARD TABLE OF FS_TABLES,&lt;/P&gt;&lt;P&gt;  T_FINAL  LIKE STANDARD TABLE OF FS_TABLES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT TABNAME&lt;/P&gt;&lt;P&gt;  FROM DD02L&lt;/P&gt;&lt;P&gt;  INTO TABLE T_TABLES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_TABLES INTO FS_TABLES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR EACH TABLE COUNT THE NO OF KEYS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(DD03L CONTAINS THE FIELD NAME,TABLE NAME,KEYFLAG = 'X'X IF IT IS A KEY FLAG)&lt;/P&gt;&lt;P&gt;  IF KEYS GT 1.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;    IT IS A TABLE WITH COMPOSITE PRIMARY KEY(STORE IN FINAL ITAB-&amp;gt;T_FINAL )&lt;/P&gt;&lt;P&gt;  T_FINAL-TABNAME = TABNAME.&lt;/P&gt;&lt;P&gt;  APPEND FS_FINAL TO T_FINAL.&lt;/P&gt;&lt;P&gt;  ENDIF.  &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the tables that you want will be in T_FINAL internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you grt all the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if it helps you.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Rama chary.Pammi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2007 09:38:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124507#M445788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-12T09:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Composite Primary Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124508#M445789</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;Actually composite primary key comes in to the picture when one key is not able to serve as a primary key for the table. In that case 2 key fields clubt to gether act as  a primary key for the table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like EKPO, VBAP, LFB1, KNB1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do reward points if it helps . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;P&gt;sofia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2007 10:33:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124508#M445789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-12T10:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Composite Primary Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124509#M445790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SAP almost all the tables are having the composite primary key. Because in a client dependent table the primary key a combination of MANDT and Other fields..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give you some examples..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables with out composite primary key : T000.&lt;/P&gt;&lt;P&gt;tables with composite primary key : MARA, MARC, VBAK, VBAP.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if u have any more doubt....&lt;/P&gt;&lt;P&gt;Reward points if useful......&lt;/P&gt;&lt;P&gt;Suresh......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2007 10:44:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/composite-primary-key/m-p/2124509#M445790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-12T10:44:26Z</dc:date>
    </item>
  </channel>
</rss>

