How to show a message in a form 'PL/SQL Button Event Handler'

We need validate the sal of an employee, and if it is bigger the value musts
not be inserted.
We trying a code like the one shown in the note 134312.1 'HOW TO PASS A
PARAMETER FROM A PORTAL FORM TO A STORED PROCEDURE' and it works in the insert event of the insert button (using 'PL/SQL Button Event Handler') and it works, but we need to show a message that says the data wasn't inserted. How can we do this?
The code we used is:
declare
v_deptno scott.emp.deptno%type;
v_empno scott.emp.empno%type;
v_sal scott.emp.sal%type;
mySal scott.emp.sal%type;
v_string varchar2(256);
blk varchar2(10):='DEFAULT';
begin
select sal into mySal from scott.emp where empno=7369;
v_deptno:=p_session.get_value_as_number(p_block_name=>blk,
p_attribute_name=>'A_DEPTNO');
v_empno:=p_session.get_value_as_number(p_block_name=>blk,
p_attribute_name=>'A_EMPNO');
v_sal:=p_session.get_value_as_number(p_block_name=>blk,
p_attribute_name=>'A_SAL');
v_string:='You just inserted empno: '||to_char(v_empno) ||'to deptno ->
'||to_char(v_deptno);
if mySal < v_sal then
doInsert;
else
-- We want to display a message here, when mySal > v_sal
end if;
end;
----------------------------------

I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
Then just reset your flag.

Similar Messages

  • How to get a form field valud in delete PL/SQL Button Event Handler

    Hi Friend,
    I have a form. when user clicks delete button. we want to remove system dodelete function
    and add a delete script
    Under delete-top category,
    how can I get value of form EVENT_NUMBER field in form at delete PL/SQL Button Event Handler?
    DELETE FROM PTEAPP.PTE_EVENTS WHERE eventnumber = EVENT_number
    But when I try to save this form and get message as
    1721/15 PLS-00201: identifier 'EVENT_NUMBER' must be declared
    Thanks for any help!
    newuser

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • How to add a custom PL/SQL code for a button event handler

    Hi All,
    I am a toddler in using Oracle Portal. So please forgive me for my ignorance.
    Q : How do I add a custom PL/SQL code for a button event handler?
    Basically, I would like to write MY PL/SQL function and call it. I could see that we can write "CUSTOM" code as "PL/SQL button event handler" in the form design window. But the question is that it expects only a "call" to procedure. But where do I define the procedure then? If I insert the procedure from the backend, it gets flushed the next time I compile my form.
    Hope I am able to explain my point.
    Thanks in advance,
    Abbas.

    Hi All,
    I am a toddler in using Oracle Portal. So please forgive me for my ignorance.
    Q : How do I add a custom PL/SQL code for a button event handler?
    Basically, I would like to write MY PL/SQL function and call it. I could see that we can write "CUSTOM" code as "PL/SQL button event handler" in the form design window. But the question is that it expects only a "call" to procedure. But where do I define the procedure then? If I insert the procedure from the backend, it gets flushed the next time I compile my form.
    Hope I am able to explain my point.
    Thanks in advance,
    Abbas.

  • How to Show BI report in adf form ?

    How to show bi Report in adf form ?
    (i dont show dashboard in adf form

    Hi,
    check this : http://husaindalal.blogspot.com/2009/11/integrating-bi-publisher-standalone.html
    there are some other helpful links as well:
    http://brendenanstey.blogspot.com/2007/01/adf-faces-and-xml-publisher-success.html
    http://technology.amis.nl/blog/2296/building-a-report-in-xml-publisher
    http://technology.amis.nl/blog/1597/xml-publisher-display-input-parameter-sqllims
    ~Abhijit

  • How to show warning message in am

    How to show warning message in am but not Stop , it still can go ahead.
    Thank you very much.

    jamras ,
    If i got you correct you wanna show user a list fo warnings after that have occured in some method in AM, and show them to user collectively, and the processing of the page should not stop in the above. What you need to do for it, is instead of throwing warning message in AM, collect all warnings in a arraylist or vector. when you navigate back to CO, iterate through this arraylist/vector and for each use pagecontext.putDialogmessage(oaexception).In this way you will be able to show all warning messages on page and your processing will not stop!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to show image in a Transperent form ?? screen shots attached

    Hi
    Help me in making Images appearing as Transperent . Screen shots attached
    I am having a TextInput and a Search Button (The Functionality is that user can enter something in this TextInput and makes a Search Operation by pressing Search Button .)
    At the Initail screen display i need to show Some Image in transperent  Inside this TextInput  , when Mouse is focused on this TextInput , the Image will be completely Invisible .
    Now the question i want to ask is , how to show image in a Transperent form ??
    Please find the screen shots attached with this Thread .

    Thanks for specifying  the alpha property of an Image .

  • How to show error message using java.awt?

    How to show error message using java.awt?
    Which is the class corresponding to the JOptionPane?
    Or I need to use Frame ?

    No, JOptionPane is swing!
    You would have to create your own frame, put your message in it, then show it.

  • Since updating my Iphone 4 I cannot figure out how to delete old messages.  There is no edit button.  Can anyone help?

    Since updating my Iphone 4 I cannot figure out how to delete old messages.  There is no edit button.  Can anyone help?

    By "sending" do you mean sending email?
    If so, what app are you using to take the photos on your iPhone 5? Or are the photos from a different source (saved to your Camera Roll from somewhere else, like a web page or Messages)?
    My guess is that Mail gives you the option to send different file sizes when it detects you are trying to Mail a really large photo file. The size of photos on the iPhone 5 is really big and some email providers may stop your mail from being delivered if attachments are too large. Thus, Mail tries to help you by offering to resize the photo.
    I suspect that if you are sending smaller files, Mail does not bother giving you options to save a smaller version. In fact, I have seen this behavior. So, if the photo is already "small enough", it gets sent as-is.
    To my  knowledge, there is no global iOS setting for this. Some apps may have different rules, of course.

  • How to print password_grace_time message on login form

    hi,
    we are running our application on 6i there we have a login form . we have set profile for a user & we want to show password_grace_time message ( ora-28002 ) on his login form when he try to login in grace time. how can we do this?
    regards

    I would just ask the 3rd party that created the PDF if they could supply unencrypted files. If there is some reason they will not, I am surprised that they have not restricted printing. Normally when Acrobat security is set, you can not print to a new PDF, even if printing is allowed. One option is to provide the ID and password to the other folks who need to review the PDFs. On the surface, there seems to be a license issue with what you are trying to do and you may need to be careful that the company is not at risk. That is why I am suggesting to coordinate with the 3rd party.
    Sorry. I don't have a solution but just the statement of concern.

  • How to show filtered parameter in dropdown form in crm 2013

    Hi,
    I want to create a report in crm 2013. When I report is run then filtered parameter fill record from database in dropdown form and when I select record from dropdown then generate report of selected record. Please tell me how to show record in filtered parameter
    from database within crm. In below image paramter is text field. How to auto fill filtered parameter from database.

    Hi Aamir,
    Check if the below link helps!!
    https://social.microsoft.com/Forums/en-US/ad8a3bc2-dbec-4597-adfd-8bd6c34f5e9a/drop-down-parameter-in-crm-2011-custom-report?forum=crm
    Thanks,
    Prasad
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • How to show error message in a report program

    Hello Guys,
    I am making a report using smartforms. I am successful in showing data  but problem is if if i put a value in parameters that does not exist is database, the smartform runs and related fields shows as empty fields. But the form is running. I want to show error message if the parameter values dose not matches with the database values. The message will show as Document not exists
    So i used related error msg here like
    if sy-subrc ne 0.
              message e357.
               endif.
    But it is not working for passing values to smartform. It works if i use in classical report. Plz help me on this issue.
    Thanks,
    Rosaline.

    >
    Rosaline. wrote:
    > Thanks all for reply.  Should i have to use message before call function 'SSF_FUNCTION_MODULE_NAME' ? I tried it but not working.
    >
    >
    if it_final[] is not initial.
    >*             if sy-subrc ne 0. ---> "Remove this condition check, it not required
    >            Message e000(8i) with 'Parameter value not found'.
    >            endif.
    > *            endif. ---> "remove this
    >
    Hi,
    Sy-subrc doesnt need to be validated here, remove that If condition and check again.
    Regards,
    Karthik D

  • How to show warning message in two Lines.

    Hi,
    Can some one please let me know how to show a warning message in two lines. I have created a Message in EBS in two lines but it still displays on the page in a single line.

    use bundled exception.
    ArryList peerExceptions = new ArrayList();
    peerExceptions.add(new OAException(....));
    peerExceptions.add(new OAException(....));
    OAException.raiseBundledOAException(exceptions);
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to show error message on page #NOTIFICATION_MESSAGE#?

    Hi,
    Is it possible to show error message on a page, where apex substitutes #NOTIFICATION_MESSAGE# at page template, with a javascript call? My requirement is to report error messages which i get from ondemand process, these on-demand processes were called from my javascript code. If any error message is returned by on-demand process, as of now, I'm reporting the error message to user by javascript based alert dialog box, but it would much better if i could keep the error message reporting by my application in a consistent manner. So any suggestion please?
    -Krishna

    Hi Roel,
    Thanks, jumping in for help.
    I tried your given code, i found that the page html source doesnt has any element with a name '#messages'. As per my understanding, its the apex engine which checks for any error, if found it shows it by adding an element id '#messages', but here on my requirement its not the apex engine which has detected the error, its my functional logic which wants to report a message. On a normal and error free page condition, we usually dont find '#message' element. I'm curious on how apex inbuilt engine is reporting an error to a page?

  • How to Show Inline Message in Oracle ADF 11g Release 1.

    Can you please tell me how to show inline error Message on particular field.

    If I understand your requirement correctly you need to show a particular error message showing a red mark around the field like in required case right ?
    You would need to do it programmatically by using the following code -
                    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,"Error on this field", null);
                    facesContext.addMessage(uiComponent.getClientId(facesContext), msg);//where uiComponent is the binding of the component in the bean ,on which the error needs to be shown.

  • How to show the message text for constraint violations

    Hi all,
    In a batch procedure a primary key is violated (ORA-00001). For the primary key, a message is recorded in the TAPI and the message table.
    How to show the enduser a proper message text instead of the ORA-00001.
    We are using Designer 6 with Headstart 2.1.2.
    Thanks in advance,
    Joep

    Joep,
    If you try to insert the record by calling the ins procedure of the Table API, you will see that it will result in an ORA-20998 message, which means that the error message details reside in the CG$ERRORS plsql message table. These messages can be extracted e.g. with the messages.sql script, shipped with headstart.
    If you do not want to rewrite your direct DML (insert into [table name] ...) in the complexer calls to the TAPI services, you might want to user VAPI's for it. In fact, this is one of the major advantages of using VAPI's.
    The CDM guidelines volume, chapter 6 states that:
    <I>The front end no longer needs to trap declarative constraint
    errors (Primary Key, Unique Key, Not Null and Check
    Constraint violations) and replace them with a user-friendly
    error. The View API issues DML statements through the TAPI
    and the TAPI traps all declarative constraint errors, and puts
    user-friendly message on the stack, in the preferred language of
    the user! Fore more information, see the section, Completeness
    of Rule Violations Reported in Front End, in this chapter.</I>
    So the only thing you need to do is generate VAPI's, and trap the ORA-20998 message (qms$errors.qms$exception) in an exception handler, where you retrieve the user friendly messages from the message stack!!
    Regards, Marc

Maybe you are looking for

  • I cannot access the sharefolder in W2008R2 in sub-domain.

    We cannot access the network shareholder in W2008R2 DC of the sub-domain. Our scenario is as follows: The main-domain(AAA.com) has two DCs (W2008R2+W2003R2). The sub-domain(BBB.AAA.com) has two DCs(W2008R2+W2003R2). There is trust relation between AA

  • Ipod gone crazy

    hi there just got a brand new 5 generation ipod and dudes is doing weired things. let me just tell you i already posses an old ipod mini for 2 years and never experienced any problems. anyhow mz ipod is basically not playing any music anzmore!! its w

  • Issues with Seagate in crowded Mac Pro?

    I have a 2009 8-core Nehalem. All four drive bays are occupied. Until recently, the drives were all Western Digital. I upped my system drive to a Seagate ST31500 1.5TB and my Time Machine drive to a Seagate ST32000542 (2TB 5400 RPM), Within a few day

  • Where Can I download my OS for my BB 9800?

    hello, i have a blackberry torch 9800, can u help me please find the most updated and lastest version of  os for my device? i am from philippines, globe telecom is my provider and device is unlock.  can you please give me a link? also i am having pro

  • Nikon D7000 mov file canot play RT with MPE

    Please need help. My nikon D7000 mov file(H.264/MPEG-4 AVC) canot be played RT in MPE. my system specs is i7 2.8ghz, 12GB RAM, Geforce GTX 285, editing mode and presets is DSLR 1080p 23.98 which is same on D7000 file. MPE enabled. When i import the n