<?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: append returning lines in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617114#M25601</link>
    <description>&lt;P&gt;This might not completely answer your question but you could start with changing it to an inline data declaration which saves you at least one line &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;
  &lt;P&gt;DATA(lt_return_temp) = zcl_class=&amp;gt;method().&lt;BR /&gt;APPEND LINES OF lt_return_temp TO rt_return.&lt;/P&gt;
  &lt;P&gt;Now for your append function, I don't think there is such an ABAP expression, but I could be wrong.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 13:00:31 GMT</pubDate>
    <dc:creator>Softwaris</dc:creator>
    <dc:date>2018-02-28T13:00:31Z</dc:date>
    <item>
      <title>append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617113#M25600</link>
      <description>&lt;P&gt;Hi ABAP-Experts,&lt;/P&gt;
  &lt;P&gt;i wonder if there is a better way of appending return lines to a internal table.&lt;BR /&gt;I have a lot of methods returning a bapiret2 tables and one main return table.&lt;BR /&gt;&lt;BR /&gt;Everytime i call one of those methods i have to do this:&lt;/P&gt;
  &lt;P&gt;DATA: lt_return_temp type bapiret2_t.&lt;BR /&gt;lt_return_temp = zcl_class=&amp;gt;method().&lt;BR /&gt;APPEND LINES OF lt_return_temp TO rt_return.&lt;/P&gt;
  &lt;P&gt;Is there a way to write it more inline?&lt;/P&gt;
  &lt;P&gt;Something like that:&lt;/P&gt;
  &lt;P&gt;append lines of { fill_zdata( EXPORTING is_idoc_data = &amp;lt;s_idoc_data&amp;gt; CHANGING cs_customer = ls_customer ) } to rt_return.&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Fabian&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 12:02:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617113#M25600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-28T12:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617114#M25601</link>
      <description>&lt;P&gt;This might not completely answer your question but you could start with changing it to an inline data declaration which saves you at least one line &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;
  &lt;P&gt;DATA(lt_return_temp) = zcl_class=&amp;gt;method().&lt;BR /&gt;APPEND LINES OF lt_return_temp TO rt_return.&lt;/P&gt;
  &lt;P&gt;Now for your append function, I don't think there is such an ABAP expression, but I could be wrong.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:00:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617114#M25601</guid>
      <dc:creator>Softwaris</dc:creator>
      <dc:date>2018-02-28T13:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617115#M25602</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;data(messages) = thingy-&amp;gt;do_stuff( ). 
append lines of thingy-&amp;gt;do_more_stuff( ) to messages. &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:19:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617115#M25602</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2018-02-28T14:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617116#M25603</link>
      <description>&lt;P&gt;Nice &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I did not know that APPEND LINES supports "functional operand".&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:32:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617116#M25603</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2018-02-28T14:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617117#M25604</link>
      <description>&lt;P&gt;Thanks for sharing. How about :&lt;/P&gt;
  &lt;P&gt;append lines of thingy-&amp;gt;do_more_stuff() to DATA(messages).&lt;/P&gt;
  &lt;P&gt;Does that work? (Since I'm currently not on a SAP system)...&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:35:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617117#M25604</guid>
      <dc:creator>Softwaris</dc:creator>
      <dc:date>2018-02-28T14:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617118#M25605</link>
      <description>&lt;P&gt;The following should work:&lt;/P&gt;
  &lt;P&gt;APPEND LINES OF zcl_class=&amp;gt;method( ) TO rt_return.&lt;/P&gt;
  &lt;P&gt;But even better:&lt;/P&gt;
  &lt;P&gt;rt_return = VALUE #( ( LINES OF zcl_class=&amp;gt;method( ) ) ).&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 15:52:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617118#M25605</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-02-28T15:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617119#M25606</link>
      <description>&lt;P&gt;Shouldn't it be this?&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;    rt_return = value #( base rt_return ( lines of  zcl_class=&amp;gt;method( ) ) ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Feb 2018 16:19:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617119#M25606</guid>
      <dc:creator>ChristianGnter</dc:creator>
      <dc:date>2018-02-28T16:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617120#M25607</link>
      <description>&lt;P&gt;Depending on the use case sure ...&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 16:48:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617120#M25607</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-02-28T16:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617121#M25608</link>
      <description>&lt;P&gt;If you read the documentation for LINES OF, you see, that there is a functional operand position behind.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 17:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617121#M25608</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-02-28T17:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617122#M25609</link>
      <description>&lt;P&gt;THANKS.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;append lines of thingy-&amp;gt;do_more_stuff()tomessages.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;or&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;rt_return = value #( base rt_return ( lines of  zcl_class=&amp;gt;method( ) ) ).&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;worked for me. (I thought i already tried "append lines of..". Sorry.)&lt;/P&gt;
  &lt;P&gt;I think i should take a deeper look at "value #".&lt;/P&gt;
  &lt;P&gt;Thank you all for your input and help.&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Fabian&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 13:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617122#M25609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-03-01T13:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617123#M25610</link>
      <description>&lt;P&gt;The choice comes down to what is clear and easy to read. &lt;/P&gt;
  &lt;P&gt;As an aside, I used to use messages as a returning parameter, but these days I prefer not to. Technically it’s correct and it works, but semantically having an assignment makes the log the ‘focus’ of the statement, whereas it’s really a by-product. &lt;/P&gt;
  &lt;P&gt;I think an exporting parameter puts the focus back onto what’s being executed and makes it easy for a someone to understand straight away with a quick skim of the code. As there will be a few lines, performance is not a significant factor either, so I would write it as:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;thingy-&amp;gt;do_stuff( exporting messages = data(messages) ).

thingy-&amp;gt;do_whatever( exporting messages = data(add_messages) ).
append lines of add_messages to messages.

What would be nice (sorry can’t un-code-format this) is an append receiver function:
thingy-&amp;gt;do_more_stuff( exporting messages = append(messages) ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:30:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617123#M25610</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2018-03-01T16:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617124#M25611</link>
      <description>&lt;P&gt;An append receiver would be nice but i don´t think it´s possible. Or is it?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 15:27:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617124#M25611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-03-02T15:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: append returning lines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617125#M25612</link>
      <description>&lt;P&gt;No, there is no such thing in ABAP. It should be technically feasible to use a function in a writer position as an implicit receiver of whatever is being written to it. It's basically what an inline declaration does.&lt;/P&gt;
  &lt;P&gt;Maybe it will happen one day, who knows what the boys and girls in Walldorf are cooking up...&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 15:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-returning-lines/m-p/617125#M25612</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2018-03-02T15:39:09Z</dc:date>
    </item>
  </channel>
</rss>

