<?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: how to capture the error message from bapi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-the-error-message-from-bapi/m-p/3393718#M814862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When u call a BAPI there will be Return structure. u need to pass the internal table to that function module. when the function module is executed the internal table is filled with the messages. u can loop at that internal table where message type is 'E' and process the message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this :&lt;/P&gt;&lt;P&gt;DATA:IT_PERSONALDATA LIKE STANDARD TABLE OF BAPIKNA101_1 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;     IT_COPYREFERENCE LIKE STANDARD TABLE OF BAPIKNA102 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;     &lt;STRONG&gt;RETURN LIKE STANDARD TABLE OF BAPIRETURN1 WITH HEADER LINE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_CUSTOMER_CREATEFROMDATA1'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    PI_PERSONALDATA              = IT_PERSONALDATA&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_OPT_PERSONALDATA          = PI_OPT_PERSONALDATA&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_COMPANYDATA               = PI_COMPANYDATA&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_OPT_COMPANYDATA           = PI_OPT_COMPANYDATA&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_CONSUMEREN                = PI_CONSUMEREN&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    PI_COPYREFERENCE             = IT_COPYREFERENCE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_CREDIT_CONTROL_FLAG       = PI_CREDIT_CONTROL_FLAG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   CUSTOMERNO                   = V_CUSTOMERNO&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;RETURN                       = RETURN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    WAIT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND RETURN.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOOP AT RETURN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;WRITE:/ RETURN-TYPE, RETURN-MESSAGE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDLOOP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swathi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2008 20:29:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-19T20:29:26Z</dc:date>
    <item>
      <title>how to capture the error message from bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-the-error-message-from-bapi/m-p/3393717#M814861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i have one scenario, in that i am calling a BAPI, in turn a BADI is getting trigerred inside the BAPI and it is throwing the "Error Message" ..&lt;/P&gt;&lt;P&gt;My requirement is i need to capture that error message from the BAPI into an internal table/work area without displaying the error message&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 19:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-the-error-message-from-bapi/m-p/3393717#M814861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T19:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture the error message from bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-the-error-message-from-bapi/m-p/3393718#M814862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When u call a BAPI there will be Return structure. u need to pass the internal table to that function module. when the function module is executed the internal table is filled with the messages. u can loop at that internal table where message type is 'E' and process the message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this :&lt;/P&gt;&lt;P&gt;DATA:IT_PERSONALDATA LIKE STANDARD TABLE OF BAPIKNA101_1 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;     IT_COPYREFERENCE LIKE STANDARD TABLE OF BAPIKNA102 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;     &lt;STRONG&gt;RETURN LIKE STANDARD TABLE OF BAPIRETURN1 WITH HEADER LINE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_CUSTOMER_CREATEFROMDATA1'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    PI_PERSONALDATA              = IT_PERSONALDATA&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_OPT_PERSONALDATA          = PI_OPT_PERSONALDATA&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_COMPANYDATA               = PI_COMPANYDATA&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_OPT_COMPANYDATA           = PI_OPT_COMPANYDATA&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_CONSUMEREN                = PI_CONSUMEREN&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    PI_COPYREFERENCE             = IT_COPYREFERENCE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PI_CREDIT_CONTROL_FLAG       = PI_CREDIT_CONTROL_FLAG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   CUSTOMERNO                   = V_CUSTOMERNO&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;RETURN                       = RETURN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    WAIT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND RETURN.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOOP AT RETURN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;WRITE:/ RETURN-TYPE, RETURN-MESSAGE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDLOOP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swathi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 20:29:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-the-error-message-from-bapi/m-p/3393718#M814862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T20:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to capture the error message from bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-the-error-message-from-bapi/m-p/3393719#M814863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think I understand your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an error is ocurring how are you going to handle it then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the Badi is throwing the error message just edit it and get the message there, but again it must be there for a reason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 20:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-the-error-message-from-bapi/m-p/3393719#M814863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T20:46:34Z</dc:date>
    </item>
  </channel>
</rss>

