<?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: write method in diif ways in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-method-in-diif-ways/m-p/4702563#M1104996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second variant you describe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: lo_msglist   TYPE REF TO if_reca_message_list.

  CALL METHOD cf_reca_message_list=&amp;gt;create
    RETURNING
      ro_instance = lo_msglist.   " or functional method call:

  lo_msglist = cf_reca_message_list=&amp;gt;create( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is the so-called &lt;STRONG&gt;functional method call&lt;/STRONG&gt;. It works - as Matt explained - only if the method has a RETURNING parameter. If a method has a RETURNING parameter it is the only returned parameter. You cannot have additional EXPORTING or CHANGING parameters besides a RETURNING parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Nov 2008 20:29:39 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2008-11-16T20:29:39Z</dc:date>
    <item>
      <title>write method in diif ways</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-method-in-diif-ways/m-p/4702561#M1104994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i heard that i can write method in 2 ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;1. CALL METHOD
  lp_ukm_easy-&amp;gt;add
  EXPORTING
    it_key_mapping = lt_mappings
  IMPORTING
    es_messages    = ls_messages.

2. ls_messages = lp_ukm_easy-&amp;gt;add (exporting = lt_mappings) .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i write like 2 i have error what i doing wrong ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 12:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-method-in-diif-ways/m-p/4702561#M1104994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-16T12:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: write method in diif ways</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-method-in-diif-ways/m-p/4702562#M1104995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lots of things wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If the method has only one IMPORTING parameter (or one is marked as preferred), you can leave out EXPORTING in the call to the method.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If &lt;STRONG&gt;es_messages&lt;/STRONG&gt; was a returning parameter you could use&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ls_messages = lp_ukm_easy&amp;gt;add( lt_mappings ) .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. No space between &lt;STRONG&gt;add&lt;/STRONG&gt; and &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Always have a space inside the brackets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Short form of what you wrote is: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  lp_ukm_easy-&amp;gt;add(   EXPORTING it_key_mapping = lt_mappings
                      IMPORTING es_messages    = ls_messages ). &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 16:01:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-method-in-diif-ways/m-p/4702562#M1104995</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-11-16T16:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: write method in diif ways</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-method-in-diif-ways/m-p/4702563#M1104996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second variant you describe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: lo_msglist   TYPE REF TO if_reca_message_list.

  CALL METHOD cf_reca_message_list=&amp;gt;create
    RETURNING
      ro_instance = lo_msglist.   " or functional method call:

  lo_msglist = cf_reca_message_list=&amp;gt;create( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is the so-called &lt;STRONG&gt;functional method call&lt;/STRONG&gt;. It works - as Matt explained - only if the method has a RETURNING parameter. If a method has a RETURNING parameter it is the only returned parameter. You cannot have additional EXPORTING or CHANGING parameters besides a RETURNING parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 20:29:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-method-in-diif-ways/m-p/4702563#M1104996</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-11-16T20:29:39Z</dc:date>
    </item>
  </channel>
</rss>

