Error messages BAPI

Hi all,
Again with the 'BAPI_GOODSMVT_CREATE'. I wat to create a error messages file, where it display me the reason why the paramenter gt_bapigm_headret in some cases is initial.
How can I do it?
Thanks in advance.
Regards, Marisol.

There is a tables parameter 'RETURN' which will give you all the messages, including error messages. You have loop through this internal table to find out all the messages. The field MESSAGE of this will give you the error message. Alternatively you can use the ID, NUMBER, MESSAGE_V1, MESSAGE_V2, MESSAGE_V3, MESSAGE_V4 fields and prepare the message yourself.
Srinivas

Similar Messages

  • Error messages for BAPI

    Hello,
    Is there any way to get list of all possible error messages in BAPI for BAPI_PO_CREATE1 and BAPI_SAG_CREATE?
    I need to prepare check list of all possible error messages BAPI can return while creating PO and Schedulling agreement using BAPI.
    Thanks in advance.
    Madhura

    Try checking the message class used inside BAPI_PO_Create and all the messages in ME21n .
    Then you will need to go to this message class and find out al the messages.
    But this can go for a long list from 'error for valid vendor numbers, materials , and all the fields etc
    Mathews

  • IF_EX_ME_PROCESS_PO_CUST multiple error message in the CHECK

    Hi All
    i search a way for multiple error message in the CHECK Methode, because i check every line.
    INCLUDE MM_MESSAGES_MAC.
    ch_failed = 'X'.
    mmpur_message 'E'                                     "&1 sy-msgty
                  '00'                                    "&2 sy-msgid
                  '398'                                   "&3 sy-msgno
                  'Werk nicht in allen Positionen gleich' "&4 sy-msgv1
                  ''                                      "&5 sy-msgv2
                  ''                                      "&6 sy-msgv3
                  ''.                                     "&7 sy-msgv4
    Thanks

    Hi
    ME21N has also a Error Message BAPI for view Errors and i need multiple Messages on these step for each position

  • Unable to capture error message while creating an SO using bapi

    Hi,
    Can anybody suggest how to capture the error message while creating a SO using BAPI.
    I have developed a customeized BAPI and using the BDC format to create the SO.
    Note: i am using a call transaction method for the BDC.
    I am sending the message into message1.
    but i am unable to send the same into an internal table
    shyam.

    Hi Shyam
    If my understanding is correct, you are performing BDC process within the customized BAPI...
    And you want to collect the messages from BDC to an internal table and pass to the output.
    Proceed as below:
    1. While calling BDC, use CALL TRANSACTION .... with addition: <b>MESSAGES INTO itab</b>. The structure of itab should be like <b>BDCMSGCOLL</b>.
    2. Now the messages will be collected in ita.
    3. Prepare the messages using FM: <b>FORMAT_MESSAGE</b>
    4. Collect to the returning table.
    Hope this helps...
    Though i could not understand the reason of creating a BDC within BAPI, you can opt for loading orders via BAPI's like: BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2.
    Kind Regards
    Eswar

  • How to add error message to return structure of calling BAPI from a BADI

    i have a bapi where a badi is triggered.this badi method has just importing and changing parameters.is there any way with which i can add error message to the return structure of calling bapi.please reply at the earliest.High points can be expected.

    thanks got it

  • Error message handling in BAPI...

    Hi Guys,
    I am working on documentation of a BAPI used SAP insurance module. Now I want to see all the error messages associated/ handled in that BAPI. How can I do that ? Is there a table in data dictionary where I can see error messages handled by a given Function module/ BAPI?
    Any inputs will be highly appreciated.
    Thanks.
    Regards,
    Tushar.

    Hi,
    here´s one possible solution:
      CALL FUNCTION 'MESSAGES_INITIALIZE'.
      LOOP AT it_return_bapi.
        CALL FUNCTION 'MESSAGE_STORE'
             EXPORTING
                  arbgb          = it_return_bapi-id
                  exception_if_not_active = ' '
                  msgty                = it_return_bapi-type
                  msgv1          = it_return_bapi-message_v1
                  msgv2          = it_return_bapi-message_v2
                  msgv3          = it_return_bapi-message_v3
                  msgv4          = it_return_bapi-message_v4
                  txtnr          = it_return_bapi-number
                  zeile          = ' '
             EXCEPTIONS
                  message_type_not_valid  = 1
                  not_active              = 2
                  OTHERS                  = 3.
      ENDLOOP.
      CALL FUNCTION 'MESSAGES_STOP'
           EXCEPTIONS
                a_message = 04
                e_message = 03
                i_message = 02
                w_message = 01.
      IF NOT sy-subrc IS INITIAL.
        CALL FUNCTION 'MESSAGES_SHOW'
             EXPORTING
                  i_use_grid         = 'X'
                  i_amodal_window    = i_amodal_window
             EXCEPTIONS
                  inconsistent_range = 1
                  no_messages        = 2
                  OTHERS             = 3.
      ENDIF.
    ENDFUNCTION.
    Best regards

  • Error message in BAPI call

    I have imported RFC Interfaces from SAP system. Each interfaces doesn't  have fault message.
    How to get error message in BAPI call when error occurs?
    I can catch an exception in BPM but I need to get error message and send it to another system.

    Hi Denis,
    >>>I have imported RFC Interfaces from SAP system. Each interfaces doesn't have fault message.
    if you want to use fault messages
    consider using ABAP Proxies
    >>>>How to get error message in BAPI call when error occurs?
    most bapis have return table in which they
    return error messages (you can do it either
    in a sync way or in an async way if the call is too long - with corrlelation of course)
    Regards,
    michal

  • Error Message in BAPI ... 'BAPI_ACC_INVOICE_RECEIPT_POST'

    Hello,
    I recently used a BAPI called 'BAPI_ACC_INVOICE_RECEIPT_POST'. However an error message appeared in my return table stating "No currency line exists for line item ....".
    Is there a way to resolve this?
    Thank you all and good day.

    hi Chad,
    the BAPI has four important tables parameters:
    ACCOUNTPAYABLE
    ACCOUNTGL
    ACCOUNTTAX
    CURRENCYAMOUNT
    In CURRENCYAMOUNT there should be a corresponding line for each lines in the first three tables.
    hope this helps
    ec

  • Handling error messages in BAPI

    Hello,
       I am doing a replica of an SAP R3 std report in portal. I've converted the report pgm to a BAPI. My question is how to populate the BAPIRETURN table with the error messages raised from a std report? I mean how to capture these error messages? I am doing a SUBMIT to call this report from within the BAPI.
    Thanks in advance.
    Rgds,
    Nathan.

    Hi,
      Collect all the errors in an internal table..Lets say ITAB.
      At the end of the program export it to the memory.
      EXPORT T_ERRORS TO MEMORY ID 'BAPI_CALL'.
    In the Bapi after the program is completed..use the import statement to get it from the memory...
      SUBMIT 'ZREPORT' AND RETURN.
      IMPORT T_ERRORS FROM MEMORY ID 'BAPI_CALL'.
      Then pass the errors to the return parameter of the BAPI..
    Thanks,
    Naren

  • BAPI Error message in WDA using AIF

    Friends,
    I am working on Custom WDA using AIF to create Purchase Requisitions.
    I am calling the BAPIs  -  'BAPI_REQUISITION_CREATE' and 'BAPI_TRANSACTION_COMMIT' using CALL FUNCTION.
    I passed the item values to zitab and called the function module.
    Here is the code:
    CALL FUNCTION 'BAPI_REQUISITION_CREATE'
    EXPORTING
    SKIP_ITEMS_WITH_ERROR                = 'X'
    AUTOMATIC_SOURCE                     = 'X'
    IMPORTING
    NUMBER                               = number
    TABLES
       REQUISITION_ITEMS                    = zitab
      REQUISITION_ACCOUNT_ASSIGNMENT       =
      REQUISITION_ITEM_TEXT                =
      REQUISITION_LIMITS                   =
      REQUISITION_CONTRACT_LIMITS          =
      REQUISITION_SERVICES                 =
      REQUISITION_SRV_ACCASS_VALUES        =
      RETURN                               = zbapireturn
      REQUISITION_SERVICES_TEXT            =
      REQUISITION_ADDRDELIVERY             =
      EXTENSIONIN                          =
    I am getting the following error messages from BAPI_REQUISITION_CREATE:
    1. Message type - E
    Code - W5069
    Message - Please also pass on a unit of measure for the quantity
    2. Message type - E
    Code - W5002
    Message - No items exist (not possible to save)
    Here are the relevant details:
    System - SAP ECC 6.0 EhP4
    Adobe Livecycle Designer version  - 8.1.2.4246.1.597341
    ADS version - 802.20100318013254.656549
    I found this link that is relevant to the second error, thought the solution is not provided:
    Error : No items Exists (Not Possible to save)
    I would appreciate any hints or thoughts on how to get these errors rectified.
    Regards,
    Arun.

    Thanks Kris for your reply.
    I was able to rectify the 2 errors.
    I need to update 5 custom fields in the CI_EBANDB include in the EBAN table. I am using the EXTENSIONIN parameter.
    Here is my code:
    data: wa_bapiextn type bapiparex,
          zbapiextn type table of bapiparex.
      wa_bapiextn-structure = 'CI_EBANDB'.
      wa_bapiextn-VALUEPART1 = 'A'.
      wa_bapiextn-VALUEPART2 = 'B'.
      wa_bapiextn-VALUEPART3 = 'C'.
      wa_bapiextn-VALUEPART4 = 'D'.
      append zstruct to zitab.
      append wa_bapiextn to zbapiextn.
    CALL FUNCTION 'BAPI_REQUISITION_CREATE'
    * EXPORTING
    *  SKIP_ITEMS_WITH_ERROR                = 'X'
    *  AUTOMATIC_SOURCE                     = 'X'
      IMPORTING
        NUMBER                               = number
        TABLES
          REQUISITION_ITEMS                    = zitab
    *   REQUISITION_ACCOUNT_ASSIGNMENT       =
    *   REQUISITION_ITEM_TEXT                =
    *   REQUISITION_LIMITS                   =
    *   REQUISITION_CONTRACT_LIMITS          =
    *   REQUISITION_SERVICES                 =
    *   REQUISITION_SRV_ACCASS_VALUES        =
         RETURN                               = zbapireturn
    *   REQUISITION_SERVICES_TEXT            =
    *   REQUISITION_ADDRDELIVERY             =
        EXTENSIONIN                          = zbapiextn
    The custom fields are not getting updated. I would greatly appreciate any hints on how to get these custom fields updated.
    Regards,
    Arun.

  • Passing Error message to BAPI Structure in RFC

    Hi Experts,
    I would like to know how we pass error message to BAPI structurre in RFC?
    Plz some one give the details about how we handle the errors.
    Thanks in advance.

    Like already mentioned before, every Standard SAP BAPI, has an export or tables parameter which is called something like RETURN with structure BAPIRET2. In here, you can store all the messages that are generated during the BAPI Call.
    However, if you also want to catch errors like system exceptions and communication errors, you will have to add these exceptions manually:
    EXCEPTIONS
         SYSTEM_FAILURE        = 1 MESSAGE RFC_MESS
         COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
    However, not sure if this addition works when calling BAPI from NON-sap application.
    Declaration:
    DATA: RFC_MESS(128).

  • Getting error message Thru BAPI: BAPI_INCOMINGINVOICE_CREATE

    Hi All,
    Could anyone please investigate into this error and give me the possible answer.
    We're using ECC 6.0
    Getting error while doing Invoice Posting thru BAPI/Function Module: BAPI_INCOMINGINVOICE_CREATE
    Error Messages
    1. M8 376: Enter goods receipt data only when working with GR-based IV
    2. M8 375: Fill in mandatory field REF_DOC, REF_DOC_YEAR, REF_DOC_IT (table parameter ITEMDATA, row 000001)
    These above 1 & 2 been rectified by putting the GR/GI Slip No. of GR
    But still the 3rd error is facing it now
    3. M8 429: Enter a reference to a valid goods receipt (line 000001)
    FYI
    My PO: 4500017248 is having a Status/Control of GR, IR, GR-Based IV
    PO 1 Line- Qty: 10, Net Order Price: 10
    GR: 5000012041 for 1 Line- Qty: 10, Net Order Price: 10, Total: 100
    Regards
    Dinakar
    Edited by: Dinakar Nallavelli on Jan 19, 2009 1:17 PM
    Edited by: Dinakar Nallavelli on Jan 19, 2009 1:23 PM
    Self solved this issue by putting the REF_DOC as GR related- MIGO Doc number and the Year of the document and the line item in it
    No Reply required further for this issue
    Edited by: Dinakar Nallavelli on Jan 19, 2009 2:27 PM

    How did you resolve it?

  • Performance issue calling bapi po create in test mode to get error messages

    Hi,
    We have  a report which displays in alv the purchase orders that got created in SAP, but either got blocked due to not meeting PO Release Strategy tolerances or have failed output messages .We are displaying the failed messages too.
    We are looping the internal table of eban(purchase requisition) and calling bapi po create in test mode to get failed messages.
    Now we are facing performance issue in production.What can be the other effecient way to get the error messages without effecting performance.
    Regards,
    Suvarna

    Hi Suvarna,
    so you need to reduce the number of PO-simulations.
    - Likely you checked already, that all EBAN-entries should already be converted into POs. If there would be a large number of "new" EBAN-entries, they don't need to be simulated.
    - If it's a temporary problem: give aid to correct the problems (maintain prices or whatever the error-reasons are) Then the amount of not-converted purchase requisitions (PR) should drop, too
    - If it's likely, that your volume of open PR will stay high: create a Z-Table with key of EBAN and a counter, simulate (once a day) PO conversions and store the results in the Z-table. In your report you can use the results... if they are "new enough". From time to time new simulations should be done, missing master data might be available.
    Maybe users should be allowed to start this 2nd report manually (in background), too -> then they can update the messages after some data corrections themself, without waiting for the result (just check later in online report and do something different in between).
    And you might need to explain, PO simulation takes as long as PO creation... there is no easy or fast way around this.
    Best regards,
    Christian

  • Error message after update while creatin equipment with BAPI

    Hi All,
    I'm creating equipment master record with BAPI 'BAPI_EQUI_CREATE'. After commit I receive the following error message in my inbox - 
    Update was terminated
    System ID....   ***
    Client.......   ***
    User.....   ***
    Transaction..   Z***
    Update key...   4AD49ADAF8E13020E10000000A701B19
    Generated....   15.10.2009, 16:44:33
    Completed....   15.10.2009, 16:44:33
    Error Info...   Error while determ. loc. crcy: exchange rate type date from to
    Who knows what's the reason and how can it be fixed.
    Thanks in advance,
    Kind Regards,
    Nikolai.
    Edited by: Nikolai Gurlenia on Oct 16, 2009 2:18 PM

    Hi ,
    Try to run the transaction and post the record manually and see how it behaves.
    Contact your functional consultant and check with them if they recently made some config changes
    Thanks
    Ramya

  • BAPI Error Message Handling

    Hi Group,
    I am using BAPI ,How to display the BAPI  Error Message (eg:BAPIRET1) which is returning by BAPI

    HI ,
    ITS SIMPLE TRY THIS CODE
    AWARD PTS
    DATA: gt_ret     TYPE TABLE OF bapiret2,
               ls_ret    TYPE bapiret2,
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument     = p_vbeln
          order_header_in   = gt_hdr
          order_header_inx  = gt_hdrx
        TABLES
          return            = gt_ret -
    >>>>.<b>IMPORTANT</b>
          order_item_in     = gt_itm
          order_item_inx    = gt_itmx
          schedule_lines    = gt_sched
          schedule_linesx   = gs_schedx
          order_text        = gs_stdtxt.
          PARTNERS          = gs_partner
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      LOOP AT gt_ret INTO ls_ret.
        WRITE:/ ls_ret-type.
        WRITE:/ ls_ret-message.
      ENDLOOP.

Maybe you are looking for