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).

Similar Messages

  • 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 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

  • 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

  • How to pass error message when restoring iPhone on iTunes?

    I am trying to restore my iPhone on iTunes. But since I have update my MbP to OSX 10.8.2 I can not get passed an error message on iTunes after it is done extracting the software and is contacting iTunes. I have wifi and everything works fine. I heard it could be a host issue, but I have no idea how to fix it? Any help would be appreciated.

    Hi ,
    message table for call transaction
    DATA: BEGIN OF G_T_MSG OCCURS 0.
            INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF G_T_MSG.
    Exucute transaction via Call Transaction
      CALL TRANSACTION  'FB01'
                     USING g_t_bdcdata
                     MODE g_l_mode
                     UPDATE 'S'
                     MESSAGES INTO g_t_msg          .
    errors will be stpored in the table g_t_msg ..
    Thanks .

  • 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

  • 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

  • Passing error message from login module to login page

    Hello,
    we have a custom login module to authenticate user in ldap and to grant application roles stored in db.
    Is it possible to pass error catched in login module to the user (display the error message on login screen)? We think it is helpful to see correct reason why the user couln't be logged in.
    Notes:
    Jdev version is 10.1.3.1. Custom login module was written using Frank Nimphius guidelines and examples.
    Rado

    Hi,
    if you followed this example then it is configured for container managed authentication, in which case the error message cannot be propagated to the view.
    There was a similar discussion on the J2EE forum and the answer was that the OC4J team will put this on a list of enahncements they track. The technical reason appears to be that the J2EE spec does not foresee to tell users about the "why" authentication fails - which clearly is a limitation of the Spec.
    Frank

  • 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?

  • Error message for BAPI BAPI_POEC_CREATE

    Hi All,
    I am using this function module BAPI_POEC_CREATE to create purchase order in srm system.
    I have executed this bapi i am getting below error messages...
    I   BBP_PD               184 Purchase order 0000000068-  has been created
    E  BBP_UI_PO            045 Output: No details for medium Printer in supplier master record
    E  BS                   013 System status INCM is active (Purchase Order 68)
    I am not able to see the PO 68 which is created above in SRM system.Neighter it is shown in BBP_PD.
    also it is asking for output details for supplier. I have maintained in Maintain bussiness partner the output medium for the vendor in contact Tab.where else i need to maintain these values.
    also the error message mentioning INCM is active, i am not getting what it means
    Any body worked on this BAPI befor pls. help me.
    Abdul Raheem

    Hi,
    System Status INCM is active implies that your document is "Incomplete". There is an error and hence you cannot validate it, only park it.
    System status prevents you from ordering/submitting/validating the document until you correct the error.
    So could you please check the error message in RZ20?
    Regards,
    Nikhil

  • How to pass error message for an additional tab strip in MIGO

    Hi,
    I have created one additional tab strip in MIGO transaction,In that tab i have 5 text fields,In that 4 text fields i want to make as mandatory fields,In the existing screen MIGO is using " Application log"  for passing any error message It is calling as include program in SAPLMIGO report program,In that "lmigolo2 " is the include program name.Now i am struggling how to make use that in my newly created screen.
    Regards
    Ambili B

    Hi rahul,
    Can u try these
    :Object failed to run due to an error while processing on the Job Server.
    2 )Object failed to run due to an error
    3 )Object failed to run due to an error while proc... | SCN

  • HP Photosmart Printer D110a on install, can't get pass error message

    As stated: HP Photosmart printer D110a with wireless ability. Keep getting error message on reinstall software &
    drives. Still have yellow triangl on printer icon Help Thanks
    Not all that smart on computers, keep it at ground level.

    Hello there! Welcome to the forums @203Fra-Jer ,
    I read about the installation error you are faced with when trying to install your Photosmart D110a model. I will do my best to help!
    Please first respond with which operating system you are running on the computer you're installing the printer on and I will do some research for you.
    Which Windows Operating System am I running?
    Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
    Thank you!
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Passing SAP messages from Bapi

    Hi all.
    I have created a BAPI.  In this, There are some messages which are type  I and some which are type  E. Now this bapi has to integrate with EP. Will these messages be passed on to EP as it is or do I have to do something special about it. Please help
    Thanks

    Here is a part of the code which I did in my bapi to pop up the message:
    loop at T_BAPI_ENTERTAINMENT_IMPORT2.
        if T_BAPI_ENTERTAINMENT_IMPORT2-amount > T_BAPI_ENTERTAINMENT_EXPORT-BET01.
          message 'Amount cannot be greater than basic salary' type 'E'.<<<<<<<<<<
        else.
          ITAB_zentertainment-persno = BAPI_PERSNO.
          ITAB_zentertainment-ZMONTH = t_BAPI_ENTERTAINMENT_IMPORT2-ZMONTH.
          ITAB_zentertainment-ZYEAR = T_BAPI_ENTERTAINMENT_IMPORT2-ZYEAR.
          ITAB_zentertainment-AMOUNT = t_BAPI_ENTERTAINMENT_IMPORT2-AMOUNT.
          ITAB_zentertainment-CURRENCY = t_BAPI_ENTERTAINMENT_IMPORT2-CURRENCY.
          INSERT INTO ZENTERTAINMENT VALUES ITAB_ZENTERTAINMENT.
          concatenate 'Claim for the month  ' t_BAPI_ENTERTAINMENT_IMPORT2-ZMONTH space space  'Inserted' into var separated by space.
          message var type 'I' . "with 'Claim for the month Inserted'. <<<<<<<<<<
        endif.
      endloop.
    Please let me know what to do with respect to the code above.
    Thanks

  • Passing error message

    gt_messages like yfi_message_xml occurs 0 with header line.
    itab03 type table of yfi_message_xml,
    yfi_message_xml is nothing but a structure which has the components like msgid,msgno,msgtyp etc.
    i should not use gt_messages.
    i want to append data to this itab03.
    if i use itab03-msgid or itab03-msgtyp and append data to it, it givs an error mesg. that itab03 does not have the components of yfi_message_xml sine itab03 is a table without header line.
    without changing anything to itab03 is there anyother way to append data to itab03 .
    can i append data to this itab03 workarea.
    Please help.

    Two ways
    1) create a work area
    Data w_itab03 like line of itab03
    2) use work area of gt_messages
    santhosh

  • Suppress an error message from BAPI

    Dear all,
    One of the BAPIs we are using issues messages like type I or E during background processing.
    I want these messages suppressed. I heard this can be customized in some where.
    Does anybody know how to do it?
    Regards,
    Kazuya

    HI
    GOOD
    GO THROUGH THE FOLLOWING LINKS,I HOPE THIS WILL HELP YOU TO SOLVE YOUR PROBLEM.
    http://www.realtech.com/wDeutsch/software/application_manager/Applications/SAP/APO_DC_WP_EN.pdf
    THANKS
    MRUTYUN

Maybe you are looking for