<?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: BAPI - Funtion module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788142#M2024212</link>
    <description>&lt;P&gt;You can't, both parameters are always returned.&lt;/P&gt;&lt;P&gt;The requirement is not about the function module itself, it's about the CALLING PROGRAM, what it should do with the returned parameters.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION '???'
  IMPORTING
    et_return_04 = et_return_04
    message      = message.
IF message IS INITIAL.
  " If Success need to show ET_return_04(data) only 
ELSE.
  " and if Error message show the 'Message' only
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 Aug 2023 13:16:57 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2023-08-04T13:16:57Z</dc:date>
    <item>
      <title>BAPI - Funtion module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788141#M2024211</link>
      <description>&lt;P&gt;Hi Experrts , &lt;/P&gt;
  &lt;P&gt;I am doing an function module to get an data with Import parameters to get an oiutput parameters . &lt;/P&gt;
  &lt;P&gt;Here, If data saved in table ( will display the output in ET_return_04) , but If data NOT saved in table 'Error message as NO DATA RECORD' .Here i am getting both output parameters. &lt;/P&gt;
  &lt;P&gt;My requirement was &lt;STRONG&gt;'If Success need to&lt;/STRONG&gt; &lt;STRONG&gt;show ET_return_04(data) only and if Error message show the 'Message' only&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;How to achieve it.. &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2194864-image.png" /&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt; IF foreign_country IS NOT INITIAL.

    SELECT zm_country_name FROM zmm_foreign_cou INTO TABLE @DATA(lt_foreign)
        WHERE zm_country_code EQ @foreign_country-zm_country_code.
    IF lt_foreign IS NOT INITIAL .
      MOVE-CORRESPONDING lt_foreign TO et_return_04.
    ELSEIF lt_foreign IS INITIAL.
      MESSAGE 'No data found' TYPE 'E'.
    ENDIF.
  ENDIF.&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Aug 2023 13:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788141#M2024211</guid>
      <dc:creator>devika1989</dc:creator>
      <dc:date>2023-08-04T13:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI - Funtion module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788142#M2024212</link>
      <description>&lt;P&gt;You can't, both parameters are always returned.&lt;/P&gt;&lt;P&gt;The requirement is not about the function module itself, it's about the CALLING PROGRAM, what it should do with the returned parameters.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION '???'
  IMPORTING
    et_return_04 = et_return_04
    message      = message.
IF message IS INITIAL.
  " If Success need to show ET_return_04(data) only 
ELSE.
  " and if Error message show the 'Message' only
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Aug 2023 13:16:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788142#M2024212</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-08-04T13:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI - Funtion module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788143#M2024213</link>
      <description>&lt;P&gt;Thanks response &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;. &lt;/P&gt;&lt;P&gt;I now , how to raise an error message. &lt;/P&gt;&lt;P&gt;But my requirement was &lt;/P&gt;&lt;P&gt;1.' If its success (Data saved in table) need to show the ET_RETURN Parameter. &lt;/P&gt;&lt;P&gt;2. I Error message (Date not saved in table) need to show the return message as 'No Data record found'. &lt;/P&gt;&lt;P&gt;But here if its is Success / Error both Parameter display (This should not appears) &lt;/P&gt;&lt;P&gt;Can we do this? &lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 17:22:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788143#M2024213</guid>
      <dc:creator>devika1989</dc:creator>
      <dc:date>2023-08-04T17:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI - Funtion module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788144#M2024214</link>
      <description>&lt;P&gt;Please elaborate what you mean by 'need to show' and 'both Parameter display'.&lt;/P&gt;&lt;P&gt;As both parameters are part of the defined signature they are of course visible.&lt;/P&gt;&lt;P&gt;It is up to the caller to interpret them.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 18:00:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788144#M2024214</guid>
      <dc:creator>manfred_reinart</dc:creator>
      <dc:date>2023-08-04T18:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI - Funtion module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788145#M2024215</link>
      <description>&lt;P&gt;Yes, please elaborate.&lt;/P&gt;&lt;P&gt;By the way, you do it incorrectly in your function module, maybe it's what is confusing you:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MESSAGE 'No data found' TYPE 'E'.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If the parameter MESSAGE is of type STRING or any type like CLIKE or less generic), it could be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MESSAGE e001(00) WITH 'No data found'(001) '' '' '' INTO message.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(message 00001 is &amp;amp;1&amp;amp;2&amp;amp;3...)&lt;/P&gt;&lt;P&gt;I hope you understand now.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Aug 2023 10:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-funtion-module/m-p/12788145#M2024215</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-08-05T10:03:12Z</dc:date>
    </item>
  </channel>
</rss>

