<?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: wrong conversion error with sorted table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251781#M1986243</link>
    <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/3175/enno.wulff.html"&gt;Enno Wulff&lt;/A&gt;, just as a side note:&lt;/P&gt;&lt;P&gt;It 'works' when the table has a structure and you have to address the field by its attribute name.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF type,
         key TYPE char10,
       END OF type.
DATA ids TYPE SORTED TABLE OF type WITH UNIQUE KEY key.
ids = VALUE #( ( key = 'ONE' ) ( key = 'TWO' ) ( key = 'THREE' ) ( key = 'FOUR' ) ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 24 Aug 2020 14:59:12 GMT</pubDate>
    <dc:creator>michael_piesche</dc:creator>
    <dc:date>2020-08-24T14:59:12Z</dc:date>
    <item>
      <title>wrong conversion error with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251778#M1986240</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
  &lt;P&gt;I have the following issue:&lt;/P&gt;
  &lt;P&gt;This one works:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA ids TYPE TABLE OF char10.
ids = VALUE #( ( 'ONE' ) ( 'TWO' ) ( 'THREE' ) ( 'FOUR' ) ).&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This one does'nt:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA ids TYPE SORTED TABLE OF char10 WITH UNIQUE KEY table_line.
ids = VALUE #( ( 'ONE' ) ( 'TWO' ) ( 'THREE' ) ( 'FOUR' ) ).&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Error message in editor: "'ONE'" and the row type of "IDS" are incompatible.&lt;/P&gt;
  &lt;P&gt;"Solution": trailing spaces&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  ids = VALUE #(
    ( 'ONE       ' )
    ( 'TWO       ' )
    ( 'THREE     ' )
    ( 'FOUR      ' ) ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;SAP_BASIS: 754 &lt;BR /&gt;SAP_ABA: 75E&lt;/P&gt;
  &lt;P&gt;Any ideas?&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;~Enno&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 13:38:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251778#M1986240</guid>
      <dc:creator>EnnoWulff</dc:creator>
      <dc:date>2020-08-24T13:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: wrong conversion error with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251779#M1986241</link>
      <description>&lt;P&gt;I guess there is no other solution when using sorted tables with a key that is character. So it is not a bug with sorted/hashed tables, but a feature of standard tables.&lt;/P&gt;&lt;P&gt;This comes from the ABAP documentation:&lt;/P&gt;&lt;P&gt;- &lt;A href="https://help.sap.com/doc/abapdocu_754_index_htm/7.54/en-US/abenvalue_constructor_params_itab.htm"&gt;https://help.sap.com/doc/abapdocu_754_index_htm/7.54/en-US/abenvalue_constructor_params_itab.htm&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" The constructed rows must meet the requirements of the statement INSERT for inserting work areas using table keys and therefore be compatible with the row type. There is one exception to this: When constructing a standard table, where the rows are only appended, the value can be shorter than the row length (for row types c and x), in which case it is padded on the right with blanks or hexadecimal 0.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Aug 2020 14:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251779#M1986241</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-08-24T14:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: wrong conversion error with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251780#M1986242</link>
      <description>&lt;P&gt;Thanks,  &lt;SPAN class="mention-scrubbed"&gt;michael.piesche&lt;/SPAN&gt; !&lt;/P&gt;&lt;P&gt;That seems to be the solution. It's so common that ABAP accepts "char-like" values that I never thought there would be stronger checks.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 14:43:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251780#M1986242</guid>
      <dc:creator>EnnoWulff</dc:creator>
      <dc:date>2020-08-24T14:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: wrong conversion error with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251781#M1986243</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/3175/enno.wulff.html"&gt;Enno Wulff&lt;/A&gt;, just as a side note:&lt;/P&gt;&lt;P&gt;It 'works' when the table has a structure and you have to address the field by its attribute name.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF type,
         key TYPE char10,
       END OF type.
DATA ids TYPE SORTED TABLE OF type WITH UNIQUE KEY key.
ids = VALUE #( ( key = 'ONE' ) ( key = 'TWO' ) ( key = 'THREE' ) ( key = 'FOUR' ) ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Aug 2020 14:59:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-conversion-error-with-sorted-table/m-p/12251781#M1986243</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-08-24T14:59:12Z</dc:date>
    </item>
  </channel>
</rss>

