<?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: ERROR MESSGAE CLASS IN BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699838#M306837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no error message class as such for this....This will retun the errors after data is posted to SAP to variables. U should use ur defined message class in program and use this message class to output the errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Nov 2006 04:13:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-15T04:13:20Z</dc:date>
    <item>
      <title>ERROR MESSGAE CLASS IN BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699837#M306836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CAN U TELL ME THE NAME OF ERROR MESSAGE CLASS OF THIS BAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_ACC_GL_POSTING_POST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 04:10:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699837#M306836</guid>
      <dc:creator>anilkumar_raina</dc:creator>
      <dc:date>2006-11-15T04:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR MESSGAE CLASS IN BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699838#M306837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no error message class as such for this....This will retun the errors after data is posted to SAP to variables. U should use ur defined message class in program and use this message class to output the errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 04:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699838#M306837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T04:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR MESSGAE CLASS IN BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699839#M306838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  The return structure will have the message class from which the error is raised. That u can reuse by looping at this return parameter table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 07:19:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699839#M306838</guid>
      <dc:creator>former_member283648</dc:creator>
      <dc:date>2006-11-15T07:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR MESSGAE CLASS IN BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699840#M306839</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;There is no message class for error instead you need to add the error messages in return structure which is of type BAPIRET2.&lt;/P&gt;&lt;P&gt;Here O_RETURN is like BAPIRET2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    PERFORM fill_msg_struct_return
     TABLES o_return
      USING 'F5' 'E' 831 l_text i_doc_header-bus_act '' '' '' c_yes.


FORM FILL_MSG_STRUCT_RETURN
                TABLES  IO_RETURN STRUCTURE BAPIRET2
                 USING  I_MSGID
                        I_MSGTY
                        I_MSGNO
                        I_MSGTXT
                        I_MSGV1
                        I_MSGV2
                        I_MSGV3
                        I_MSGV4
                        I_GET_TXT.
  DATA:
    L_MSGID LIKE SY-MSGID,
    L_MSGNO LIKE SY-MSGNO,
    L_MSGTY LIKE SY-MSGTY,
    L_MSGV1 LIKE SY-MSGV1,
    L_MSGV2 LIKE SY-MSGV2,
    L_MSGV3 LIKE SY-MSGV3,
    L_MSGV4 LIKE SY-MSGV4.

* Start Add constant Line VMARTI HD03250050
CONSTANTS: c_line(4)           TYPE c VALUE 'Line',
           c_ki_msg_cls(2)     TYPE c VALUE 'KI',
           c_ki_msg_cls_wbs(2) TYPE c VALUE 'CJ',
           c_ki_msg_no(3)      TYPE c VALUE '260',
           c_ki_msg_no_wbs(3)  TYPE c VALUE '001',
           c_ki_msg_typ(1)     TYPE c VALUE 'E'.
* End Add constant Line VMARTI HD03250050


  IF I_GET_TXT = C_YES.
    L_MSGID = I_MSGID.
    L_MSGNO = I_MSGNO.
    L_MSGTY = I_MSGTY.
    L_MSGV1 = I_MSGV1.
    L_MSGV2 = I_MSGV2.
    L_MSGV3 = I_MSGV3.
    L_MSGV4 = I_MSGV4.

*   Get message text
    CALL FUNCTION 'FI_MESSAGE_TEXT_GET'
         EXPORTING
              I_LANGU = SY-LANGU
              I_MSGID = L_MSGID
              I_MSGNO = L_MSGNO
              I_MSGTY = L_MSGTY
              I_MSGV1 = L_MSGV1
              I_MSGV2 = L_MSGV2
              I_MSGV3 = L_MSGV3
              I_MSGV4 = L_MSGV4
         IMPORTING
              E_MSGTX = I_MSGTXT.
  ENDIF.
* Start combine error msg w/ line number for blocked cost center VMARTI
* HD03250050
  IF L_MSGID EQ c_ki_msg_cls AND
     L_MSGNO EQ c_ki_msg_no  AND
     L_MSGTY EQ c_ki_msg_typ.
* PALIMA Begin
*     CONCATENATE c_line L_MSGV4 I_MSGTXT INTO I_MSGTXT
*         SEPARATED BY SPACE.

     CONCATENATE c_line L_MSGV4 'Cost Center' I_MSGV2 'is not valid.'
     INTO I_MSGTXT SEPARATED BY SPACE.
* PALIMA End

  ENDIF.
* HD03250050

* Start combine error msg w/ line number for WBS Element PALIMA
* HD03256741  - PALIMA
  IF L_MSGID EQ c_ki_msg_cls_wbs AND
     L_MSGNO EQ c_ki_msg_no_wbs AND
     L_MSGTY EQ c_ki_msg_typ.
     clear I_MSGTXT.
     CONCATENATE c_line L_MSGV4 'WBS Element' I_MSGV2 'is not valid.'
     INTO I_MSGTXT SEPARATED BY SPACE.
  ENDIF.
* HD03256741  - PALIMA

* Clear Header line
  CLEAR IO_RETURN.
* Move data.
  IO_RETURN-ID         = I_MSGID. "Message ID
  IO_RETURN-TYPE       = I_MSGTY. "Message type
  IO_RETURN-NUMBER     = I_MSGNO. "Message number
  IO_RETURN-MESSAGE    = I_MSGTXT."Message number
  IO_RETURN-MESSAGE_V1 = I_MSGV1. "Message variables1
  IO_RETURN-MESSAGE_V2 = I_MSGV2. "Message variables2
  IO_RETURN-MESSAGE_V3 = I_MSGV3. "Message variables3
  IO_RETURN-MESSAGE_V4 = I_MSGV4. "Message variables4
* Save (append) data.
  APPEND IO_RETURN TO IO_RETURN.
ENDFORM.                           " FILL_RETURN&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 12:21:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-messgae-class-in-bapi/m-p/1699840#M306839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T12:21:58Z</dc:date>
    </item>
  </channel>
</rss>

