<?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 return parameters and error handling in bapi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216084#M1523247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am checking one codition. if that condition satisfies, to give a message i have to fill the return parameter.&lt;/P&gt;&lt;P&gt;For this i have used the function module BALW_BAPIRETURN_GET2 and in this RETURN parameter is of structure BAPIRET2.&lt;/P&gt;&lt;P&gt;But my requirement is, i want a function module to give messagewhich uses RETURN parameter of type BAPIRETURN1.&lt;/P&gt;&lt;P&gt;could you please help me if u have any idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Aug 2010 12:00:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-24T12:00:48Z</dc:date>
    <item>
      <title>return parameters and error handling in bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216084#M1523247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am checking one codition. if that condition satisfies, to give a message i have to fill the return parameter.&lt;/P&gt;&lt;P&gt;For this i have used the function module BALW_BAPIRETURN_GET2 and in this RETURN parameter is of structure BAPIRET2.&lt;/P&gt;&lt;P&gt;But my requirement is, i want a function module to give messagewhich uses RETURN parameter of type BAPIRETURN1.&lt;/P&gt;&lt;P&gt;could you please help me if u have any idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Aug 2010 12:00:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216084#M1523247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-24T12:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: return parameters and error handling in bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216085#M1523248</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;You question is not clear  Is you function module custom one ?&lt;/P&gt;&lt;P&gt;Explain it more clearly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Aug 2010 12:36:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216085#M1523248</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-24T12:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: return parameters and error handling in bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216086#M1523249</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;PRE&gt;&lt;CODE&gt;use the Fm BALW_BAPIRETURN_GET1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Aug 2010 12:36:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216086#M1523249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-24T12:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: return parameters and error handling in bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216087#M1523250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshav, &lt;/P&gt;&lt;P&gt;yes, its a custom function module..&lt;/P&gt;&lt;P&gt;i am sending the code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION zbapi_hr_record_time.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(EMPNO) LIKE  ZBAPIP9090-EMPNO
*"     VALUE(EDATE) LIKE  ZBAPIP9090-EDATE
*"     VALUE(NO_OF_HOURS) LIKE  ZBAPIP9090-NO_OF_HOURS
*"     VALUE(COMMENTS) LIKE  ZBAPIP9090-COMMENTS
*"     VALUE(EENDDA) LIKE  ZBAPIP9090-EENDDA DEFAULT SY-DATUM
*"     VALUE(EBEGDA) LIKE  ZBAPIP9090-EBEGDA DEFAULT SY-DATUM
*"  EXPORTING
*"     VALUE(RETURN) LIKE  BAPIRET2

*"----------------------------------------------------------------------


DATA : p9090 LIKE p9090,
       opern LIKE psyst-ioper VALUE 'INS'.

DATA : it_pa9090 LIKE pa9090 OCCURS 0 WITH HEADER LINE,
       wa_hours(2) TYPE c.




SELECT no_of_hours FROM pa9090
                   INTO CORRESPONDING FIELDS OF TABLE it_pa9090
                   WHERE empno = empno
                   AND   edate = edate.

CLEAR wa_hours.

LOOP AT it_pa9090.

wa_hours = wa_hours + it_pa9090-no_of_hours.

ENDLOOP.

wa_hours = wa_hours + no_of_hours.

IF wa_hours GT 24.

*CALL FUNCTION 'BALW_BAPIRETURN_GET2'
*  EXPORTING
*    type             = 'E'
*    cl               = 'ZHR_TIME'
*    number           = '000'
**   PAR1             = ' '
**   PAR2             = ' '
**   PAR3             = ' '
**   PAR4             = ' '
**   LOG_NO           = ' '
**   LOG_MSG_NO       = ' '
**   PARAMETER        = ' '
**   ROW              = 0
**   FIELD            = ' '
* IMPORTING
*   return           = return
*          .



ELSE.
****************************************
ENDIF.
ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the aboove code, after IF condition (IF wa_hours GT 24.) instead of using BALW_BAPIRETURN_GET2 function module i want an alternative function module to return message. here in BALW_BAPIRETURN_GET2, RETURN is declared as BAPIRET2,  but i want it as of BAPIRETURN1 structure. so could you please tell me if u know any other FM to RETURN message which uses BAPIRETURN1 structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 07:07:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216087#M1523250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-25T07:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: return parameters and error handling in bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216088#M1523251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Senthil&lt;/P&gt;&lt;P&gt;the FM u sent uses BAPIRET1structure, but i want BAPIRETURN1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 07:08:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216088#M1523251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-25T07:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: return parameters and error handling in bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216089#M1523252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANK YOU...&lt;/P&gt;&lt;P&gt;BAPIRET1 and BAPIRETURN1 Both are having same sturctures.&lt;/P&gt;&lt;P&gt;so i have used BAPIRET1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 07:18:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216089#M1523252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-25T07:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: return parameters and error handling in bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216090#M1523253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  you can achieve this in two ways as shown below. Both will give same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BALW_BAPIRETURN_GET1'
  EXPORTING
    type             = 'E'
    cl               = 'ME'
    number           = '023'
   PAR1             = '100256'
   PAR2             = '001'
*   PAR3             = ' '
*   PAR4             = ' '
*   LOG_NO           = ' '
*   LOG_MSG_NO       = ' '
 IMPORTING
   BAPIRETURN       = e_return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE 'E' TO e_return-type.
MOVE 'ME' TO e_return-id.
MOVE '023' TO e_return-number.
MOVE '100256' TO e_return-MESSAGE_V1.
MOVE '001' TO e_return-MESSAGE_V2.

MESSAGE ID 'ME' TYPE 'E' NUMBER '023' WITH '100256' '001' INTO e_return-message.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 07:35:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-parameters-and-error-handling-in-bapi/m-p/7216090#M1523253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-25T07:35:34Z</dc:date>
    </item>
  </channel>
</rss>

