<?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 select options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715718#M312851</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;why do we need to declare the table with TABLES statement before using  select-options?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why do we use internal table without headerline instead of internal table with headerline?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be given&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Nov 2006 17:51:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-10T17:51:13Z</dc:date>
    <item>
      <title>select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715718#M312851</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;why do we need to declare the table with TABLES statement before using  select-options?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why do we use internal table without headerline instead of internal table with headerline?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be given&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 17:51:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715718#M312851</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T17:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715719#M312852</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) SELECT-OPTIONS you don't have declare TABLES..You can use a variable..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_MATNR TYPE MARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS SO_MATNR FOR V_MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) ABAP OO doesn't allow internal tables to be created with HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 17:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715719#M312852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T17:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715720#M312853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you create select options by referencing them to a particualr column in database table. You can do this by declaring a variable in your program and then create select options against that and the other way is by using TABLES &amp;lt;tab_name&amp;gt; - this will allow you to reference to any coulmn on the table while declaring the select options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its SAPs recommendation to use internal tables without header lines. In case of OO ABAP its already restricted and you will not be allowed to create internal tables with header lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 18:01:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715720#M312853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T18:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715721#M312854</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;already explained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just an addition: Select-options needs a reference on a dictionary type. &lt;/P&gt;&lt;P&gt;TABLES is an outdated obsolete statement which is the same as i.e.&lt;/P&gt;&lt;P&gt;DATA: MARA TYPE MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For select-options, also non-database-types can be used. In dictionary, you can have structures with fields and dataelements as well. So&lt;/P&gt;&lt;P&gt;DATA: lv_matnr type mara-matnr.&lt;/P&gt;&lt;P&gt;select-options: s_matnr for lv_matnr.&lt;/P&gt;&lt;P&gt;is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal tables with header lines are confusing for the ABAP processor because the same name is used for the header line and the internal table itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is the same as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For every loop the contents of the table row is copied to the implicit header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ABAP OO there are no implicit declarations and thus no tables with header line.&lt;/P&gt;&lt;P&gt;Anyway you are much better in terms of performance, using internal tables without header line and looping using field-symbol assignment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Confusing only when you start with it, but get used to it quick and will never forget a MODIFY statement. MODIFY copies the header line into the actual table row.&lt;/P&gt;&lt;P&gt;&amp;lt;pre&amp;gt;&lt;/P&gt;&lt;P&gt;DATA: lt_mara TYPE TABLE OF mara.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;declares internal table of structure MARA without header line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;mara&amp;gt; TYPE mara.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;declares pointer for structure MARA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT lt_mara ASSIGNING &amp;lt;mara&amp;gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;in each loop, table row is assigned to &amp;lt;mara&amp;gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;mara&amp;gt; is the actual record of the internal table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Nothing copied, ultra-fast assignment only&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  &amp;lt;mara&amp;gt;-laeng = 50.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;allrecords: Field LAENG set to 50&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;no MODIFY needed because accessed directly - very fast&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&amp;lt;/pre&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just an example. If you get used to it, you will never need a header line again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 18:47:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715721#M312854</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-11-10T18:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715722#M312855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi~~&lt;/P&gt;&lt;P&gt;Addition for the internal table delaring with header lines.&lt;/P&gt;&lt;P&gt;This kind of internal table have structure with the same name of the table.&lt;/P&gt;&lt;P&gt;That is why some of codes just select~ from in_table.&lt;/P&gt;&lt;P&gt;Sometime, it can be confusing to codes readers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linette&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 19:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/1715722#M312855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T19:53:18Z</dc:date>
    </item>
  </channel>
</rss>

