Error message handling in PO Badi

Hi,
We have some usewr checks in Process_item method of the purchase order BADI.
We use macro mmpur_message_forced to display the messages and macros:
mmpur_remove_messages_by_id le_item-id.
mmpur_business_obj_id le_item-id.
to delete the messages.
The problem is that this last two also delete the system messages. How can we solve this?.
Rgds,
Jose

hi kavitha,
Y dont u use BAPI, it can collect all the errors.
BAPI_INCOMINGINVOICE_CREATE
warm regards
Gokul

Similar Messages

  • 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

  • I have started to get this error message: 5.1.3 bad address syntax in my email account. I am using Outlook 2011. It does not appear to be affecting sending or receiving email. I have no idea what it means or how to resolve the issue. Any advice?

    I have started to get this error message: "5.1.3 bad address syntax" in my email account. I am using Outlook 2011. It does not appear to be affecting sending or receiving email. I have no idea what it means or how to resolve the issue. Any advice?  My email account is through Optimum online and I am using Airpost Express.
    P.S. The error sound "bong" is driving us nuts!

    Please post on the Office for Mac product forums that Microsoft hosts. It's their product and they can best troubleshoot the issue.

  • Error message problem in ORDER_SAVE badi.

    I have used a error message using MESSAGE statement in ORDER_SAVE badi. The problem is when I press the save button and if the condision fails it shows error message. After if you press enter it shows the order is saved.
    It is strange. Please help.

    Can you give some more information?
    1. Which method of the badi are you using?
    2. Do you raise the exception error_occured in this method?
    In general, if you use change_before_update method and raise the exception if you do not want to save the order, the order would not be saved. This exception should be raised every time the method is executed if you do not want to save the current order.
    See the standard implementation class CL_IM_CRM_BUS20001_UPLOAD.
    Hope this helps. If not, post the code, so that I can check.
    Prakash

  • Display error message in WEBUI using BADI - ORDER_SAVE-CHECK_BEFORE_SAVE

    Hi,
    I am trying to display error message using BADI - ORDER_SAVE (Method-CHECK_BEFORE_SAVE) based on certain conditions when the document is saved from WEB UI.
    I have written it like below:
    If (some conditions).
    Message E000 with 'Error in SAVE' RAISING DO_NOT_SAVE.
    endif.
    I mentioned my message class everything in class, and it is fine.
    However, it is not displaying my error message. It is displaying standard information message saying "Document Could not be saved'.
    Could you please help me out, how can I display my custom message.
    Thanks,
    Sandeep

    Hi Sandeep,
    U can use FM to raise a message from order save badi.
    Inside the if condition, u can raise do_not_save.
    If (some conditions)
          CALL FUNCTION 'CRM_MESSAGE_COLLECT'
            EXPORTING
              iv_caller_name = 'ORDERADM_H'
              iv_ref_object  = iv_guid
              iv_ref_kind    = 'A'
              iv_msgno       = '000'
              iv_msgid       = 'zcrm'
              iv_msgty       = 'A'
              iv_msgv1       = c_text1
              iv_msgv2       = c_text2
              iv_msgv3       = c_text3
            EXCEPTIONS
              not_found      = 1
              appl_log_error = 2
              OTHERS         = 3.
          IF sy-subrc NE 0.
          ENDIF.
          RAISE do_not_save.
    ENDIF.

  • [BUG] Problem with Error message handling in JDeveloper 11.2.1.0

    Hello!
    I'm Daniel from Brazil.
    I have been facing a problem recently to which I see no solution. I need to use a specific component called 'Panel Label and Message' in order to nest three other components which need to be grouped together to work properly (an input text box, a LOV calling 'search button', which searchs and populates the input box, and an output text box which displays text depending on the input field). This works fine!!
    The problem comes when I try to place an Access Key that should focus on the input text box part of the group component. In order to do that, I put it on the 'Panel Label and Message' component, and set the 'for' property to the input text box. This too works fine, as when I access it the component redirect the focus to the right place.
    Problem is, when the user decides to this specific field (which is required) blank, JDev has problems handling the actual name of the component, and just calls it 'Component', as the screenshots below show. Apparently, for the other error messages that are handled by myself or generated by other means, it deals with the component's actual name just fine. Is there any way around this? Thanks!
    'Panel Label and Message' component properties. it9 is the id of the 'Input Text' field component. Access Key set to F.
    http://img.photobucket.com/albums/v82/myfireburnsblack/PropertiesErrorBug.png
    Error message I get (it's in portuguese). Field has been left blank, and JDev says I have to put something in, but refers to the field as 'Component'. Any other error is handled correctly, as far as I've tested.
    http://img.photobucket.com/albums/v82/myfireburnsblack/jdevError.png

    Hi Daniel,
    You're not the only one who has seen this: {message:id=9938606}
    As mentioned in that other thread - I had tested similar use cases and it works for me.
    Do you have access to https://support.oracle.com to file an SR?
    John

  • Populating the error message log (while executing BAdI implementation)

    Hi there,
    I have a BAdI to implement CRM_ORDERADM_H_BADI where it will check certain header data. If there is a certain condition that is met, we must not allow the transaction to continue by adding error message on the top (the red button). How can we populate this error log within the BAdI implementation (putting it in codes in the method of the BAdI implementation).
    Many thanks in advance,
    Regards,
    MuJi

    put like this
    data:   w_msg type standard table of shp_badi_error_log initial size 0,
            msg like line of w_msg.
    if sy-subrc ne 0.
          msg-msgty  = 'E'.
          msg-msgid  = 'YW2'.
          msg-msgno  = '041'.
          msg-msgv1  =
           'PGI not allowed ,Pls Enter Truck No in Bill of lad.Field'.
          append msg to ct_log.
    endif.
    <b>In BADI u cannt raise Error Messages but u can Post the Messages to Application Logs, So u have to Update ur messages to CT_LOG.</b>Regards
    Prabhu
    Message was edited by: Prabhu Peram

  • When I try to go to certain pages on PayPal, I get an error message which says 400 Bad Request: Size of request exceeds server limit. Didn't do it before the lasted Foxfire update. Can I revert to an older version?

    1. Using Windows XP home
    2.PayPal is the only website I have problems with Foxfire; works fine on IE8
    3. I can get to some of the desired pages through other links on PayPal so it's not the pages themselves
    4. The error message contains this:
    Cookie: KHcl0EuY7AKSMgfvHl7J5E7hPtK=STMZXVPEjOuzek-HGHcBJRjmRXIQgXpML8uy9fV13oPeEYcAUnBOhKFzvNJqcb-rsc2S6nlYOklSdX6P; cookie_check=yes; LANG=en_US%3bUS; INSIDE
    When I saw Cookie, I did a disk clean including temp files and cookies. No difference. I also did a System Restore, to no avail.
    5. The 400 message actually reads: Size of a request header field exceeds server limit.
    6. Talk to PayPal customer service and they have not heard about any Foxfire conflicts.
    7. Windows Firewall and Kaspersky Firewall turned ON but this is the same configuration before the Foxfire software update. PS. I'll give up Foxfire before I give up Kaspersky

    This issue can be caused by corrupted cookies.
    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"

  • Error Message Handling

    Hi,
               I am trying to execute the below code resulting in a 'refernce to null'. Could any one please help me with some sample code.
    DATA : IM_MESSAGE_HANDLER type ref to IF_HRBAS_MESSAGE_HANDLER.
    DATA message TYPE symsg.
    MESSAGE E015(zhr) WITH 'ERROR MESSAGE' INTO message_dummy1.  
    MOVE-CORRESPONDING sy TO message.
    im_message_handler->add_message( EXPORTING message = message ).
    Thanks,
    Vind.

    Posted across ABAP forum, so closing here

  • ALE Error Message Handling

    Hi,
             In ALE:
    (1) If it is a error means it has to be send to a particular user---> where we will configure these this thing.
    (2) How the user will be intimated for the error in the IDOC, what's the medium he will be intimated whether by
    e-mail it can be intimated. what are the other possible mediums?
    In ALE STANDALONE  METHOD (i.e., i created my own program for sending the IDOC)
    (3) If i got error message --> i want to reprocess that IDOC, where i can reprocess.
    (4) I what to find where that error has occured, where we can find. Is there any possibility of debugging there?

    Hello Mahesh
    On ERP 6.0 you have the standard report RSEIDOCA ( Active IDoc Monitoring as of Release 6.10 ) available. Unfortunately this report does not offer an e-mail notification (see also thread e-mailing: How to sent out an email to the Managers OUTLOOK express account). Normal procedure is to generate work items.
    Reprocessing of failed IDocs is done using transaction BD87.
    In order to debug IDoc processing you can use transaction WE19. Please note that in this case a new IDoc (having the same data as the chosen one) is created.
    Regards
      Uwe

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

  • Error message handling in Integration Process

    How to use the fault message type? when define the fault message type for inbound message interface, how to output that fault message?
    hope from your helps
    Thanks,
    Michael

    Hi,
      A fault message is usually sent from the receiver system to the sender system.
    <i>when define the fault message type for inbound message interface,</i>
    We usually use fault messages when we need the receiver to report an application error to the sender.
    <i>How to use the fault message type?</i>
    In order to use these fault messages, we need to make use of the data type exchange fault data.
    We need to create a message type which has exchange fault data as the message type.
    When we create an outbound synchronous interface, we need to specify this fault message type.
    <i>how to output that fault message?</i>
    This i am not very sure.
    But we must be able to map it to a similar structure, and send it as a file to a file server.
    Regards,
    Smitha.

  • RF screen FM error message handling

    Hi Experts,
    I have created RF transaction to create transfer orders to for moving storage loc.
    Using the FM LEINT_To_MOVE_SU_CREATE
    The issue is if the FM returns any Exception..its directly displayed in the status bar of the main SAP screen.
    How can i capture the FM exception and show them on the RF screen itself.
    Need help on this.
    Thanks
    Jaif

    You need to check sy-subrc and capture those exceptions and messages from sy-msg* variables. Once you know exception is raised by FM, prepare your own screen output as per your RF screen setting (8x40 or 16x20) and populate proper message with message variables on custom error handeling screen.
    Regards,
    Pranav

  • To display a continuos Error Message using BADI

    Hi Everybody,
                        There's a transaction that makes use of classes and interfaces to display an ALV grid with input enabled frames and fields. There's a need to display an error message using a specified BADI method, which gets triggered after the user enters the input. The error message is working fine for the first time.<b>But when i'm trying to enter the same input and press enter after the error message, the transaction is getting closed. How can i display the same error message, until and unless the user enters the correct input ?</b>  I've tried to trace the control using the debugger after the enter is pressed, but the debugger is also getting closed and the control is coming out of the transaction. Help me out in displaying the error message.

    Hi,
    Open the interface and go to the Methods tab.
    Select the Method and click on Parameters.
    In the method parameters, declare a variable
    RETURN      Changing      Type     ALM_ME_BAPIRET2_T.
    Now, inside your code, declare   DATA : ls_return TYPE bapiret2.
    and populate this RETURN table, something like:
            if not ( wa_mara-mtart eq 'SPAR'  or wa_mara-mtart eq 'ZMRO' ).
        CLEAR ls_return.
        MOVE 'E' TO ls_return-type.
        MOVE 'ERR_MESSAGE' TO ls_return-id.
        MOVE '999' TO ls_return-number.
        MOVE 'Enter proper error message here' TO ls_return-message.
        INSERT ls_return INTO TABLE return.
        endif.
    Then, back in your program, check if this table is empty proceed otherwise, STOP or EXIT.
    Regards
    Subramanian

  • Get error message from BADI

    Hi Guys,
    When we add items to the basket,we have a custom scenario in which user can only add product up to a limit after that if he is adding the products to the cart then there is an error message given in the BADI from the backend. But I am not able to get that message in the Java side. Could you guys please help me in which class or from where I can get that error message.
    Thanks & Regards,
    Sunil Patidar

    Hi Sunil,
    If I understand your problem properly, you are intending to show an error message on the UI which has been added at the backend in a BADI. You may want to check the following:
    These BADIs will be called internally by function modules So take a java log and check if the function module you are calling has a 'table' or 'export' parameter with the name 'CT_EXTENSIONS' ot 'ET_EXTENSIONS'.
    If yes, then in the corresponding BADI, check if the method where you have written your code to validate the number of products and trigger the message has this parameter in the method signature.
    If no, then you are in a wrong method. Try the other methods of that BADI.
    If yes, your in the right one, check your coding.
    Hope this helps.
    Regards,
    Kris.

Maybe you are looking for

  • Thoroughly disappointed with Apple & Lion...

         I have never been disapointed with Apple before, but after using Lion for nearly a week I am really upset. I used to work at an Apple Store, I have used Macs since I was about 4, I try to convert all my friends, I follow nearly every rumor site

  • HD options?

    so, HD camcorders are in an affordable range (thinking the canon HV30) and iMovie can edit HD (i assume that since iMovie 6 HD could, that iMovie 8 can). what are the options to output HD? it seems as if iM 8 is geared to web production, can it produ

  • Data load from Legacy system to BW Server through BAPI

    Requirements: We have different kind of legacy systems and SAP BW server. We want to load all legacy system data into SAP BW server using BAPI. Before loading we have to validate all data. If there are bad data, data missing we have to let the legacy

  • Showing all pictures

    Is there a way to display all pictures in the database file like in the older iPhoto, rather then having to see it based on events?

  • I cannot install Java 6 on Mountain Lion

    I've always preferred to use Java 6 when I was using Lion as the Java 7 web plugin never displayed well in OSX (some glitches and design settings I didn't care for). I just bought a new iMac with Mountain Lion, and as expected, no Java installed. I b