<?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 BAPI  doubts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397166#M192296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;            i created a custom BAPI. in that business unit is import parameter. i declared return as BAPIRET2.&lt;/P&gt;&lt;P&gt;but i want to display error message when business unit is entered incorretly. how validate. how post error into bapireturn.&lt;/P&gt;&lt;P&gt;                      pls help.&lt;/P&gt;&lt;P&gt;                                  chandu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jul 2006 08:52:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-10T08:52:34Z</dc:date>
    <item>
      <title>BAPI  doubts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397166#M192296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;            i created a custom BAPI. in that business unit is import parameter. i declared return as BAPIRET2.&lt;/P&gt;&lt;P&gt;but i want to display error message when business unit is entered incorretly. how validate. how post error into bapireturn.&lt;/P&gt;&lt;P&gt;                      pls help.&lt;/P&gt;&lt;P&gt;                                  chandu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 08:52:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397166#M192296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T08:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI  doubts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397167#M192297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the BAPI, If the check for the Businees unit with its check table. If it is a invalid value then append the message table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try with this code:&lt;/P&gt;&lt;P&gt;*/ Get the type of Material In Target System&lt;/P&gt;&lt;P&gt;  SELECT SINGLE MTART FROM MARA INTO LV_MTART&lt;/P&gt;&lt;P&gt;                                 WHERE MATNR = HEADDATA-MATERIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF LV_MTART = 'FERT' OR&lt;/P&gt;&lt;P&gt;     LV_MTART = 'HAWA'.&lt;/P&gt;&lt;P&gt;**/ Extend the Material with the identified material type to the target&lt;/P&gt;&lt;P&gt;**/ org. structure as specified in Platform Picker.&lt;/P&gt;&lt;P&gt;    LOOP AT GT_TAR_ORG.&lt;/P&gt;&lt;P&gt;      GT_TAR_ORG-MTART = LV_MTART.&lt;/P&gt;&lt;P&gt;      MODIFY GT_TAR_ORG.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;*/ Error Message if the material type is other than FERT or HAWA&lt;/P&gt;&lt;P&gt;*/ Material Exist &amp;amp;- But not of type HAWA or FERT&lt;/P&gt;&lt;P&gt;    MESSAGE E023(/RB04/OES_YL3) WITH HEADDATA-MATERIAL&lt;/P&gt;&lt;P&gt;    INTO RETURN-MESSAGE.&lt;/P&gt;&lt;P&gt;    RETURN-TYPE = 'E'.&lt;/P&gt;&lt;P&gt;    RETURN-ID = '/RB04/OES_YL3'.&lt;/P&gt;&lt;P&gt;    RETURN-NUMBER = '023'.&lt;/P&gt;&lt;P&gt;    RETURN-MESSAGE_V1 = HEADDATA-MATERIAL.&lt;/P&gt;&lt;P&gt;    RETURN-MESSAGE_V2 = SY-MSGV2.&lt;/P&gt;&lt;P&gt;    RETURN-MESSAGE_V3 = SY-MSGV3.&lt;/P&gt;&lt;P&gt;    RETURN-MESSAGE_V4 = SY-MSGV4.&lt;/P&gt;&lt;P&gt;    APPEND RETURN TO RETURNMESSAGES.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward the points.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 08:57:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397167#M192297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T08:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI  doubts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397168#M192298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Add a Table interface to BAPI like  BAPI_MATRETURN2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append this table by using my previous reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 08:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397168#M192298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T08:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI  doubts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397169#M192299</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;populate the &amp;lt;b&amp;gt;BAPIRET2&amp;lt;/b&amp;gt; WITH THE message id,message number,etc..to this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'BALW_BAPIRETURN_GET2'
    EXPORTING
      type      = imp_msgty
      cl        = imp_msgid
      number    = imp_msgno
      par1      = imp_msgv1
      par2      = imp_msgv2
      par3      = imp_msgv3
      par4      = imp_msgv4
      parameter = imp_parameter
      row       = imp_row
      field     = imp_field
    IMPORTING
      return    = return.
  APPEND return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 09:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397169#M192299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-10T09:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI  doubts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397170#M192300</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;If you are calling any other BAPI from your custom BAPI , pass return parameters of the BAPI to your custom BAPI or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fill the BAPI return table in error cases with proper messages like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RETURN-TYPE = 'E'.&lt;/P&gt;&lt;P&gt;RETURN-ID   = sy-msgid.&lt;/P&gt;&lt;P&gt;RETURN-NUMBER = sy-msgno.&lt;/P&gt;&lt;P&gt;RETURN-MESSAGE = 'error'.&lt;/P&gt;&lt;P&gt;RETURN-LOG_NO = '100'&lt;/P&gt;&lt;P&gt;RETURN-LOG_MSG_NO = '1'.&lt;/P&gt;&lt;P&gt;RETURN-MESSAGE_V1 = sy-msgv1.&lt;/P&gt;&lt;P&gt;RETURN-MESSAGE_V2 = sy-msgv2.&lt;/P&gt;&lt;P&gt;RETURN-MESSAGE_V3 = sy-msgv3.&lt;/P&gt;&lt;P&gt;RETURN-MESSAGE_V4 = sy-msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Laxman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2006 09:01:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-doubts/m-p/1397170#M192300</guid>
      <dc:creator>Laxmana_Appana_</dc:creator>
      <dc:date>2006-07-10T09:01:53Z</dc:date>
    </item>
  </channel>
</rss>

