<?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: Using the Inline declared table outside the processing block in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953007#M1966647</link>
    <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/735166/anmolamb.html"&gt;Anmol Bhat&lt;/A&gt; inline declared variables are valid only in the current context. In your case it is thus visible only inside a method. It is explained in ABAP documentation.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Mar 2019 14:36:16 GMT</pubDate>
    <dc:creator>Tomas_Buryanek</dc:creator>
    <dc:date>2019-03-22T14:36:16Z</dc:date>
    <item>
      <title>Using the Inline declared table outside the processing block</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953004#M1966644</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
  &lt;P&gt;I am trying to pass the data fetched using inline declaration to next method.&lt;/P&gt;
  &lt;P&gt;For that tried below code&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;method get_data.
select 1,2,3,, from abc into table  @data(it).
data(gv_data) = ref #( it ).
endmethod.
method process_data.
assign gv_data-&amp;gt;* to field-symbol(&amp;lt;fs_data&amp;gt;).
endmethod. &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;However the reference of the gv_data is lost and I am not able to use it anymore.&lt;/P&gt;
  &lt;P&gt;Do you know the better approach to do this.&lt;/P&gt;
  &lt;P&gt;We should not write all the code in one processing block to use the inline function isn't.&lt;/P&gt;
  &lt;P&gt;Thanks a lot for your help in advance.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Anmol&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 12:44:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953004#M1966644</guid>
      <dc:creator>AnmolBhat</dc:creator>
      <dc:date>2019-03-22T12:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Inline declared table outside the processing block</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953005#M1966645</link>
      <description>&lt;P&gt;gv_data is local to the get_data method, if you export it to process_data it should work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;class lcl1 definition.
  methods: get_data,
  process_data importing !iv_data type data.
endclass.

class lcl1 implementation.
 method get_data.
    select 1,2,3,, from abc into table @data(it).
    data(gv_data) = ref #( it ).
    
    process_data( iv_data = gv_data ).
  endmethod.
  method process_data.
    assign iv_data-&amp;gt;* to field-symbol(&amp;lt;fs_data&amp;gt;).
  endmethod.
endclass.

start-of-selection.
data(lo_obj) = new lcl1( ).

lo_obj-&amp;gt;get_data( ).
&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Mar 2019 13:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953005#M1966645</guid>
      <dc:creator>srikanthnalluri</dc:creator>
      <dc:date>2019-03-22T13:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Inline declared table outside the processing block</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953006#M1966646</link>
      <description>&lt;P&gt;GV_data would be global anyways.&lt;/P&gt;&lt;P&gt;I want to call get_data and process_data separately if possible.&lt;/P&gt;&lt;P&gt;I dont know why but the data reference of the gv_data is lost when I try to call it in process data. &lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 14:19:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953006#M1966646</guid>
      <dc:creator>AnmolBhat</dc:creator>
      <dc:date>2019-03-22T14:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Inline declared table outside the processing block</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953007#M1966647</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/735166/anmolamb.html"&gt;Anmol Bhat&lt;/A&gt; inline declared variables are valid only in the current context. In your case it is thus visible only inside a method. It is explained in ABAP documentation.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 14:36:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953007#M1966647</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2019-03-22T14:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Inline declared table outside the processing block</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953008#M1966648</link>
      <description>&lt;P&gt;Inline declarations are good for readability, but it's only local.&lt;/P&gt;&lt;P&gt;As you don't want it local, don't use an inline declaration. Note that with Eclipse ADT, it takes you 2 clicks to turn your inline expression into an equivalent attribute declaration.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 15:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953008#M1966648</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-03-22T15:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Inline declared table outside the processing block</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953009#M1966649</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;Thanks a lot, it would have been good option to by someway to use this inline declaration outside by using reference or something.&lt;/P&gt;&lt;P&gt;When it is local, it hardly helps then as we write code in modules.&lt;/P&gt;&lt;P&gt;Anyways, Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 09:36:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953009#M1966649</guid>
      <dc:creator>AnmolBhat</dc:creator>
      <dc:date>2019-03-25T09:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Inline declared table outside the processing block</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953010#M1966650</link>
      <description>&lt;P&gt;Too few lines of code per modular unit is as bad as too many. There should be a balance.&lt;/P&gt;&lt;P&gt;And &lt;STRONG&gt;fs&lt;/STRONG&gt; as a prefix for field-symbols adds no values. Isn't the angle brackets sufficient a clue?  What else can go in an angled bracket?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 13:43:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-inline-declared-table-outside-the-processing-block/m-p/11953010#M1966650</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-03-25T13:43:05Z</dc:date>
    </item>
  </channel>
</rss>

