<?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: Inline Internal Table Declaration in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385715#M9368</link>
    <description>&lt;P&gt;Depends on the ABAP version you are using.&lt;/P&gt;&lt;P&gt;Basically if you are using ABAP Version &amp;gt; 740 you should be able to use VALUE to construct internal table values.&lt;/P&gt;&lt;P&gt;See: &lt;A href="https://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_itab.htm" target="test_blank"&gt;https://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_itab.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2016 13:45:28 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2016-11-29T13:45:28Z</dc:date>
    <item>
      <title>Inline Internal Table Declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385714#M9367</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm looking for any ABAP techniques to do more of an 'inline' (or even in just less lines) of declaring internal tables.&lt;/P&gt;&lt;P&gt;In many languages (javascript, python, etc) we can declare arrays in a single line as such:&lt;/P&gt;&lt;P&gt;pets = ["cat", "dog", "duck", "fish", "turtle"]&lt;/P&gt;&lt;P&gt;And then perhaps go on to work that list in a loop or something similiar.&lt;/P&gt;&lt;P&gt;Is there an equivalent declaration method with abap? Or must I always write (in ABAP):&lt;/P&gt;&lt;P&gt;DATA: gt_pets TYPE TABLE OF string,&lt;/P&gt;&lt;P&gt;            gs_pets LIKE LINE OF gt_pets.&lt;/P&gt;&lt;P&gt;gs_pets = 'cat'.&lt;/P&gt;&lt;P&gt;APPEND gs_pets TO gt_pets.&lt;/P&gt;&lt;P&gt;gs_pets = 'dog'.&lt;/P&gt;&lt;P&gt;APPEND gs_pets TO gt_pets.&lt;/P&gt;&lt;P&gt;(and so on)&lt;/P&gt;&lt;P&gt;Even if it's not "standard" ABAP, i'd be very interested in learning about it!&lt;/P&gt;&lt;P&gt;Thanks all!&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 13:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385714#M9367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-11-29T13:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Inline Internal Table Declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385715#M9368</link>
      <description>&lt;P&gt;Depends on the ABAP version you are using.&lt;/P&gt;&lt;P&gt;Basically if you are using ABAP Version &amp;gt; 740 you should be able to use VALUE to construct internal table values.&lt;/P&gt;&lt;P&gt;See: &lt;A href="https://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_itab.htm" target="test_blank"&gt;https://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_itab.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 13:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385715#M9368</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2016-11-29T13:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Inline Internal Table Declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385716#M9369</link>
      <description>&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: data type string value 'cat;dog;duck;',&lt;BR /&gt;
      data: tab  type table of string.&lt;BR /&gt;
&lt;BR /&gt;
split data at ';' into table tab.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 13:48:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385716#M9369</guid>
      <dc:creator>former_member226519</dc:creator>
      <dc:date>2016-11-29T13:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inline Internal Table Declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385717#M9370</link>
      <description>&lt;P&gt;In recent versions, try a&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES t_itab TYPE TABLE OF string WITH UNIQUE KEY table_line.
DATA(itab) = VALUE t_itab( ( 'cat' ) ( 'dog' ) ( 'duck' ) ( 'fish' ) ( 'turtle' ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;BR /&gt;Raymond&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 14:28:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385717#M9370</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2016-11-29T14:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inline Internal Table Declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385718#M9371</link>
      <description>&lt;P&gt;Thanks all, together your three answers gave me a great overview of all the ways to do this!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 10:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-internal-table-declaration/m-p/385718#M9371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-11-30T10:26:50Z</dc:date>
    </item>
  </channel>
</rss>

