<?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: Method chaining in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463551#M14612</link>
    <description>&lt;P&gt;Your statement&lt;/P&gt;
  &lt;P&gt;"Now the method "get_columns" of the instance ALV returns a parameter of type CL_SALV_COLUMNS_TABLE thru which we call the method "set_optimize"."&lt;/P&gt;
  &lt;P&gt;is not true.&lt;/P&gt;
  &lt;P&gt;Method "get_columns" of the instance ALV returns a parameter of type &lt;STRONG&gt;REF TO&lt;/STRONG&gt; CL_SALV_COLUMNS_TABLE.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Your Question:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;OL&gt; 
   &lt;LI&gt;alv-&amp;gt;get_columns( )-&amp;gt;set_optimize( ) is evaluated from left side to right&lt;/LI&gt; 
   &lt;LI&gt;alv-&amp;gt;get_columns( ) yields a reference to an CL_SALV_COLUMNS_TABLE object&lt;/LI&gt; 
   &lt;LI&gt;message "set_optimize" is sent to this CL_SALV_COLUMNS_TABLE object&lt;/LI&gt; 
   &lt;LI&gt;CL_SALV_COLUMNS_TABLE object provides method set_optimize( ) to react on message "set_optimize"&lt;/LI&gt; 
  &lt;/OL&gt;</description>
    <pubDate>Thu, 27 Jul 2017 08:14:54 GMT</pubDate>
    <dc:creator>hubert_heitzer</dc:creator>
    <dc:date>2017-07-27T08:14:54Z</dc:date>
    <item>
      <title>Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463543#M14604</link>
      <description>&lt;P&gt;Got a simple question on method chaining. I understand this is not a new topic and there are several threads showing examples on how to chain methods but there seems to be a small thing that makes understanding of this concept a little difficult. &lt;/P&gt;
  &lt;P&gt;I am using the class CL_SALV_TABLE where in the variable ALV is an instance of the class CL_SALV_TABLE.&lt;/P&gt;
  &lt;P&gt;While chaining, we use the below code.&lt;/P&gt;
  &lt;P&gt;alv-&amp;gt;get_columns( )-&amp;gt;set_optimize( ).&lt;/P&gt;
  &lt;P&gt;Now the method "get_columns" of the instance ALV returns a parameter of type CL_SALV_COLUMNS_TABLE thru which we call the method "set_optimize". &lt;/P&gt;
  &lt;P&gt;Question -&amp;gt; for the method call "get_columns" the returning parameter is NOT OPTIONAL. So what exactly happens behind the scenes which allow us to skip the helper variable? The instance of the variable ALV and the return parameter of the method "get_columns" are not of the object.&lt;/P&gt;
  &lt;P&gt;Can some help me understand the concept behind this?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 14:08:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463543#M14604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-07-25T14:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463544#M14605</link>
      <description>&lt;P&gt;This type of method call is called a 'Functional Method' and as such can be used directly in assignments, conditions etc etc. It cannot be used for example as an argument to a function module. &lt;/P&gt;
  &lt;P&gt;There is nothing strange about things happening behind the scenes - it's a parameter with a 'Returning' rather than a 'Changing' or 'Exporting' type.&lt;/P&gt;
  &lt;P&gt;You would define it in a local class something like:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt; Close_Notification         Final
                            Importing i_Notif_No              Type Notification_Number
                            Returning Value(r_State)          Type Notification_State,&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;And specify it in SE80 basically the same way.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 14:41:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463544#M14605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-07-25T14:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463545#M14606</link>
      <description>&lt;P&gt;Just consider that alv-&amp;gt;get_columns( ) to be the returned parameter/object. (or read your course on OO functional syntax)&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 14:48:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463545#M14606</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-07-25T14:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463546#M14607</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abapcall_method_static_chain.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abapcall_method_static_chain.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 15:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463546#M14607</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-07-25T15:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463547#M14608</link>
      <description>&lt;P&gt;"It cannot be used for example as an argument to a function module."&lt;/P&gt;
  &lt;P&gt;Yes it can.&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abapcall_function_parameter.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abapcall_function_parameter.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 16:27:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463547#M14608</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-07-25T16:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463548#M14609</link>
      <description>&lt;P&gt;Is that "yes it can, now", or "yes it can and it's been possible since 46c"? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 16:36:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463548#M14609</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-07-25T16:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463549#M14610</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abennews-740-operand_positions.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abennews-740-operand_positions.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 16:40:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463549#M14610</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-07-25T16:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463550#M14611</link>
      <description>&lt;P&gt;Our system chokes: &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/57695-capture.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;So I think Matt nailed it. I was going to query it but I thought I'd wait till I got on a system....&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 06:51:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463550#M14611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-07-26T06:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Method chaining</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463551#M14612</link>
      <description>&lt;P&gt;Your statement&lt;/P&gt;
  &lt;P&gt;"Now the method "get_columns" of the instance ALV returns a parameter of type CL_SALV_COLUMNS_TABLE thru which we call the method "set_optimize"."&lt;/P&gt;
  &lt;P&gt;is not true.&lt;/P&gt;
  &lt;P&gt;Method "get_columns" of the instance ALV returns a parameter of type &lt;STRONG&gt;REF TO&lt;/STRONG&gt; CL_SALV_COLUMNS_TABLE.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Your Question:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;OL&gt; 
   &lt;LI&gt;alv-&amp;gt;get_columns( )-&amp;gt;set_optimize( ) is evaluated from left side to right&lt;/LI&gt; 
   &lt;LI&gt;alv-&amp;gt;get_columns( ) yields a reference to an CL_SALV_COLUMNS_TABLE object&lt;/LI&gt; 
   &lt;LI&gt;message "set_optimize" is sent to this CL_SALV_COLUMNS_TABLE object&lt;/LI&gt; 
   &lt;LI&gt;CL_SALV_COLUMNS_TABLE object provides method set_optimize( ) to react on message "set_optimize"&lt;/LI&gt; 
  &lt;/OL&gt;</description>
      <pubDate>Thu, 27 Jul 2017 08:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/method-chaining/m-p/463551#M14612</guid>
      <dc:creator>hubert_heitzer</dc:creator>
      <dc:date>2017-07-27T08:14:54Z</dc:date>
    </item>
  </channel>
</rss>

