<?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: How does a primary key work? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896588#M1689476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a little bit shamed because my question was not enough explanatory, I mean:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how does a primary key work in ABAP?&lt;/P&gt;&lt;P&gt;is it needed when I create a Transparent - Pooled table? &lt;/P&gt;&lt;P&gt;what about identity (in SQL Server) or sequence (in Oracle)? (this questions was answered in the second post)&lt;/P&gt;&lt;P&gt; Should I use NUMBER RANGES? &lt;/P&gt;&lt;P&gt;how long should be this range? &lt;/P&gt;&lt;P&gt;should I use &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;NUMBER_GET_NEXT instead of use NUMBER RANGES?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;how does this work in an internal table?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Thank you all for your answers.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 19:52:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-08-02T19:52:14Z</dc:date>
    <item>
      <title>How does a primary key work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896584#M1689472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand Oracle PL/SQL and Transact SQL, I'm starting to learn ABAP but I would like to know how does a primary key work in a table dictionary, I mean, how to create a sequence (Oracle) or Identity (SQL Server), is this necesary? I've been searching in google but I notice everybody just declare a column as a Primary Key and nothing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 21:27:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896584#M1689472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-13T21:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How does a primary key work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896585#M1689473</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;If I am getting your question properly , then follwing info will be usefull for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As we create sequence in Oracle there is a same concept in Abap data dictionary i.e NUMBER RANGES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial; font-size: small; text-align: -webkit-auto; background-color: #fefeee;"&gt;It is often necessary to directly access individual records in a data structure. This is done using unique keys. Number ranges are used to assign numbers to individual database records for a commercial object, to complete the key. Such numbers are e.g. order numbers or material master numbers.&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial; font-size: small; text-align: -webkit-auto; background-color: #fefeee;"&gt;These numbers provide, apart from unique identification of a data record, the possibility of encoding differentiating information for an object. One could tell from the number e.g., to which material type a material belongs.&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial; font-size: small; text-align: -webkit-auto; background-color: #fefeee;"&gt;The R/3 number range management also monitors the number status, so that numbers which have already been issued are not re-issued.&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial; font-size: small; text-align: -webkit-auto; background-color: #fefeee;"&gt;All dialogs, database accesses or other activities which are necessary for the maintenance of number range objects and number ranges and number allocation in user developments, can be performed using SAP function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial; font-size: small; text-align: -webkit-auto; background-color: #fefeee;"&gt;For detail information access link below and see Number ranges section in that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial; font-size: small; text-align: -webkit-auto; background-color: #fefeee;"&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/EN/2a/f9ff44493111d182b70000e829fbfe/frameset.htm"&gt;http://help.sap.com/saphelp_47x200/helpdata/EN/2a/f9ff44493111d182b70000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial; font-size: small; text-align: -webkit-auto; background-color: #fefeee;"&gt;Thanks &lt;/P&gt;&lt;P style="color: #000000; font-family: Arial; font-size: small; text-align: -webkit-auto; background-color: #fefeee;"&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2012 12:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896585#M1689473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-14T12:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: How does a primary key work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896586#M1689474</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;In simple words, primary keys are fields that are unique. it is very much necessary, it helps in uniquely identifying every record in a table (i.e., process them in specific sequence)&lt;/P&gt;&lt;P&gt;For example.. Social Security Number can be a primary key, as you know, two person cannot have same Social Security Number.&amp;lt;It is Unique&amp;gt;&lt;/P&gt;&lt;P&gt;In case you want to fetch a particular person's record with his name, it wud be difficult as there could be more than one having same name. in tat case, if you kno the primary key of that table, in our case- which is the social security number. it would be easy to process or access the exactly needed record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 12:24:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896586#M1689474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-02T12:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: How does a primary key work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896587#M1689475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As more simply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you need to enter the mark of your class student( student name : ivan,james,martin,james )in a table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ivan&amp;nbsp; 20&amp;nbsp; 40 50&lt;/P&gt;&lt;P&gt;james&amp;nbsp; 40 50 60&lt;/P&gt;&lt;P&gt;martin&amp;nbsp; 60 70 80&lt;/P&gt;&lt;P&gt;james 40 60 70&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to fetch james mark how come in above since we have 2 james ?????? so that we will insert a registration number as other column like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;001 ivan&amp;nbsp; 20&amp;nbsp; 40 50&lt;/P&gt;&lt;P&gt;002 james&amp;nbsp; 40 50 60&lt;/P&gt;&lt;P&gt;003 martin&amp;nbsp; 60 70 80&lt;/P&gt;&lt;P&gt;004 james 40 60 70&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope you understand &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/843/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 13:57:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896587#M1689475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-02T13:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: How does a primary key work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896588#M1689476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a little bit shamed because my question was not enough explanatory, I mean:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how does a primary key work in ABAP?&lt;/P&gt;&lt;P&gt;is it needed when I create a Transparent - Pooled table? &lt;/P&gt;&lt;P&gt;what about identity (in SQL Server) or sequence (in Oracle)? (this questions was answered in the second post)&lt;/P&gt;&lt;P&gt; Should I use NUMBER RANGES? &lt;/P&gt;&lt;P&gt;how long should be this range? &lt;/P&gt;&lt;P&gt;should I use &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;NUMBER_GET_NEXT instead of use NUMBER RANGES?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;how does this work in an internal table?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Thank you all for your answers.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 19:52:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896588#M1689476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-02T19:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: How does a primary key work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896589#M1689477</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;Primary keys are unique fields which cannot contain any duplicate values. In the tables, the records are searched based on primary key values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 18:36:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896589#M1689477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-13T18:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: How does a primary key work?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896590#M1689478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Primary key are defined in SQL as an UNIQUE constraint with NOT NULL columns. &lt;/P&gt;&lt;P&gt;Only one set of primary keys is allowed on one table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are ABAP tools to create unique set of keys :&lt;/P&gt;&lt;P&gt;- &lt;A href="http://help.sap.com/saphelp_erp60_sp/helpdata/en/2a/fa02e3493111d182b70000e829fbfe/content.htm"&gt;Number ranges&lt;/A&gt; (Function group SNR3 with FMs like NUMBER_GET_NEXT)&lt;/P&gt;&lt;P&gt;- UUIDs (Class &lt;SPAN class="lnkgrey"&gt;CL_SYSTEM_UUID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 06:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-does-a-primary-key-work/m-p/8896590#M1689478</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-08-14T06:18:25Z</dc:date>
    </item>
  </channel>
</rss>

