<?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 to change from this obsolete code? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727599#M34154</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;namrata.chaki&lt;/SPAN&gt;, the @data is for inline declaration. It basically declares the internal table based on the fieldlist in your SQL. In short, you would not need to declare the internal table separately up front (see &lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abendata_inline.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abendata_inline.htm&lt;/A&gt; for more details).&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;And, no intention whatsoever to confuse you in any way. Just trying to help.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;jelena.perfiljeva&lt;/SPAN&gt; thanks! &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jul 2018 06:49:02 GMT</pubDate>
    <dc:creator>Patrick_vN</dc:creator>
    <dc:date>2018-07-11T06:49:02Z</dc:date>
    <item>
      <title>How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727585#M34140</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; I have been trying to substitute this following obsolete code :&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;
TABLES:ICON.
.....
.....
START-OF-SELECTION.
SELECT * FROM ICON ORDER BY NAME.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;with the following code , but it's not working -&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA: ICON_STRU TYPE ICON,
      ICON_TAB TYPE TABLE OF ICON_STRU .
.....
.....
START-OF-SELECTION.
SELECT * FROM ICON_TAB ORDER BY NAME.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&amp;amp; when doing syntax check , it is giving following error:&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;The type "ICON_STRU" is unknown.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Since "Tables : ICON." is actually trying to create a structure with all the fields present in the DDIC table ICON , hence I substituted the code with :&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA: ICON_STRU TYPE ICON,&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;which is doing the same thing i.e. creating a local structure with all the fields from ICON table&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&amp;amp; then I am creating an Internal Table with this following code -&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;ICON_TAB TYPE TABLE ICON_STRU .&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;So , can anyone please tell me , what I am doing wrong in this coding?&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Namrata&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 08:19:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727585#M34140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-07-09T08:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727586#M34141</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
  &lt;P&gt;this is extremely basic stuff, I suggest you do the following:&lt;/P&gt;
  &lt;P&gt;Go to se38, then CTL+F8, then type in Select into. This should explain what you're trying to achieve.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Kind regards, Rob Dielemans&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 08:59:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727586#M34141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-07-09T08:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727587#M34142</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;
  &lt;P&gt; You mean there is nothing wrong in declaring using this following code?&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt; Data: ICON_STRU TYPE ICON,

    ICON_TAB TYPE TABLE ICON_STRU .&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; But then in SE38 , why I'm getting this error - 'The type "ICON_STRU" is unknown.'&lt;/P&gt;
  &lt;P&gt;Also, I didn't get you what you wrote in the following - "Go to se38, then CTL+F8, then type in Select into." Can you please tell in more details?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 09:37:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727587#M34142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-07-09T09:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727588#M34143</link>
      <description>&lt;P&gt;I'm already using SE38 for coding! I didn't understand what you are pointing to... &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 09:38:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727588#M34143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-07-09T09:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727589#M34144</link>
      <description>&lt;P&gt;Perform some search on DATA and TYPE(S) in &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=search.htm"&gt;Abap online documentation&lt;/A&gt;, and guess yourself &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 09:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727589#M34144</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2018-07-09T09:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727590#M34145</link>
      <description>&lt;P&gt;He means that if you look at the syntax of SELECT you'll see why &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;SELECT * FROM ICON_TAB ORDER BY NAME.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;is nonsense, and if you read a little about DATA and TYPES keyword in the documentation, you'll probably be able to work out why the below doesn't work (especially - and this is a hint - if you read the documentation for LIKE as well).&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA: ICON_STRU TYPE ICON,
      ICON_TAB TYPE TABLE OF ICON_STRU .&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;For syntax errors, always carefully read the syntax in the documentation.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 10:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727590#M34145</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-07-09T10:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727591#M34146</link>
      <description>&lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abapselect_obsolete.htm"&gt;https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abapselect_obsolete.htm&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 10:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727591#M34146</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-07-09T10:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727592#M34147</link>
      <description>&lt;P&gt;How about:&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;SELECT [fieldlist] FROM icon INTO TABLE @DATA(lt_icon_data). (No * because it might be you don't need all the columns?)&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;And when LOOP-ing (or READ TABLE-ing):&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;LOOP AT lt_icon_data into data(ls_icon_data).&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;..&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;ENDLOOP.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 10:47:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727592#M34147</guid>
      <dc:creator>Patrick_vN</dc:creator>
      <dc:date>2018-07-09T10:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727593#M34148</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
  &lt;P&gt;What is "@DATA"? I didnt read this syntax in any book or abap documentation.&lt;/P&gt;
  &lt;P&gt;I mean the statement can be like this -&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;SELECT * FROM ICON ORDER BY NAME.&lt;/P&gt;
  &lt;P&gt;Then what is wrong in that? Not giving any error in SE38 and much simpler than all those jargons all of you used here just to confuse me more!! &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 15:15:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727593#M34148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-07-09T15:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727594#M34149</link>
      <description>&lt;P&gt;It's new ABAP 7.4+ syntax. Won't work in an earlier release. We don't know what release you're working with, so people are trying to be helpful and suggesting new syntax, assuming it's applicable in your case. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 21:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727594#M34149</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2018-07-09T21:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727595#M34150</link>
      <description>&lt;P&gt;In this case the message means exactly what it says. ICON_STRU is not a &lt;STRONG&gt;type&lt;/STRONG&gt;. It's a &lt;STRONG&gt;structure&lt;/STRONG&gt;. &lt;/P&gt;
  &lt;P&gt;This code passes syntax check, for example:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA: icon_stru TYPE icon,
 icon_tab TYPE TABLE OF icon.

START-OF-SELECTION.
 SELECT * FROM icon
 INTO TABLE icon_tab
 ORDER BY name.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Type is either a dictionary type or what we define in the program using TYPES command. What is defined using DATA is a variable (of certain type).&lt;/P&gt;
  &lt;P&gt;Actually I ran into this a few times and got confused for a moment too. It kind of makes you think ICON_STRU doesn't exist at all but it is right there. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Have to really read this message carefully.&lt;/P&gt;
  &lt;P&gt;I agree with others that using SELECT * is not a good practice, unless you actually need all the data. I find that in the old programs SELECT * frequently comes hand in hand with TABLES. Lazy programming. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 22:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727595#M34150</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2018-07-09T22:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727596#M34151</link>
      <description>&lt;P&gt;Sorry, if you need icon for display why dont just declare: TYPE-POOLS icon?&lt;/P&gt;
  &lt;P&gt;Otherwise, since ICON_STRU is variable ( under DATA statement) you can change ICON_TAB LIKE TABLE OF ICON_STRU. You should read about TYPE and DATA statement in F1 help.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 04:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727596#M34151</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2018-07-10T04:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727597#M34152</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abaptype-pools.htm"&gt;TYPE-POOLS is obsolete&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;I feel that if another person suggests OP reads Help they'll completely lose it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 21:39:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727597#M34152</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2018-07-10T21:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727598#M34153</link>
      <description>&lt;P&gt;Try reading the documentation for select. &lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapselect.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapselect.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 06:40:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727598#M34153</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-07-11T06:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727599#M34154</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;namrata.chaki&lt;/SPAN&gt;, the @data is for inline declaration. It basically declares the internal table based on the fieldlist in your SQL. In short, you would not need to declare the internal table separately up front (see &lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abendata_inline.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abendata_inline.htm&lt;/A&gt; for more details).&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;And, no intention whatsoever to confuse you in any way. Just trying to help.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;jelena.perfiljeva&lt;/SPAN&gt; thanks! &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 06:49:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727599#M34154</guid>
      <dc:creator>Patrick_vN</dc:creator>
      <dc:date>2018-07-11T06:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to change from this obsolete code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727600#M34155</link>
      <description>&lt;P&gt;Yes Agreed. &lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:49:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-change-from-this-obsolete-code/m-p/727600#M34155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-07-11T17:49:11Z</dc:date>
    </item>
  </channel>
</rss>

