Handling Error message in BADI

Hi All,
I have a requirement to call a error message within the badi Workorder_Update, interface Before_Update.
As it cannot be done in the generalised way can anybody help me out in this regard.
Thanks in advance,

Hello Nilanjan
Looking through the interface methods it looks like there is the following sequence:
BEFORE_UPDATE -> IN_UPDATE -> AT_SAVE
Wherease the first two methods do not have any exception method AT_SAVE has one:
ERROR_WITH_MESSAGE
I would assume that you need to implement AT_SAVE as well.
If my assumption about the sequence of method calling is correct then you can save required data within additional instance attributes when method BEFORE_UPDATE is called. These "stored" data can then be evaluated in method AT_SAVE.
Regards
  Uwe

Similar Messages

  • Handling Error Message in BADI BEFORE_TRIP_SETTLEMT

    Hi All,
    We have implemented BADI BEFORE_TRIP_SETTLEMT. As can be seen, there are no exceptions for the only method CHANGE_TRV_RULES. However, we have to throw error message on some condition. We wrote:
    MESSAGE 'Error' TYPE 'E'.
    This is taking the control out of the screen and throwing message. And when 'ENTER" is pressed, the control is continuing and saving the trip, which should not be allowed.
    I have checked a lot of posts but didn't find any suitable solution.
    Please suggest. Thanks a lot.
    Any suggestions?
    Edited by: Srinivas Kalluri on Mar 15, 2011 2:39 PM

    Hi,
    Since exception is not present in the method, giving error message in this BADI is not a good choice.
    Try to use FM 'POPUP_TO_CONFIRM' to display the message.
    Regards,
    Soumya.

  • Just upgraded to Lion an am discovering that I cannot send email photos from within iPhoto. Error message says bad Internet connection or server not working, when that's not the case. Never happened in Snow Leopard! Help!!!

    Just upgraded to Lion an am discovering that I cannot send email photos from within iPhoto. Error message says bad Internet connection or server not working, when that's not the case. Never happened in Snow Leopard! Help!!!

    what email service - Yahoo mail have been acting up lately
    you can try setting Mail as your email client - it resolves this pfoblem for some people
    LN

  • Can't open PDF's on my Mac coming in on MS Outlook 2010. Reinstalled Adobe software 4 x and still get "Adobe PDF Preview Handler" error message.

    Can't open PDF's on my Mac coming in on MS Outlook 2010. Reinstalled Adobe software 4 x and still get "Adobe PDF Preview Handler" error message.

    No. Reader will not damage files. It is only meant to read pdf files. PDF files are frequently damaged when sent as email due to encoding issues.

  • Handle error message

    hi
    How to handle error message for following FM?
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = lv_filename
        filetype                        = 'DBF'
        write_field_separator           = 'X'
    IMPORTING
      filelength                      = lv_file_len
       TABLES
        data_tab                        = it_final
        fieldnames                      = t_header
        EXCEPTIONS
       file_write_error                = 1
       no_batch                        = 2
       gui_refuse_filetransfer         = 3
       invalid_type                    = 4
       no_authority                    = 5
       unknown_error                   = 6
       header_not_allowed              = 7
       separator_not_allowed           = 8
       filesize_not_allowed            = 9
       header_too_long                 = 10
       dp_error_create                 = 11
       dp_error_send                   = 12
       dp_error_write                  = 13
       unknown_dp_error                = 14
       access_denied                   = 15
       dp_out_of_memory                = 16
       disk_full                       = 17
       dp_timeout                      = 18
       file_not_found                  = 19
       dataprovider_exception          = 20
       control_flush_error             = 21
       OTHERS                          = 22.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    Error Message:  GUI_DOWNLOAD
    GUI_DOWNLOAD - Access Denied!! Why its throwing error message?
    Control flush error in gui_download
    Error in GUI_DOWNLOAD in background processing
    Error In Gui_download
    Reward points..

  • Error message in BADI

    Hi,
       I want to restrict the user from saving the PO in ME22n. I am using the badi ME_PROCESS_PO_CUST for this enhancement and the method is IF_EX_ME_PROCESS_PO_CUST~CHECK. But my issue is my error message is throwing a dump when i double click it saying  conversion from type 'u' to type 'V' not possible . What might be the cause of the dump  ??
    regards
    Saravanan

    Hi,
    Check the following
    1. Login to SAP and execute SE18
    2. Input the BAdi ME_PROCESS_PO_CUST and click on Display
    3. Click on Interface tab
    4. Double click on the Interface name IF_EX_ME_PROCESS_PO_CUST
    5. Place the cursor on Check method and follow the menu path GoTo->Documentation->To Component or after placing the cursor simply you can press F9 also.
    6. In the displayed documentation you can see about error handling
    7. Further to this there is a Link which says Meta field and Error Handling. Click on that
    8. Now the displayed documentation is completely about error handling.
    Regards,
    Raj.
    Hope this helps you out. Reward accordingly.

  • Rendering error message with "Bad TV" effect

    Hi Everyone!
    I am receiving a error message when rendering: "the effect "bad tv" failed to render: Your hardware cannot render at the requested size and depth"
    My computer has been setup to handle the demands of FCP- 2x3 GHz OCTO with 10 GB of RAM. Why is this happening? Does this mean I have to spend $1500 for a graphics card? Rather not...
    Here's more info about what I am trying to accomplish:
    (Media: DVD imported/exported with MPEG Streamclip to HDV 1080i60.
    Sequence settings: HDV 1080i60) I have my reasons for setting my edit up this way I promise!
    Editing for a commercial with some poor footage from 4th Gen. DVD. Instead of trying to make the video look the best, I've decided to go the other way and to make it look worse with Bad TV effect. I have layered 6 files of the DVD to create ghost or duplicate images both on the right and left side of the original footage to take the eye away from the crappy copied DVD footage. When I tried to render out the footage the error message comes up each time.
    THANKS!!!

    I think your confusion is based on the fact that you are interchanging the graphics card, and a video capture card. They are not the same thing.
    The graphics card or display card is the piece of hardware that drives your monitor. It's also used to enhance graphic programs like Photoshop, Motion, etc. It's also what is used to render the cool 3D graphics of games like Halo, and Call of Duty. A good one with an 8K texture limit is around $225 or so.
    A video capture card is a piece of hardware that allows you to capture full frame SD and HD (depending on the card) through an SDI or other cable. It is a way to capture the video signal as opposed to the video file (as Firewire does). These cards can also send full res signals out to a deck or broadcast monitor.
    As far as your gfx card goes, I think the 2600 is a 4K texture limit. Buying the ATI 3870 or 4870 (if your computer is compatible) will give you an 8K texture limit.
    To send full resolution HD out to a deck or monitor, you will need a capture card. Firewire is typically used to export DV DVCProHD or HDV. There are products out there that use firewire to IN/OUT other formats such as ProRes, but it's still a piece of hardware you have to buy. MOTU has a product like that. AJA has the IO that uses a firewire connection. There are others as well.
    I hope this clears up some of your confusion.
    Andy

  • How can we trigger error message in BADI PARTNER_UPDATE

    Hi All,
    I have implemented a BADI PARTNER_UPDATE. In this I have validation ( Error Message ) on saving buisness partner.
    It is giving the error message but it freeze all the fields. On pressing enter it goes for short dump.
    In short dump it gives error The COMMIT WORK processing must not be interrupted.
    Kindly suggest me that how can we pass error message and it also does not freeze the fields.
    Regards,
    Narendra Goyal

    Hi Narendra,
                          How are you trying to display message.
    Is it using message service class instance of message statement (which should not be used, as that is for GUI messages) or using collect FM or by adding to genil message class container.
      Please try different approaches and see what works for you.
    Thanks,
    Rohit

  • How To Handle Error Message In TCD Recording?

    Hi All,
      I tried recording a transaction (my own transaction) by not enterring value in an obligatory field. the error message came. but when i executed the script, it showed an error. but actualy, the error message was expected right? how to handle this situation? i tried with tcd and sapgui recording. both gave almot the same result.
      i am including the script which i have written.
    MESSAGE ( MSG_1 ).
    *TCD ( ZCUST , ZCUST_1 , ECC ).
    SAPGUI ( SAP_1 , ECC ).
    ENDMESSAGE ( E_MSG_1 ).
    v_mno = &tfill.
    v_msg = E_MSG_1[v_mno]-msgtext.
    v_mtp = E_MSG_1[v_mno]-msgtyp.
    If Msg Type is E *** **** It Has To Be E ****
    IF ( v_mtp = 'E' and v_msg = 'Account no AC02 does not exist EXIT = X').
    logtext(0,'Passed').
    ELSE.
    log(v_mtp).
    log(v_msg).
    logtext(1,'Failed').
    ENDIF.
    End Of The Condition For Message Type E ******

    I have recording messages using the TCD command.
    My script (very simple):
    MESSAGE ( MSG_2 ).
    TCD ( ME21 , ME21_1 , R3 ).
    ENDMESSAGE ( E_MSG_2 ).
    In the MESSAGE command interface, I defined rules to allow several kind of messages.
    Execution: 3 mesages found:
          * transform PR into PO
           MESSAGE     MSG_2 [1,009 sec]
             RULES  MSG_2 = XML-DATA-01
            Message  MODE  EXIT  TYPE  ID    NR
            [1]      'A'         'I'   06    456
            [2]      'A'         'W'   'ME'  080
            [3]      'A'         'E'   'ZE'  029
             TCD    ME21                 [0,545 sec N] Target sys R3 -> ZDA010A219
            S06017 Standard PO created under the number 8201075606
               Tgt System Z_A219->R3->ZDA010A219 (ZDA 010 ... HP-UX ORACLE)
               CALL TRANSACTION ME21 ME21_1 XML-DATA-01
               03 MESSAGES FROM ME21 ME21_1 XML-DATA-01
               I  06 456 Release effected with release code 00001
               W  ME  080 Delivery date: next workday is 02.05.2007
               S  06 017 Standard PO created under the number 8201075606
           ENDMESSAGE  E_MSG_2 (&TFILL = 0)
    As you can see, 3 messages are found but the &TFILL variable is still 0.
    I guess (but cannot test yet) I would manage to record those messages using SAPGUI command.
    Is there anything wrong with my script?
    My SAP_BASIS component is in version 620. I'm not using the ultimate version of eCATT (no WEBDYNPRO command, etc.). Could it be an explanation?
    Thank you in advance,
    Olivier

  • How to handle error message during PAI?

    Hi Experts,
    Need help here.
    In my dialog screen, I have a field which is typed 'QUAN'.
    In entering different format , e.g. with non numeric value or a negative value, an error message appear and it does not process the MODULES inside the chain or FIELD MODULE ON REQUEST.
    Does anyone knows how to handle this kind of error. I need to display into a separate screen the errors I encountered coz I'm creating a new RF transaction.
    Points will be rewarded.
    Thanks in advance.

    Hai
    in your case(RF case) it is other way...
    yes you can use
    field x_currency module check_currency.
    in module check_currency.
    you have to display errors in another screen say 200.
    in that there will be 4 fields, all are display only fields.
    X_MESSAGE-MSGV1  of type sy-msgv1
    X_MESSAGE-MSGV2  of type sy-msgv2
    X_MESSAGE-MSGV3 of type sy-msgv3
    X_MESSAGE-MSGV4 of type sy-msgv4
    you populate the messages with these fields and then display it in the screen.
      method check_currency.
    *--do all your checks here....
           if error
             clear x_message.
            x_message-msgv1 = 'Enter Valid Employee Number'(004).
            leave to screen 0200.
          endif.
        endif.
    ENDMODULE.                 " VALIDATE_Currency
    in screen 200 PBO you need to format the message
    using the below logic.
           Method for formatting the message
      method message_format.
        data : lt_text type table of tline,         "text table
               lx_text type tline.                  "work area
        refresh lt_text.
        clear lx_text.
        concatenate x_message-msgv1 x_message-msgv2 into lx_text-tdline
          separated by space.
        append lx_text to lt_text.
        clear lx_text.
        concatenate x_message-msgv3 x_message-msgv4 into lx_text-tdline
          separated by space.
        append lx_text to lt_text.
    *- formatting the message
        call function 'FORMAT_TEXTLINES'
          exporting
            formatwidth = 20
          tables
            lines       = lt_text
          exceptions
            bound_error = 1
            others      = 2.
        clear: x_message.
    *- transfer the message data to screen fields
        loop at lt_text into lx_text.
          if sy-tabix = 1.
            x_message-msgv1 = lx_text-tdline.
          elseif sy-tabix = 2.
            x_message-msgv2 = lx_text-tdline.
          elseif sy-tabix = 3.
            x_message-msgv3 = lx_text-tdline.
          elseif sy-tabix = 4.
            x_message-msgv4 = lx_text-tdline.
          else.
            exit.
          endif.
        endloop.
      endmethod.                    "message_format
    Regards
    Vijay

  • Error message in badi VENDOR_ADD_DATA

    Hi ,
        I've a requirement for adding custom fields to vendor master. I successfully added the screen and i'm able to save the data using the badi's 'VENDOR_ADD_DATA' and 'VENDOR_ADD_DATA_CS'. I've a check on some fields on this screen. I've to give an error message if expiration date is empty and license field has data. I did this in the  method 'CHECK_ALL_DATA' of the badi 'VENDOR_ADD_DATA' by passing values into the message variables accessible in the method. Everything looks good, the error message is coming at the bottom but the screen is getting navigated to the 'Partner Functions'. I tried giving the screen group 'E_SCRGR' and tab fcode 'E_FCODE' variables. But didn't work. Can anyone help me how to stop the navigation and keep the user in the same screen?
    -- Venky

    Hi,
            I figured it out, i had to send the screen number to the E_DYNNR variable which is '4000'. I got that value by debugging. The code had a case statement on this variable and i tried some of the screen number and this one worked :).
    -- Venky

  • Force Error message in BADI ME_PROCESS_PO_CUST

    when PO is created, I have to collect the  error message similar to  Standard SAP does for certain condition (based on the quantity entered in the Service line items )  ,
    Please let me know how to do this within the BADI. I’m using post method of  ME_PROCESS_PO_CUST

    You can use the macro MMPUR_MESSAGE_FORCED in method CHECK (since your requirement is at the very end if I understand you correctly). To see some examples, take a look at the method PROCESS_ITEM in the sample code of the BAdI.
    Don't forget to:  
    INCLUDE mm_messages_mac. "useful macros for message handling

  • Display error message in BADI...

    Hello Experts,
    How do we throw an error message inside a BADI method? I am currently using BADI MRM_INVOICE_UPDATE
    but when I check there are no exceptions or events to use or the message function like the one
    found in ME_PROCESS_PO_CUST.
    Please tell me on how to display an error message(E) inside the standard method of the BADI.
    Thank you guys and take care!

    Hi,
    As explained in the above answer, in the documentation of this badi it says:
    You should note that no system messages can be send in the methods. One exception here is the method CHANGE_AT_SAVE. Within this method, a system message can be issued if the exception ERROR_WITH_MESSAGE is triggered.
    In order to issue a message you should do something like this:
    MESSAGE e001(ZMESSAGECLASS) RAISING error_with_message.
    Best regards
    Edited by: Pablo Casamayor on Aug 18, 2009 8:08 AM

  • 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

  • How to handle error messages in BDC background mode

    Hi experts,
      I got one problem in BDC, We are uploading data throgh BDC program,that program is calling Standard Batch Input programs,
    Now we got one requirement, i.e., In some special cases we have to send one message as a error message.I handled this in foreground but, how to handle this in background.

    Hi,
    if session is being used
    automatically the log will begenereated in the sm35 transaction
    but if call transaction is used
    put all the error messages in the applicationserver using
    open data set
    and after the exectionof the program in the background
    you have to run another progam which reads the data stroed inthe application server
    that also with open data set only...
    thanks & regards,
    Venkatesh

Maybe you are looking for

  • .rtf template and bi server repository failure (newbee tutorial)

    I've installed BISE1 on Windows Server 2003 and followed the tutorial. I successfully fulfilled all the excercises except the last one: the creation of Oracle BI Publisher Report from BI Server Metadata. I have created .rtf template in Word. The prev

  • Possible virus? Google search results links hijacked

    I'm trying to understand a new problem I have run into with my iPad. Recent google searches have not been able to direct me to the link given by google. Almost all results are redirected once they are clicked on. I would understand if these were some

  • Firefox 32 loading firefox 64 plugins..

    I followed the guide on archwiki how to install a 32 chroot and then I installed Firefox, and jre. The whole reason I did this is so I could have the java web browser plugin. Now I load up Firefox32 (I'm in it right now..) and go to about:plugins..an

  • Why is my battery health decreasing so rapidly????

    I bought a new one like 3 weeks ago .. it has 10 cycles and the battery health has decreased from 98% to 95% in these last few days .. I usually have it connected to Ac power and discharge it like every 4 days.. thats the 10 cycles .. why would the h

  • Passing data from one transaction to another

    Hello , I have internal table  as a result of user  selection on the selection screen of first transaction. Internal table can have any number of  lines that have to be processed in second transaction. How I can pass data ( list ) from first transact