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

Similar Messages

  • 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

  • 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

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

  • 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

  • Error Message in BADI WORKORDER_UPDATE

    Hi Experts,
    I am trying to raise error message in the implementation of BADI WORKORDER_UPDATE. The moment error message triggered it is giving the shortdump saying that commit work should not be interrupted.
    Can anybody please let me know how to resolve this issue.
    Thanks,
    Suneel

    Hi,
    Hope this previous posting is helpful
    badi WORKORDER_UPDATE
    Thanks,
    Aby

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

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

  • 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

  • How to display Error messages through BADI HRPAD00INFTY in ESS ?

    Hi,
    In ESS, I want to perform custom validation on IT1067 ( Health Plan ) and allow only specific combinations of health plans to be selected.   We are on ECC6.0 EhP4 .  This infotype is "NOT PERMITTED" in the new decoupled framework and hence I cannot use NEW BADI's for validation and I am stuck with Classical BADI - HRPAD00INFTY.
    In my classical badi HRPAD00INFTY, after validation, I want to display an error message if "Invalid Combination" is selected by the user.  
    I tried using the following code to display the error message :
              DATA badi_message_handler   TYPE REF TO cl_hrpa_message_list.
              DATA message_handler        TYPE REF TO if_hrpa_message_handler. 
              DATA msg                    TYPE symsg.
              DATA is_ok                  TYPE boole_d.
              CREATE OBJECT badi_message_handler.
              message_handler = badi_message_handler.
              msg-msgid = 'YHBN'.
              msg-msgty = 'E'.
              msg-msgno = '006'.
              msg-msgv1 = c_none_plans. "'Invalid Plan'(z09).
              CALL METHOD message_handler->add_message
                EXPORTING
                  message = msg
                  cause   = message_handler->unknown.
                  is_ok = space.
              badi_message_handler->add_messages( message_handler ).
              RAISE error_with_message.
    The message is displayed in ESS but after that the Java Trace Exception is displayed.   I  want to display the error message in a user friendly way and provide an option to correct the plans.
    Please let me know if anyone has done similar thing or have any suggestions.
    Thanks

    Hi,
    DATA badi_message_handler   TYPE REF TO cl_hrpa_message_list.
              DATA message_handler        TYPE REF TO if_hrpa_message_handler. 
              DATA msg                    TYPE symsg.
              DATA is_ok                  TYPE boole_d.
              CREATE OBJECT badi_message_handler.
              message_handler = badi_message_handler.
              msg-msgid = 'YHBN'.
              msg-msgty = 'E'.
              msg-msgno = '006'.
              msg-msgv1 = c_none_plans. "'Invalid Plan'(z09).
              CALL METHOD message_handler->add_message
                EXPORTING
                  message = msg
                  cause   = message_handler->unknown.
                  is_ok = space.
              badi_message_handler->add_messages( message_handler ).
         *-- Add following--
        Exit.
              RAISE error_with_message.

  • I am trying to return finished books to the library and it comes up with an error message e-bad loan

    I am trying to return finished books to the library it comes up with a message e-bad loan id

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Getting error message CT bad param: invalid matrix

    When we try to print this form in Reader 9 or X, we're getting the CT bad param: invalid matrix error message. Any thoughts on what's causing this and how to fix it?
    Thanks,
    MDawn

    java.sql.SQLException: ORA-00904: "SANDY": invalid identifier
    Looks like the sql you are submitting is invalid.
    Print out a copy of the sql you are trying to run and you will probably get:
    SELECT * FROM OURUSERS WHERE usr = Sandy and password = secretThat isn't valid sql. It is missing quotes around the values you are checking.
    This is the corrected sql query:
    SELECT * FROM OURUSERS WHERE usr = 'Sandy' and password = 'secret'so one solution would be:
    String sql = "SELECT * FROM OURUSERS WHERE usr = '" + user + "' and password = '" + pwd + "' ";However that is not optimal. It exposes your code to sql injection attack.
    The better way is to use a prepared statement:
    String sql = "SELECT * FROM OURUSERS WHERE usr = ? and password =?";
    st = con.prepareStatement(sql);
    st.setString(1, user);
    st.setString(2, password);
    rs = st.executeQuery();cheers,
    evnafets

  • Error messages through BADI HRPAD00INFTY not reflected in Portal

    Hi
         We are on ESS 6 and using web dynpro based Iviews.
         Various custom validations have been configured in R/3 via
         BADI <b>HRPAD00INFTY</b> for leave request.
         But those validations are not getting reflected when creating a leave through
         leave request Iview in portal.I need all those custome R/3 validations
         messages to appear in portal as well.
    Regards
    Mohamed Mansoor

    > In which method should I write the validations and
    > more over the BADI has already been implemented via
    > class CL_PT_ARQ_REQ.
    write your validations in SIMULATE_VIA_BLOP method. You can find current record in IM_ATTABS_TAB. after ur validations, when u want to raise an error message use follwing code.
    CALL METHOD MESSAGE_HANDLER->ADD_MESSAGE
    EXPORTING
    IM_TYPE = 'E'
    IM_CL = 'HRTIM_ABS_REQ'
    IM_NUMBER = 'XXX'
    IM_PAR1 = 'SIMULATE_VIA_BLOP'
    IM_PAR2 = 'IF_EX_PT_ABS_REQ~SIMULATE_VIA_BLOP'
    IM_PAR3 = 'BLOP'
    IM_CONTEXT = ''
    IM_SUBCONTEXT = ''
    IM_CLASSNAME = 'CL_PT_ARQ_BLOP_ADAPTER'
    IM_METHODNAME = 'MESSAGE'.
    Here, IM_CL = 'HRTIM_ABS_REQ' is important.
    This is message class created using se93. and XXX is the message number.
    this should raise an error message on leave screen.
    Cheers!!
    Ashutosh

Maybe you are looking for