Display a message in status bar when error in a block based procedure

Hi
I have a block based on procedures.
If I have an exception when I try to insert a record for example, how can I display a user friendly message in the status bar ?
here is my insert procedure :
PROCEDURE emp_insert2(t IN emptab) IS
  BEGIN
    FOR i IN t.first..t.last LOOP
    INSERT INTO emp (empno, ename, job, hiredate, sal)
    VALUES(t(i).empno, t(i).ename, t(i).job, t(i).hiredate, t(i).sal);
    END LOOP ;
  EXCEPTION
    When DUP_VAL_ON_INDEX then
        Raise_Application_Error( -20002, '^This identifier already exists^' ) ;
  END emp_insert2;When I use the ON-FORM trigger and ERROR_CODE and ERROR_TEXT variables, I get an FRM-XXXX message saying :
40735--INSERT-PROCEDURE trigger raised unhandled exception ORA-00001.
I want a message like :
ORA-20002 This identifier already exists

Hello,
ORA-20500: ^This identifier already exists^ ORA-06512: à "SCOTT2.EMP_PKG", ligne 48
I cannot figure out what is the problem described by the second part of the message.
why numeric or value error in this case ? ( ligne 48 corresponds to the raise_applicaion_error instruction )There is no problem with the second part it is just for showing the line number it not the numeric or value error the code for numeric or value error is ORA-06502. See the below link for more information
http://www.techonthenet.com/oracle/errors/ora06512.php
So, now you can display your customized message in status bar using the error code which you defined in RAISE_APPLICATION_ERROR like below...
DECLARE
     errcode VARCHAR2(50) := DBMS_ERROR_CODE;
     errtxt VARCHAR2(1000) := DBMS_ERROR_TEXT;
BEGIN
     IF vErrCode='-20500' THEN
        MESSAGE('Here display your customized message.');
     ELSE
        -- Handle the rest errors...
     END IF;
END; -Ammad

Similar Messages

  • How to display a message on status bar while an LOV is active?

    Hi,
    Can any suggest me that how can I display my custom message on the status bar of my form, while an LOV is displayed on the screen.
    I populate an LOV in an Item in the form. I need my status bar to display a message while my LOV is Displayed and also this message to be there on the screen when we moves between the records on the LOV.
    This can be partially achieved by 'message' built-in, but the text message so displayed disappears as soon as u move between the records displayed by the LOV.I want this to be retain there even when we move between records(the data displayed in the LOV) in LOV.
    Can anyone suggest the solution?
    Many thanks in advance.
    Cheers
    Naresh

    hi i am not sure about displaying the information on status bar , what i feel is u can do something like this.
    take one display item which shud be non database item and u can assign the message u want to display to this display item when ever u navigate thro' records.
    i hope this can solve ur problem
    thanks and regards
    chaitali

  • FM to display warning message at status bar

    Hi,
    can any body give me the FM to display the warning message
    at status bar.
    Thanks in advance

    Hi,
    To give a warning message , you dont need any function module. You can use the keyword 'MESSAGE' and give the type as 'W'.
    Do a F1 on the keyword MESSAGE for further details.
    regards,
    Advait

  • Supress message in status bar when using Call Transaction

    Hi,
    I have designed a RF program and I am using a BDC program to call LT11 transaction for confirming TO.
    As this was a Flowrack storage type we will assign Source HU during TO confirmation. So I went for a BDC.
    But after confirmation I am getting a Status message TO XXX confirmed in the status bar which is also displayed in the RF Screen for every line item confirmed. I want to supress this message.
    I am getting this message in the messtab table as well by using Call Transaction. So how can I supress this message in Status bar.
    Please let me know for more information.
    Thanks,
    Manoj.

    >
    kaka79 wrote:
    > I have designed a RF program and I am using a BDC program to call LT11 transaction for confirming TO.
    > But after confirmation I am getting a Status message TO XXX confirmed in the status bar which is also displayed in the RF Screen for every line item confirmed. I want to supress this message.
    > I am getting this message in the messtab table as well by using Call Transaction. So how can I supress this message in Status bar.
    The CTU (CALL TRANSACTION ... USING ...) captures and stores all the messages into the message internal table (... MESSAGES INTO itab ...), but they are not displayed. So, if one of them appears in the status bar, it's because there is an additional MESSAGE ... statement in the program using the CTU. So look at it and add a condition before the MESSAGE statement to not output this exact message (click the message on status bar to get the message number, or debug the program to get it from the message internal table).

  • SAP GUI 7.20 and Animated Messages in Status Bar

    Hello Experts,
    Is there a way to disable "animated" display of messages in status bar when Signature Design is active? Currently messages are scrolled from left to right and then fade in. (Please note that this is a different from "Animated Focus" or "Animation" feature and only unique to Signature Design Theme). It would be nice to disable the animation so messages are immediately displayed without disabling Signature Design. I have asked this question in the past and there was basically no way to accomplish this. Is there any hope that this would be included in future patches for SAP GUI 7.20?
    Thank you!
    Abdul

    Daniel,
    Have you had any luck with this issue?  We recently installed SAP GUI 7.20 patch 2 and are having similar issues.  While working in t-code SWDD, "Workflow Builder", I am automatically logged out of SAP and the LOGON pad also closes out and I forced to sign back in.  This is happening when I drag and drop an event into a step and enter in information that should normally prompt a warning/error message after hitting the "Enter" key.
    Thanks in advance.
    Edited by: Michael Kostek on Oct 7, 2010 9:11 AM

  • Error Message in Status bar

    Hi ,
    i am getting an error message in pop-up box ,can we show this same error message in status bar..?
    Thanks.

    Hi shiva ,
    data : dtype type c value 'S'.
    MESSAGE E053(z4) DISPLAY LIKE dtype.
    my code is like that,but still it shows in popup window.
    can you check it once...?
    Thanks

  • How to display messages in status bar

    Hello,
    Im developing some forms that will be published in EBS 12.1.1
    Im using Oracle Forms Builder v 10.12.0.2.
    Those forms are based on the Template form.
    I have the following problem: Messages are not displayed in the status bar (for example messages about how many records were affected when the user press Save)
    Do you know if I need to set up any property or another task that I need to do in order to see the messages ?
    Thanks in advance,
    Sergio Maestri

    Sergio,
    Even though your form is based on the Apps Template form, double-check to ensure it has all of the triggers it should have, like the Form level Key-Commit. The easiest way to make this comparison would be to open your custom form and then open one of the EBS forms like "ARXCUDCI". If your comparison shows no significant differences you might be dealing with a situation when the message is displaying in the Console (status bar) but something else is clearing the console. Check for any Clear_Message calls.
    Hope this helps.
    Craig...
    If my response or the response of another was helpful, please mark it accordingly

  • How to pass message in Status Bar

    How can I pass message in status bar.
    I typed bellow line but get some error.
    void itemFileOpen_actionPerformed (ActionEvent e) {
    statusBar.setText(" need Help ");
    Error: (456) method setText(java.lang.String) not found in class oracle.dacf.control.swing.StatusBarControl.
    Warning: Deprecated APIs are used. Please recompile with the 'deprecation' option for details.
    null

    Sergio,
    Even though your form is based on the Apps Template form, double-check to ensure it has all of the triggers it should have, like the Form level Key-Commit. The easiest way to make this comparison would be to open your custom form and then open one of the EBS forms like "ARXCUDCI". If your comparison shows no significant differences you might be dealing with a situation when the message is displaying in the Console (status bar) but something else is clearing the console. Check for any Clear_Message calls.
    Hope this helps.
    Craig...
    If my response or the response of another was helpful, please mark it accordingly

  • Regarding message in status bar

    Hai SDN members , i have to display message in status bar , my requirement is like this ,ihave three fields in gui screen 1 is shipment num ,2 is shipment type and 3 is packing ref . and if i give the input in this three fields ,then the shipment number should be displayed in status bar

    hi,
    u want message after pressing some button or enter?
    u need to write this in USER_AOMMAND module of PAI, in when case..
    like
    when 'SAVE'.
    MESSAGE s000(zmsg_fmtr) WITH srn.
    here zmsg_fmtr is my message class
    and this is my 000 message in that mssage class
    Record Saved Successfully with Serial Number &
    in place of & my passing parameter (srn) will come on status
    reward if usefull...

  • ALV Report - Field Overflow message in status Bar

    Hi
    I am trying to display ALV report , ALV report is displaying fine but on execution of report , an message in status bar is coming as "Field copy Number can not be totalled because of field overflow."
    Can anyone tell why such messgae is comming?
    Thanks,
    Debadatta

    Just a wild guess, treat the below as an example.
    Eg:
    assuming one field in the output is of length 2 type i.
    values: 20, 30, 60, 45.
    Totalling the values result as 155. but due to the length of the field as 2. We can encounter the overflow message.
      Considering the above example, manually total the values of your numerical columns and see if any of the column is execeeding the specified length.
    Regards
    Eswar
    Note: Reward if you find the info useful.

  • Link URL containing feed: is not displayed correctly in the status bar

    When a link contains feed: in the URL, it is not displayed correctly in the status bar.
    The actual URL is
    a href="feed:http://www.....com/feed/"
    but the URL shown in the status bar is
    feed://http//www.....com/feed/
    IE8 shows the correct URL in the status bar. Not sure if this is a problem, but thought I would report it.

    Such a feed works for me even if it is displayed differently then you expect on the status bar.
    <pre><nowiki>data:text/html,<a href="feed:https://support.mozilla.com/en-US/questions/758020/feed">feed</a></nowiki></pre>

  • Help frame is not opening to user, but displayed on the windows status bar.

    Hi All,
    In my application help frame is displaying on the windows status bar. But when i click on the icon it is not displayed on the desktop.
    This is not happening again to reproduce it.
    If you have faced this problem anytime, please let me know.
    May be a problem with the windows OS.
    In general, is there any case that, java Frame behaves like this?
    Regards,
    Nar

    Have you currently got private browsing enabled : Settings > Safari > Private Browsing 'on' ?

  • Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc

    Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc.. Please Help!

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

  • Firefox displays "Stopped" in the status bar; stops all the tabs and does not do anything!

    Firefox displays "Stopped" in the status bar after running for a few minutes. It does not do anything on the page unless it is killed by opening the task manager. Sometimes I even have to restart the computer. And if that also doesn't work that shut down using the power button. Others have reported similar issues too.
    == This happened ==
    Every time Firefox opened
    == couple of weeks ago

    See:
    * http://kb.mozillazine.org/Windows_Media_Player#Missing_plugin
    * http://windows.microsoft.com/en-US/windows/downloads/windows-media-player (see Firefox)
    * http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx

  • No Status Bar when Bouncing Audio

    I used to see a status bar when I bounced audio to MP3 or Wave, etc. Now I don't. Anyone know why this may have disapeared?
    Thanks,
    Steve

    It's a bug in Logic 8 - it sometimes occurs on my system and sometimes it doesn't...

Maybe you are looking for