<?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: MODIFY Table in OO Context in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390499#M1404669</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;I'm trying to modify an internal table which is a public attribute of a class.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please consider a change for your code. Defining an attribute of a class as PUBLIC is considered bad programming style in OO-Programming. There are certain use-casses, where this is considered for performance reasons only. The addition READ-ONLY should be used for those use-cases.&lt;/P&gt;&lt;P&gt;This addition is solely possible in the public visibility area of a class or in an interface. It has the effect that an attribute declared using DATA is readable from an external point, but can only be changed using methods of the class or its subclasses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Here is my code to describe my problem: MODIFY TABLE go_instance-&amp;gt;gt_table FROM &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please add the definition of your table type next time, because this is very important for the MODIFY TABLE statement. Right now, I'm only able to guess what the problem might be. If you were able to use the INDEX addition without a syntax error, then you're probably using a STANDARD or SORTED TABLE (HASHED TABLEs don't have an index)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, there is a diference between:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; MODIFY go_instance-&amp;gt;gt_table FROM &amp;lt;table&amp;gt; INDEX xyz. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY TABLE go_instance-&amp;gt;gt_table FROM &amp;lt;table&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The combination "MODIFY TABLE gt_sim FROM &amp;lt;sim_kls&amp;gt; INDEX sy-tabix" is not allowed in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With MODIFY TABLE, the line to be changed is determined by the fact that the content of the table key matches the content of the corresponding components in the wa work area. For tables with a key that is not unique, the first entry that is found is changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my guess is that you're using a STANDARD TABLE without the KEY addition.  The MODIFY TABLE will thus use a standard key, which is basically the table-line. And since the full lines are different, then the MODIFY TABLE should fail to find the line. My recommendation would be to define "gt_table" as SORTED TABLE with the proper key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Hristo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Dec 2009 16:50:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-10T16:50:16Z</dc:date>
    <item>
      <title>MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390491#M1404661</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;I'm trying to modify an internal table which is a public attribute of a class. I'm always getting a sy-subrc 4.&lt;/P&gt;&lt;P&gt;Here is my code to describe my problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY TABLE go_instance-&amp;gt;gt_table FROM &amp;lt;table&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The datatype of &amp;lt;table&amp;gt; is correct. When I assign with READ TABLE and change the field, it works... but not via MODIFY.&lt;/P&gt;&lt;P&gt;Is the MODIFY in OO-context not allowed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 08:40:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390491#M1404661</guid>
      <dc:creator>former_member379910</dc:creator>
      <dc:date>2009-12-09T08:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390492#M1404662</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;MODIFY is allowed in OO.&lt;/P&gt;&lt;P&gt;MODIFY TABLE is used to change a single row of the table.&lt;/P&gt;&lt;P&gt;But since you are using a table to modify it means you must be trying to change more than one row.&lt;/P&gt;&lt;P&gt;If so then drop the TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to modify a single row use INDEX &amp;lt;tabix&amp;gt; at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pushpraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 09:11:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390492#M1404662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-09T09:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390493#M1404663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure it is possible since this probably has nothing to do with OO Context. II guess that the MODIFY statement is not working since no suitable line was found to be modified. Check the contents of your internal table. Maybe it is even empty, in that case it won't work either (It is not a DB table in which the MODIFY statement will change or insert lines).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 09:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390493#M1404663</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-12-09T09:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390494#M1404664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pushpraj!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, my fault. The field-symbol &amp;lt;table&amp;gt; is a single row. I only named it "table" to show it's the same type.&lt;/P&gt;&lt;P&gt;I cannot use INDEX because I don't know the index of the go_instance-&amp;gt;gt_table at this time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this new sample will help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_sim ASSIGNING &amp;lt;sim_kls&amp;gt;.
  MODIFY TABLE go_instance-&amp;gt;gt_sim FROM &amp;lt;sim_kls&amp;gt;. "*sy-subrc 4*
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: DanielS on Dec 9, 2009 10:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 09:19:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390494#M1404664</guid>
      <dc:creator>former_member379910</dc:creator>
      <dc:date>2009-12-09T09:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390495#M1404665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Micky!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's the same type and only one field is different which is not in the key. So MODIFY has to change the entry from "EINZELTEILE" to "KIT". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Old data in table:&lt;/P&gt;&lt;P&gt;101	2009	024	00001	000000000000766710	TEILEART	EINZELTEILE	10.000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New data in field-symbol:&lt;/P&gt;&lt;P&gt;101               2009             024               00001            000000000000766710       TEILEART      &lt;STRONG&gt;KIT&lt;/STRONG&gt;                10.000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 09:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390495#M1404665</guid>
      <dc:creator>former_member379910</dc:creator>
      <dc:date>2009-12-09T09:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390496#M1404666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Halo Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_sim ASSIGNING &amp;lt;sim_kls&amp;gt;.&lt;/P&gt;&lt;P&gt;  MODIFY TABLE go_instance-&amp;gt;gt_sim FROM &amp;lt;sim_kls&amp;gt; &lt;STRONG&gt;index sy-tabix.&lt;/STRONG&gt; "&lt;STRONG&gt;sy-subrc 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 14:32:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390496#M1404666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-09T14:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390497#M1404667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the key of both tables unique?&lt;/P&gt;&lt;P&gt;are you defining a key?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 14:37:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390497#M1404667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-09T14:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390498#M1404668</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;Arshad, the index of it_sim an go_instance-&amp;gt;gt_sim aren't the same. So &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INDEX sy-tabix&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; doesn't work. it_sim is an &lt;STRONG&gt;extract&lt;/STRONG&gt; of gt_sim.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ramiro, yes it_sim and gt_sim are same type with same key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 07:01:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390498#M1404668</guid>
      <dc:creator>former_member379910</dc:creator>
      <dc:date>2009-12-10T07:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390499#M1404669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;I'm trying to modify an internal table which is a public attribute of a class.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please consider a change for your code. Defining an attribute of a class as PUBLIC is considered bad programming style in OO-Programming. There are certain use-casses, where this is considered for performance reasons only. The addition READ-ONLY should be used for those use-cases.&lt;/P&gt;&lt;P&gt;This addition is solely possible in the public visibility area of a class or in an interface. It has the effect that an attribute declared using DATA is readable from an external point, but can only be changed using methods of the class or its subclasses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Here is my code to describe my problem: MODIFY TABLE go_instance-&amp;gt;gt_table FROM &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please add the definition of your table type next time, because this is very important for the MODIFY TABLE statement. Right now, I'm only able to guess what the problem might be. If you were able to use the INDEX addition without a syntax error, then you're probably using a STANDARD or SORTED TABLE (HASHED TABLEs don't have an index)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, there is a diference between:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; MODIFY go_instance-&amp;gt;gt_table FROM &amp;lt;table&amp;gt; INDEX xyz. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY TABLE go_instance-&amp;gt;gt_table FROM &amp;lt;table&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The combination "MODIFY TABLE gt_sim FROM &amp;lt;sim_kls&amp;gt; INDEX sy-tabix" is not allowed in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With MODIFY TABLE, the line to be changed is determined by the fact that the content of the table key matches the content of the corresponding components in the wa work area. For tables with a key that is not unique, the first entry that is found is changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my guess is that you're using a STANDARD TABLE without the KEY addition.  The MODIFY TABLE will thus use a standard key, which is basically the table-line. And since the full lines are different, then the MODIFY TABLE should fail to find the line. My recommendation would be to define "gt_table" as SORTED TABLE with the proper key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Hristo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 16:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390499#M1404669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T16:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390500#M1404670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hristo!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the very qualified answer!&lt;/P&gt;&lt;P&gt;I know that defining public attributes isn't a good programming style. But in my case it's ok &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to my issue with the MODIFY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table type is a standard table with the following "db" keys: MANDT;JAHR;VERSION;ORGA;MATNR;KLASSE&lt;/P&gt;&lt;P&gt;Now I tried to define the table type as a sorted table - with "default" key. =&amp;gt; Result: same error&lt;/P&gt;&lt;P&gt;Then I listed the key components explicitly, same key (MANDT;JAHR;VERSION;ORGA;MATNR;KLASSE) =&amp;gt; Result: it works....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, it has something to do with the key... but its the same now.. &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; ...  If someone could explain this it would be great... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2009 06:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390500#M1404670</guid>
      <dc:creator>former_member379910</dc:creator>
      <dc:date>2009-12-11T06:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390501#M1404671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; Ok, it has something to do with the key... but its the same now.. &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; ... If someone could explain this it would be great... &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;quite simple &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;\[ UNIQUE | NON-UNIQUE ] DEFAULT KEY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This declares the fields of the default key as the key fields. If you have a structured line type, the standard key is build from all columns of the internal table that have a character-type type (c, d, t, n, x, string, xstring). Internal tables with a nested row structure have a standard key built by linearization of the row structure. At elementary row types, the standard key is the row itself. Elementary tables with an internal table as row type have an empty standard key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more thing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table type is a standard table with the following "db" keys: MANDT;JAHR;VERSION;ORGA;MATNR;KLASSE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that the primary key of the DB-table does not influence the key of your internal table. When you define an internal table, then you can define your own key. You are actually very encouraged to do so, because otherwise the DEFAULT KEY is used.  If the table type of the internal table is SORTED, then the data from the DB is automatically sorted to match the internal table sorting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I strongly recommend to use SORTED/HASHED tables.&lt;/P&gt;&lt;P&gt;(SORTED can have UNIQUE / NON-UNIQUE KEY - sorting according to key is performed. The key is read from left-to-right, thus not all fields of the key must be specified to enforce a binary search)&lt;/P&gt;&lt;P&gt;(HASHED can have UNIQUE KEY only - sorting is irrelevant, all fields of the key must be specified)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, STANDARD tables are to be used only for some special cases (e.g.):&lt;/P&gt;&lt;P&gt;-  you can not sort technically (e.g. JANUARY, FEBRUARY, MARCH, APRIL is wanted, instead of the technical sorting APRIL, FEBRUARY, JANUARY, MARCH)&lt;/P&gt;&lt;P&gt;- the sequence is relevant (e.g. stack-implementations (LIFO-principle) or queue implementations (FIFO-principle))&lt;/P&gt;&lt;P&gt;So, if you dont have one of those use-cases, then please always use SORTED/HASHED tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Hristo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2009 10:05:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390501#M1404671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-11T10:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY Table in OO Context</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390502#M1404672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hristo!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. I'm impressed! Very good and helpful answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2009 07:17:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table-in-oo-context/m-p/6390502#M1404672</guid>
      <dc:creator>former_member379910</dc:creator>
      <dc:date>2009-12-14T07:17:22Z</dc:date>
    </item>
  </channel>
</rss>

