How to Change ERROR Message

Hi Frnds,
Hope you all doing good.
I have kept a database level constrint for a Standared OAF page. but the database error was displaying on page like this
ORA-02091: transaction rolled back ORA-00001: unique constraint (HR.XXDate_UNIQUE_UK) violated in Package irc_party_swi Procedure create_user
how can i change this error message and keep my own custom message to display in screen !!
any suggestions or code would be a big help please :-)

Hi,
Thank you frnd.it would be helpful for me if you provide any sample code.please
You'd need to use a try - catch block around the code that invokes the database call an use an OAException
when the submit button is pressed in the page. PFR is invoking AM,in the application module commit is taking place.at the time of commit the database level constaint is invoking.
so now where shuld i keep try-catch block ?

Similar Messages

  • How to change Error Message into warning message

    Dear Friends,
    I am getting an error
    The qty stored that was entered is adjusted
    Message no. XU 040
    at the time of GRN. I am maintaining batch specific Unit of Measure.
    Please tell me how to change this error message in to a warning message.
    Thanks
    Prashant Atri

    Hello Prashant,
    This is satndard SAP messagge which is maintained in customizing;
    SPRO>>Logistics - General>>Batch Management>>Define Attributes of System Messages
    Here you can convert this messages to warning message. I urge you to please check with abaper as this may be hardcoded message and it may have implications on valuation and posting.
    In the above IMG path you can do the changes
    Br,
    Tushar
    Edited by: Tushar Patankar on Jan 1, 2011 5:36 PM

  • How to change error messages in Oracle Portal 3.0.9.8

    I have errors such as "No row returned" and etc.
    How can I change this error messages.
    Urgent
    HELP

    about report:
    select field1,field2,...,fieldn
    from table
    where table.date_insert<sysdate
    union
    select null field1, null field2, ...,null fieldn
    from dual
    order by field1...
    about other err:
    solve this problem by writing portlet manually

  • ESS Business Package - How to change error message

    Hi,
    In ESSBusiness Package Leave Application screen, if we enter some character XXX for From and To date field and try to proceed further (preview button) It is showing a error message 'Enter the value in format 11/25/1987" that we want to change to 'Enter the value in format MM/DD/YYYY".
    Please let us know from where this standard message is coming whenever we put some character values for any date control and how to change the same to customer specific message.
    Regards
    Sudhir

    Thank you Poojith,
    This is a standard message not only coming for Calender control in ESS application but also behaviour is same for custom webdynpro applications. So this message is not part of Leave Component message pool
    Regards
    Sudhir

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

  • Change error message to warning message

    Hi Experts,
    How can we change error message to warning message.
    Eg: T-code : SE91 shows the message. If i want to change message class PG, message no 26 error to warning what will be the process.
    Regards
    Ratan

    Hi Ratan,
    Message class PG is used in the below mentioned Standard SAP Methods and Includes, So it is not suggested to change the SAP standard code.
    Regards,
    Raja Sekhar

  • 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

  • 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

  • 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 change the message in CUCM 7.0 " Your Current Options"

    Dear All
    can any body help me or assist me to type my own message at the botom of the phones by default its your current options but i tried to much to change it or find any way to change and i failed.
    in Call Manager express it was easy to change just at the cli you type "system message Hello this is your IP Phone" but at the CUCM 7.0 i dont know how to change this and solve this problem so can any body tell me how to change this message please its needed 100% for me
    i have atached the picture that where the message cames so you people can see it.
    with regards
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;}
    Waisudin Farzam ویس الدین فرزام                           
    Project National IT Specialist            متخصص ملی تکنالوژی معلوماتی          
    Sustainable Development of Natural Resources Project
    IDA Grant No: H238-AF
    Program Management Unit (PMU)
    Afghanistan Geological Survey (AGS) Annex Building, Ministry of Mines,
    Kabul, Afghanistan
    AWCC Cell Phone:                              0093 - 700 - 29 60 62
    MTN Cell Phone:                                   0093 - 777 - 29 60 62
    E-Mail Address:                                     [email protected]
    E-Mail Address:                                     [email protected]
    E-Mail Address:                                     [email protected]
    Skype ID:                                               wais.farzam
    MSN ID:                                                  [email protected]

    You cannot change it, in CCM it was possible due to it being Windows and you had access to all the files.
    CUCM does not grant access to the necessary files for this unless you have root access and it's not granted for purposes other than troubleshooting or to apply a workaround from a bug.
    HTH
    java
    If this helps, please rate
    www.cisco.com/go/pdihelpdesk

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

  • Change Error Message to Warning Message in GL account

    Hi Experts,
                      I want to Change Error Message to Warning Message In the GL Account - FH142.
    What is the Transcation Code for this.

    Hi,
    Go to transaction code OBMSG and give application area as FH and create new condition for the message 142.
    SAP will support such kind of changes.
    Regards,
    Sankar

  • How to display error message in Shopping Cart?

    How to display error message in Shopping Cart and stop the shopping cart for further processing? I try MESSAGE w001(zshop) or MESSAGE e001(zshop). But it is causing run-time error.

    Hi Paul,
    In the DOC_CHECK or DOC_SAVE BADI, you have a global internal table named et_messages. The structure of this table is 'bbp_smessages_badi'. You can append your error message here by inputting the message type, ID and number. The message type is either 'E' for error or 'W' for warning and the number would depend on your message class(ID). You will be able to see the error message on top of the screen, can be a red or yellow highlight depending on your appended message. I don't think creating the error message via the MESSAGE syntax will be successful, maybe this is why you are getting a runtime error.
    Regards,
    Noel

  • How To Change Standard Message Language?

    Dear All
    I have a atrribute, whose  data type is  integer .It is bounded to a inputfield .
    When i launch the application ,and input a string in the inputfield ,after i  trigger a event ,it return a wrong message in German language ?
    So can anybody give me some tips about how to change the message language in English?
    Thanks In Advance .

    Dear Eleanor,
    Please look at following settings in given order to see if language is set as German (de).
    1. URL - is language being passed as parameter (sap.locale)? [This is valid only if you are the Developer of application]
    2. Your User ID - Is your default language set as German?
    3. Browser - Is your Browser's default language German?
    4. Is 'defaultlocale' property of application set as German?
    5. Is default language of project German?
    6. JVM default is German?
    You should find the answer to your question in one of these 6 locations. Please note that value in 1 will override values of 2-6. Similarly value in 2 will override value in 3-6 and so on.
    Hope this helps.
    Vishwas.

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

Maybe you are looking for