<?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 Message Handeling in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274504#M1019809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;  Are you sure you are getting sucess messages form BAPI, If you got message  then it will diffinitely store in BApi return table .Read the table with message type as S and Send that to Format_message .Here is the sample code for using ffunction module FORMAT_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT MESSTAB.&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING MESSTAB TO MESSAGES.&lt;/P&gt;&lt;P&gt;      MESSAGES-PLNUM = PLAN-PLNUM.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                ID   = MESSTAB-MSGID&lt;/P&gt;&lt;P&gt;                LANG = MESSTAB-MSGSPRA&lt;/P&gt;&lt;P&gt;                NO   = MESSTAB-MSGNR&lt;/P&gt;&lt;P&gt;                V1   = MESSTAB-MSGV1&lt;/P&gt;&lt;P&gt;                V2   = MESSTAB-MSGV2&lt;/P&gt;&lt;P&gt;                V3   = MESSTAB-MSGV3&lt;/P&gt;&lt;P&gt;                V4   = MESSTAB-MSGV4&lt;/P&gt;&lt;P&gt;           IMPORTING&lt;/P&gt;&lt;P&gt;                MSG  = MESSAGES-TEXT.&lt;/P&gt;&lt;P&gt;      APPEND MESSAGES.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Aug 2008 05:56:12 GMT</pubDate>
    <dc:creator>former_member761936</dc:creator>
    <dc:date>2008-08-12T05:56:12Z</dc:date>
    <item>
      <title>BAPI Message Handeling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274503#M1019808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In BAPI even after collecting of return parameters and looping into 'FORMAT_MESSAGE' i am not able to get the success messages in the outpot?&lt;/P&gt;&lt;P&gt;can any one give me how to do this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2008 05:46:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274503#M1019808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-12T05:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Message Handeling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274504#M1019809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;  Are you sure you are getting sucess messages form BAPI, If you got message  then it will diffinitely store in BApi return table .Read the table with message type as S and Send that to Format_message .Here is the sample code for using ffunction module FORMAT_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT MESSTAB.&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING MESSTAB TO MESSAGES.&lt;/P&gt;&lt;P&gt;      MESSAGES-PLNUM = PLAN-PLNUM.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                ID   = MESSTAB-MSGID&lt;/P&gt;&lt;P&gt;                LANG = MESSTAB-MSGSPRA&lt;/P&gt;&lt;P&gt;                NO   = MESSTAB-MSGNR&lt;/P&gt;&lt;P&gt;                V1   = MESSTAB-MSGV1&lt;/P&gt;&lt;P&gt;                V2   = MESSTAB-MSGV2&lt;/P&gt;&lt;P&gt;                V3   = MESSTAB-MSGV3&lt;/P&gt;&lt;P&gt;                V4   = MESSTAB-MSGV4&lt;/P&gt;&lt;P&gt;           IMPORTING&lt;/P&gt;&lt;P&gt;                MSG  = MESSAGES-TEXT.&lt;/P&gt;&lt;P&gt;      APPEND MESSAGES.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2008 05:56:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274504#M1019809</guid>
      <dc:creator>former_member761936</dc:creator>
      <dc:date>2008-08-12T05:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Message Handeling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274505#M1019810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Krishna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the messages returned by BAPIs you can only be sure that if an error occurred you will receive an error message (of type A(bort), E(error) or X(dump)).&lt;/P&gt;&lt;P&gt;However, in case of a successful BAPI call you may get a S(uccess) message or not. Some BAPIs do not return anything if they succeeded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, I usually evaluate the result of a BAPI call like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
" Call BAPI, messages are returned as TABLES parameter RETURN and stored in itab LT_RETURN:

LOOP AT lt_return TRANSPORTING NO FIELDS
              WHERE ( type CA 'AEX' ).
  EXIT.
ENDLOOP.
" BAPI failed
IF ( syst-subrc = 0 ).


" BAPI succeeded
ELSE.

ENDIF.
&lt;/CODE&gt;&lt;/PRE&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>Tue, 12 Aug 2008 06:10:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274505#M1019810</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-08-12T06:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Message Handeling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274506#M1019811</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;Every BAPI is having the return table with the name of (RETURN) to handle error messages.. it refers the structure BAPIRET2 structure..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this are the main fields in structure BAPIRET2..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE	Message type &lt;/P&gt;&lt;P&gt;ID	     Message Class&lt;/P&gt;&lt;P&gt;MESSAGE    Message Text&lt;/P&gt;&lt;P&gt;MESSAGE_V1         Message Variable&lt;/P&gt;&lt;P&gt;MESSAGE_V2  	Message Variable&lt;/P&gt;&lt;P&gt;MESSAGE_V3	Message Variable&lt;/P&gt;&lt;P&gt;MESSAGE_V4	Message Variable&lt;/P&gt;&lt;P&gt;PARAMETER	Parameter Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;base on TYPE field u can find where the message is error  / successed one...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hope helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Raghunath.S&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 04:16:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274506#M1019811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T04:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Message Handeling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274507#M1019812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vghjg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 13:41:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-message-handeling/m-p/4274507#M1019812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-17T13:41:51Z</dc:date>
    </item>
  </channel>
</rss>

