How to raise error message in substitution exits?

Hello Experts,
How to raise error message in substitution exits. I have tried with normal statement,
Message 'Welcome!!' type E.
But its inot stopped at that error message, Its goes next standard code and picked other messag and shown as error message.
Th exit seems U100, I that I want to stop by using error message based on some condition. Please throw the answer quickly

HI Sanjana,
In the Substitution exits you can create the message in the configuration it self.
You dont't need raise message explicitly.
Thanks,

Similar Messages

  • How to raise Error Message in foreground through Dynamic Action?

    Hi,
    I have a requirement where I have to raise an error message in foreground so as to stop processing whenever HR_INFOTYPE_OPERATION fails to update a record in a dynamic program. I tried using MESSAGE statement but it did not work, as the error message was not displayed properly on the Infotype screen that calls the dynamic action.
    For ex.: If infotype PA0000 is calling PA0014 through dynamic action, then I want the error message to be displayed on the Actions Screen of PA0000.
    Is there any specific way to raise error messages through dynamic action programs?
    Quick answers will be appreciated.

    HI Sanjana,
    In the Substitution exits you can create the message in the configuration it self.
    You dont't need raise message explicitly.
    Thanks,

  • How to raise error message from PAI of oops ALV report

    Hi All,
    I have a requirement to raise error message form editable oops alv . After entering the data and then press SAVE button .
    Please help.
    Thanks in Advance

    HI SK,
    Write a Local class (Event Handeler) to handel the events. In Editable ALV once the user enter a value, CL_GUI_ALV_GRID will raise an event called DATA_CHANGED.
    1. Define and Implement a local class to handle that event.
    In the implementation of this class you need to get data from imported object to an internal table, then compare the same with the ALV output table.
    * Local Class to handler the events raised from the ALV Grid
    CLASS LCL_EVENT_HANDLER DEFINITION.
    PUBLIC SECTION.
    * Method to handel EDIT event, DATA_CHANGED of CL_GUI_ALV_GRID
      METHODS : ON_DATA_CHANGE FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
                           IMPORTING ER_DATA_CHANGED.
    ENDCLASS.
    * Event handler class Implementation
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
      METHOD ON_DATA_CHANGE.
        DATA : LT_MODIFY TYPE LVC_T_MODI,
                   LS_MODIFY TYPE LVC_S_MODI.
    * Copying changed data into intenal table from Object
        LT_MODIFY = ER_DATA_CHANGED->MT_MOD_CELLS.
    * Modifying the ouptut table with the changed values
        IF LT_MODIFY[] IS NOT INITIAL.
              *Compare the ALV Output table with LT_MODIFY
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Then raise  a message on required condition in the same method.
    Note: To trigger the above method, you need to set event handler before displaying ALV (before calling method SET_TABLE_FOR_FIRST_DISPLAY)
    * Creating object for the Local event handler class
      CREATE OBJECT GR_HANDLER.
    * Set handler (call method of Event_handler) to handler Edit event
      SET HANDLER GR_HANDLER->ON_DATA_CHANGE FOR  GR_GRID.
    Regards,
    Vijay

  • How to raise error message in MB_DOCUMENT_BEFORE_UPDATE?

    Dear Friends,
    I have a situation like, need to thro an error Message inside the BADI: MB_DOCUMENT_BEFORE_UPDATE.
    Based on some validations on XMSEG parameter inside the above BADI, I am raising an Error Message as usual.
    Message E208(00) with 'Posting error..'.
    When I raise the above error, the system ends with Short Dump.
    Could anyone please let me know, how to handle the above?
    Thanks in advance,
    Ramani N

    >
    Gaurav Gupta wrote:
    > Hi
    > I would like to suggest you to check whether you have used MESSAGE-ID addition in your REPORT statement or not. We are supposed to use it whenever we are trying to display error messages like *Message E208(00) with 'Posting error..' *.
    > Hope this solves your Problem.
    >
    > Regards
    > Gaurav.
    Hi Gaurav,
    My query is about BADI.  Hence, we can not use REPORT statement.
    Rgds,
    Ramani N

  • Raising error messages in user exit..

    hi,
    i have my code in sales order user exit FORM USEREXIT_SAVE_DOCUMENT.
    the code needs to check for a condition and if that fails i do not want to allow the user to save the sales order, rather do the change as i expect.
    i can display the message using my message class, right ? but then how to prevent further action of saving the sales order ?
    thks

    After you give the error message, set the FCODE to 'ENT1'.
    Like:
            message e398(00) with
                    'Some error occured. Press enter.'.
            fcode = 'ENT1'.
    Regards,
    Naimesh Patel

  • Raising Error message

    Hi all,
    We are using SAP ABAP Web Dynpro Component: RPLM_QIMT_NOTIF_COMP to create notification(IW21). After entering data to create notification screen and press save, we want to do some validations and trough error message to screen and stop saving notifications until errors are fixed. Could someone give us clue how we raise error messages. Rather sample code to raise error messages. Notification is created via portal.
    Rgds,
    Harish

    Hello Harish,
    When the user presses on the save button, an event would be triggered. You can catch this event and perform your validations. Once the validations are done, you can use the FPM message manager to report your error messages. (IF_FPM_MESSAGE_MANAGER). You can instantiate this API in your component and then use the methods from this API to report your messages on the UI.
    Regards
    Rohan

  • How to display error message in MSS

    Hi all ,
    I want to desplay an error message in MSS(Portal) at the time of  compensation management .
    I am implementing BADI HRECM00_SALARY.
    Please suggest me how to do that .
    Thanks in advance .
    Naval Bhatt
    Edited by: naval  bhatt on Jun 11, 2008 11:16 AM

    Hi,
    Raise error message in between begining of the BADI  HRECM00_SALARY and Closing statement of BADI.
    Implement the BADI at the time of Creating or submit the details of compensation.
    Thanks
    Gopal.sattiraju

  • Error message KI089: Substitution of settlement senders is not allowed

    Hi ALL,
    To meet the demand of the company, was created a substitution (OKC9) to replace the field value COBL-AUFNR through a user-exit. However, when performing the process that calls the exit in question (transaction KO88) is shows the error message KI089 (Substitution of settlement is not allowed senders).
    Searching the SAP Support Portal could see that there is a note to resolve this problem (SAP Note 317894), but this note would not be valid for SAP ECC 6.0.
    Does anyone know whether it applies to SAP ECC 6.0? I think it's the only solution to solve the reported problem.
    Regards
    Kelson Marcos

    Hi
    I believe the sender should never be substituted. If you posted values to an Order, the same should receive a credit upon settlement. Else, it negates the whole concept of settlement
    I referred to the note you mentioned. What I perceived is you cant substitute a sender during settlement and thats right as per my knowledge
    Ajay M

  • Best Practices Question: How to send error message to SSHR web page.

    Best Practices Question: How to send error message to SSHR web page from custom PL\SQL procedure called by SSHR workflow.
    For the Manager Self-Service application we’ve copied various workflows which were modified to meet business needs. Part of this exercise was creating custom PL\SQL Package Procedures that would gather details on the WF using them on custom notification sent by the WF.
    What I’m looking for is if/when the PL\SQL procedure errors, how does one send an failure message back and display it on the SS Page?
    Writing information into a log or table at the database level works for trouble-shooting, but we’re looking for something that will provide the end-user with an intelligent message that the workflow has failed.
    Thanks ahead of time for your responses.
    Rich

    We have implemented the same kind of requirement long back.
    We have defined our PL/SQL procedures with two OUT parameters
    1) Result Type (S:Success, E:Error)
    2) Result Message
    In the PL/SQL procedure we always use below construct when we want to raise any message
    hr_utility.set_message(APPL_NO, 'FND_MESSAGE_NAME');
    hr_utility.raise_error;
    In Exception block we write below( in successful case we just set the p_result_flag := 'S';)
    EXCEPTION
    WHEN APP_EXCEPTION.APPLICATION_EXCEPTION THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    WHEN OTHERS THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    fnd_message.set_name('PER','FFU10_GENERAL_ORACLE_ERROR');
    fnd_message.set_token('2',substr(sqlerrm,1,200));
    fnd_msg_pub.add;
    p_result_message := fnd_msg_pub.get_detail;
    After executing the PL/SQL in java
    We have written some thing similar to
    orclStmt.execute();
    OAExceptionUtils.checkErrors (txn);
    String resultFlag = orclStmt.getString(provide the resultflag bind no);
    if ("E".equalsIgnoreCase(resultFlag)){
    String resultMessage = orclStmt.getString(provide the resultMessage bind no);
    orclStmt.close();
    throw new OAException(resultMessage, OAException.ERROR);
    It safely shows the message to the user with all the data in the page.
    We have been using this construct for a long time for all our projects. They are all working as expected.
    Regards,
    Peddi.

  • How to prevent error message for material description in MDG material detail screen, when user click on check action

    Dear Experts,
    I have a requirement for making material description as non mandetory in change request view of mdg material screen.
    I have done that using field usage in get data method of feeder classes, but still message is displaying.
    This message 'Material description is mandatory is displaying with check action only, but not with save or submit after i anhance field property as not mandetory.
    How to prevent error message for material description in MDG material detail screen, when user click on check action.
    Thanks
    Sukumar

    Hello Sukumar
    In IMG activity "Configure Properties of Change Request Step", you can completely deactivate the reuse area checks (but will then loose all other checks of the backend business logic as well).
    You can also set the error severity of the checks from Error to Warning (per CR type, not per check).
    Or you provide a default value for the material description, e.g. by implementing the BAdI USMD_RULE_SERVICE.
    Regards, Ingo Bruß

  • How to print error messages in browser?

    When I visit a jsp file in browser, there's some errors in the jsp file, so the browser returns
    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.
    I want the detail error messages, so I can debug my problem. How to print error message in browser or find the message in some log file?

    Hi Kanaraja,
    Thanks for your answer. I need to get certain information from the list. So, I use LIST_To_ASCII FM. However, may I know the ascii_tab should be type to what? And after this FM, do I have to use another FM to display the ascii list?
    data ABAPLIST type ABAPLIST OCCURS 0.
    SUBMIT  RPCALCU0 VIA SELECTION-SCREEN
    with PNPXABKR = 'US'
    with PNPTIMRA = 'X'
    with PNPPABRP = '10'
    with PNPPABRJ = '2003'
    with PNPPERNR-LOW = '100750'
    with PNPPERNR-LOW = '109202'
    with PNPPERNR-LOW = '100255'
    with PNPABKRS-LOW = 'US'
    with SCHEMA = 'ZUSP'
    with RADI_EDT ='X'
    with EDT_VARI = 'CUS&SAP_US'
    with TST_ON = 'X'
    EXPORTING LIST TO MEMORY and RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject       = ABAPLIST
    EXCEPTIONS
       NOT_FOUND        = 1
       OTHERS           = 2.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = asci_tab
        listobject         = ABAPLIST
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    IF sy-subrc NE '0'.
      WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
    ENDIF.

  • How to give error message for the screen element text field when wrong i/p

    How to give error message for the screen element text field when wrong i/p
    when wrong input given
    eg. 
    I have a text box with SBOOK-CARRID
    so when user give wrong entry in text box i.e LG
    then I should give some error stating that the the input is invalid or not available ,
    now it showing the error of standard messages,
    i want manual message to be displayed when error comes.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi all,
    Thank you for your valuable reply,
    but the thing is that its a screen field,
    i.e text box not a selection screen
    i created in screen layout
    with name sbook-carrid
    now i want to get error message display if wrong i/p is given
    thank you.
    Regards,
    Jagrut bharatkumar Shukla,

  • How to make error message as warning message

    how to make error message as warning message? ie  i get error message hence cannot save the slaes order   i want to make that error message as warning so that i can save the sales order please help.

    Hi
    If a message is a custom message, then by changing the message type from E(Error) to W (warning)   we can convert the message type into error message. This is done with the help of development guy. A change in the code is needed.
    If it is a standard message, then it depends on whether we have teh access to change the message type. If access is there, then it is possible to change the message from Warning to Error. i.e. If we are capturing std SAP message in our code and displaying then we can change it, else if SAP message is displayed directly, we cant change it.
    So, to change it, capture the error message from SAP in some Zcode and then convert that message into a custom message of message type E.
    The whole change needs ABAP support.
    Try with tcode <b>OVA2</b> settings selecting for sales order or in SAPRO--SD-BF-Log of Incompletion Items
    Message was edited by:
            SHESAGIRI.G

  • Error message in customer exit

    HI ABAPer's,
    I am facing the one problem  while giving the error message in customer exit  ZXM06U43(POCustomer exit). The scenario is i am looping the  tekpo(PO line item) internal tables and doing some validations if any lineitem fail in the validation i need  give the error message .I dd the  but all ways it showing the error in last line item in the  PO.
    Thanks,
    Harinath

    Hi,
    You have to either leave the screen. Also you can try EXIT in place of LEAVE SCREEN as per suitable to your transaction.
    SAMPLE CODE:
      IF SY-SUBRC <> 0.
        MESSAGE E059(ZGO) WITH I_MSEG-MATNR I_MSEG-AUFNR.
        LEAVE SCREEN.
      ENDIF.
    Regds,
    Anil
    Edited by: Anil Katoch on Sep 3, 2009 7:37 AM

  • How to display error message in abap

    How to dispaly error message in report?
    i have to check the range bewteen two days and if it is not in range have to display error message only once.
    next time if i press the execute button report will get executed without showing the warning message.
    i am calculating the days between two dates, i am displaying the error message but if i press the execute button i will not allow me to execute the report.it again shows me the error message.i have to skip this in 2nd time.
    can any one  suggest what to do with this?

    hello suman,
    i am using select-option in my report. And i have to check the difference between two dates in select option input box( low-value and high-value). if it is greater then suppose 10 then i have to display warning message at once and then if click on execute button , the report should get executed without showing any warning messages in report.
    here i am attaching my source code.please take a close look and tell me where should i have to make change.
    SELECT-OPTIONS :s_bedat FOR ekko-bedat.
    AT SELECTION-SCREEN ON s_bedat.
      IF NOT s_bedat IS INITIAL.
        PERFORM bedat_validate.                       " Perform for Purchasing Document Date Validation
      ENDIF.
    FORM bedat_validate .                        " Form for Purchasing Document Date Validation
      DATA  : diffr TYPE i.
      CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
        EXPORTING
          i_datum_bis                   = s_bedat-high
          i_datum_von                   = s_bedat-low
      I_KZ_EXCL_VON                 = '0'
      I_KZ_INCL_BIS                 = '0'
      I_KZ_ULT_BIS                  = ' '
      I_KZ_ULT_VON                  = ' '
      I_STGMETH                     = '0'
      I_SZBMETH                     = '1'
       IMPORTING
         e_tage                        =  diffr
    EXCEPTIONS
      DAYS_METHOD_NOT_DEFINED       = 1
      OTHERS                        = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        IF diffr GT 31.
          MESSAGE s009(zerrormsg) WITH text-000 DISPLAY LIKE 'W'.
          LEAVE TO LIST-PROCESSING.
        ENDIF.
      ENDIF.
    ENDFORM.                    " BEDAT_VALIDATE

Maybe you are looking for

  • ISE 1.2 customizing guestportal

    We are using the ISE 1.2 for a classic wireless guest management solution. all works fine. now we want to customize the guestportal. At that point we are running into an issue. According to the ISE Config Guide we generated the html files: aup.html,

  • Hide a column in Discoverer

    Hi All, I need to hide a column in Discoverer, though I want that column to create a summary at the end. Currently I have a report as below in discoverer. Type Count Sales T1 100 500 T2 200 1000 T3 300 2000 T4 NA 3000 Total 600 6500 This should be ch

  • Hierarchies About

    Hi,   Can some one let me know 1. When should we use hierarchies, pls. explain with a scenario ? 2. What is the concept behind hierarchies ? 3. How to create a hierarchy - step by step ? 4. Are there any varieties in hierarchy ? 5. what are the compo

  • SAP Script O/P is not comming

    Hi,   when i make a t-code for my SAP-script Program it is not comming properly in print form.   But when i run my print program in se38 it is comming proper out put.   Plz help me what is the cause behind this isue. Regards, Sunil sahoo

  • I need more information about imovie

    Hi, I have some problems with the imovie, sometimes I save a project and when I return it to open has changed and it is listened to very badly or one is slow, also there are times that I apply an effect and duplicated scenes appear to me that before