Calling a function in WHEN-BUTTON-PRESSED

Hello,
i have in when-button-pressed a line containing
select pachet_salarizare.ani_vechime(data_min, to_number(to_char(sysdate,'YYYY')), to_number(to_char(sysdate,'MM'))) into ani_vechime from dual;so i call a function which is in pachet_salarizare package (package created in program units, in Forms).
when compiling, i get: function 'PACHET_SALARIZARE.ANI_VECHIME' mai not be user in SQL.
how can i deal with this? i need the result of that function in a variabie, ani_vechime.
Thanks!

Uh, thank you. i thought it's not possible what i wanted..
but strange why cannot be called function in select statements
Regards,

Similar Messages

  • How do I execute a 'remote' when-button-pressed trigger?

    I am using Forms 6 in an 8i/10g environment. I have a data block (COMPACT) which is on canvas MAIN. Compact has an item (button) called CREATE_COMPACT, with a when-button-pressed trigger. I also have an error canvas which has a button called RESTART, so they can restart the entire build after an error. The restart code is exactly the same as the create_compact code, and, after the restart, I want the focus to be the main canvas, so I would like to just have the restart when-button-pressed trigger shift focus to the CREATE_COMPACT trigger and execute it. I have tried:
    go_item( 'Compact.Create_Compact' );
    do_key( 'Enter' );
    This switched me to CREATE_COMPACT but did not execute the trigger. I then tried:
    execute_trigger( 'Compact.Create_Compact' );
    and then:
    execute_trigger( 'Create_Compact' );
    but neither of these work. I get error FRM-40700 no such trigger. Is there any way to do this short of copying code or creating a pl/sql procedure?
    thanks

    do_key('ENTER') will execute the code in a KEY-ENTER trigger so I suggest you move your code into the KEY-ENTER trigger. On your when-button-pressed trigger you should also use do_key('ENTER');

  • Calling a report from forms - FRM-40735 when-button-pressed raised unhandle

    Hi,
    I created a form to generate a pdf report.
    its not going too well, so i need some help.
    my form only has one button , when pressed I want it to generate a report in pdf format.
    i created a when-button-pressed trigger and the following code is below:
    I also create a web service proxy jar file,
    the jar file is in the FORMS_BUILDER_CLASSPATH, and the jar file is imported from forms builder without any issues.
    As of now I am hard coding everything in the code below to see if it works.
    The error I am getting  FRM-40735 when-button-pressed raised unhandled exception ORA-105100 i dont know why ?
    This error is occurring at this line of code, please help, this is my first time doing something like this.
    obj := publicreportserviceclient.new(); DECLARE
    param_name varchar2(200);
    un varchar2(200);
    pw varchar2(200);
    out_file varchar2(200);
    obj ORA_JAVA.JOBJECT;
    BEGIN
    obj := publicreportserviceclient.new();
    param_name := 'EMP';
    un := 'Administrator';
    pw := 'Oracle123';
    out_file := 'D:\DevSuiteHome_1\j2ee\home\default-web-app'||'output';
    publicreportserviceclient.callRunReport(obj,'/~administrator/Learn/Test1/Test1.xdo','EMP','141414',un,
    pw,'pdf','New_Template',out_file);
    web.show_document('http://jmenge-de.de.oracle.com:8889/j2ee/' || 'output');
    exception
      --check for ORA-105101
      when ORA_JAVA.EXCEPTION_THROWN then
         message('Java Exception : '
          || Exception_.toString(ORA_JAVA.LAST_EXCEPTION));
          ORA_JAVA.CLEAR_EXCEPTION;
          return;
      --check for ORA-105100
      when ORA_JAVA.JAVA_ERROR then
                   message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
              return;
    END;This is my java function
        public void callRunReport (String reportPath, String paramName, String  paramValue, String
        username, String password, String format, String template, String outFile) {
        try {
                bip_webservice.proxy.PublicReportServiceClient myPort = new bip_webservice.proxy.PublicReportServiceClient();
                // Calling runReport
                ReportRequest repRequest = new ReportRequest();
                repRequest.setReportAbsolutePath(reportPath);
                repRequest.setAttributeTemplate(template);
                repRequest.setAttributeFormat(format);
                repRequest.setAttributeLocale("en-US");
                repRequest.setSizeOfDataChunkDownload(-1);
               ParamNameValue[] paramNameValue = new ParamNameValue[1];
                paramNameValue[0] = new ParamNameValue();
                paramNameValue[0].setName(paramName);
                String[] values = new String[1];
                values[0] = paramValue;
                paramNameValue[0].setValues(values);
                repRequest.setParameterNameValues(paramNameValue);
                ReportResponse repResponse = new ReportResponse();
                repResponse = myPort.runReport(repRequest,username,password);
                byte[] baReport = repResponse.getReportBytes();
                FileOutputStream fio = new FileOutputStream(outFile);
                fio.write(baReport);
                fio.close();
            } catch (Exception ex) {
                        ex.printStackTrace();
        }Thanks - please help

    If there is a way to make it work with Bi publisher, Please let me know.
    I need to something to make it work with BI publisher.
    thanks,
    Edited by: Rooney on May 27, 2010 1:27 PM

  • How can I call my chart in Forms6i on When Button Press Trigger?

    Hi Friends,
    I have make a chart in Graphic Builder 6i and save on path C:\graph\test.ogd
    Now I want to run this Chart from Form6i on When Button Press trigger.
    I have call my report in forms using this command on When Button Press trigger.
    Run_Product(reports,'C:\Cheema\Qdir_store\reports\pmms\sec_backlog',asynchronous,runtime,filesystem,TO_CHAR(NULL));
    So tell me How can I call my chart in Forms6i?
    Please reply me on urgent.
    Thanks,
    Shahzad

    Just to recall after a long break of couple of years..... Pls check out if not wrong.
    First of all you need to embeed the chart object on your layout window and make it visible = FALSE. This is a design time work. In the button press event, show the chart object by setting the visible property = TRUE.
    Note, i could not paste u the sample code as i don't have forms installation on my PC. The above states is a logic you can apply.

  • Error -- No Such Trigger('when-button-pressed')

    Hi,
    I am getting the error ""No Such Trigger('when-button-pressed')"",
    when I am executing the code EXECUTE_TRIGGER( 'WHEN-BUTTON-PRESSED' );
    on some item(Key-Next-Item), although WHEN-BUTTON-PRESSED trigger exists.
    What could be the problem ?. It worked till yesterday, giving error from today, I havent
    changed any thing.
    Thanks in Advance
    Devender

    Steve's tip is the only good solution for this case.
    The problem in your case for example is:
    Let's say you have a block-trigger, which fires after your execute-trigger.
    Now a colleague of you, which don't know your code, create a WHEN-BUTTON-PRESSED on an item, then the new code is started and not the block-trigger-code.
    So, don't ever do this. Write your code in a package-function or -procedure and call it from the trigger. So you can re-user the functionality
    Gerd

  • FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06503

    Hello to all...
    I am developing a form on form 6i like a registration form....
    Suppose emp_name is a text item....
    I need to validate that item such that number ,null and special characters should not be allowed.
    I have created a function to check those validations
    function v_check(p_item_name varchar2)
    return boolean is
    begin
         for i in 1..length(p_item_name)
         loop
              if substr(p_item_name,i,'1') in ('1','2','3','$','%','@','!','#') then
                   return false;
              end if;
         end loop;
    end v_check;
    When i click on save_Record button it commit the form i'm checking the emp_name field with this validation by calling the above function.
    for save_Record button i have written this code WHEN-BUTTON-PRESSED trigger
    declare
         a number;
    begin
         if :iptable.ip_name is null or (not v_check(:iptable.ip_name)) then
              set_alert_property('alert',title,'name validation');
              set_alert_property('alert',alert_message_text,'null ans spl char are not allowed');
              a:=show_alert('alert');
              go_item('iptable.ip_name');
              raise form_trigger_failure;
         end if;
         if :system.form_status='CHANGED' then
              set_alert_property('alert',title,'Save Box');
              set_alert_property('alert',alert_message_text,'Do u want to save');
              a:=show_alert('alert');
              if a=alert_button1 then
                   commit_form;
              else
                   raise form_trigger_failure;
              end if;
         else
              set_alert_property('alert',title,'Save Box');
              set_alert_property('alert',alert_message_text,'noting to Save Box');     
              raise form_trigger_failure;
         end if;
    end;
    But i'm gettin this
    FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06503
    exception
    How can i resolve this error...help me
    thanks...
    Edited by: maddyd2k on Nov 25, 2010 10:37 AM

    Hi,
    Your function v_check actually can return a NULL value wich is not TRUE neither FALSE.
    Modify your function like this :
    function v_check(p_item_name varchar2)
    return boolean is
    l_return boolean := true;
    begin
    for i in 1..length(p_item_name)
    loop
    if substr(p_item_name,i,'1') in ('1','2','3','$','%','@','!','#') then
    l_return := false;
    end if;
    end loop;
    return l_return;
    end v_check;

  • Requerying in WHEN-BUTTON-PRESSED

    Hi,
    I have two forms. I have a button that opens up modal form 2 from form 1 and passes some parameters. I allow the user to update something in form 2 (which has an effect on form 1). When user exits form 2, I want to requery the block in form 1 so that any updates effected in form 2 can be visible.
    I tried putting in a do_key('execute_query') in the WHEN-BUTTON-PRESSED trigger in form 1 after the call to open form 2. This had no effect (probably because it didn't get called when I expected it to). The only way I am able to get the new data (after an update in form 2) is to manually issue a requery in form 1.
    Any suggestions would be deeply appreciated!
    Thanks,
    Niranjan

    Hi Niranjan
    Put the Execute_query in the when-new-form-instance of the Called form.
    With Regards
    Harish
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Niranjan Ramakrishnan:
    Hi,
    I have two forms. I have a button that opens up modal form 2 from form 1 and passes some parameters. I allow the user to update something in form 2 (which has an effect on form 1). When user exits form 2, I want to requery the block in form 1 so that any updates effected in form 2 can be visible.
    I tried putting in a do_key('execute_query') in the WHEN-BUTTON-PRESSED trigger in form 1 after the call to open form 2. This had no effect (probably because it didn't get called when I expected it to). The only way I am able to get the new data (after an update in form 2) is to manually issue a requery in form 1.
    Any suggestions would be deeply appreciated!
    Thanks,
    Niranjan<HR></BLOCKQUOTE>
    null

  • Ticker bean and WHEN-BUTTON-PRESSED trigger

    Hi,
    In Forms 6i, I use the Ticker bean. The problem with it, is that it appears on all canevas of my form.
    But if the bean is "stopped" (i.e. the clock is stopped), it works fine and it does not appear on the next canevas I show.
    However, I must have a button for the "stop" and another one that shows my next canevas. If I put the two code lines in the same WHEN-BUTTON-PRESSED trigger of a unique button, the ticker bean is still visible in the new canevas.
    Any help is appreciated.
    Regards,
    Olivier.

    Olivier,
    I think I remember having heard of this before. The reason for this could be that the ticker bean uses AWT classes, which are heavyweight. All you can try is to call
    synchronize;
    between starting and stopping the ticker if using one button only. If this doesn't help, then I don't know of any other solution that could work.
    Frank

  • Frm-40735 when-button-pressed trigger raised unhandled  exception ora-03114

    hi everybody,
    i am using oracle 10g release 2 in my test server and 10g release 1 in production server with forms in 10g running through the oracle 10g application server with no problem with our production server.
    but the same form when i try to use through the same application server for my
    with my test database server which is oracle 10g release 2 is giving me
    frm exceptions and disconnecting the session.
    like i get frm-40735 when-button-pressed trigger raised unhandled exception
    ora-03114. then frm-40655 sql error forced rollback;clear form and reenter transaction. then when i try to exit it shows ora-24324 service handle not initialized.
    The same thing when i try with my production server i dont get any exception handle error or forced rollback error.
    i am not facing any problem as such to connect to my test database(release 2)
    through sql plus client or TOAD OR ENTERPRISE MANAGER THEY ARE ALL FINE. IT IS ONLY WHEN I GO THROUGH THE APPLICATION SERVER TO ACCESS MY FORMS I GET THIS ERROR. BUT MY PRODUCTION IS RUNNING THE SAME WAY WITH NO ERRORS.
    any suggestions welcome as i have to bring release 2 in the production next month
    thanks and regards
    manish

    ORA-03114 not connected to ORACLE
    Cause: A call to Oracle was attempted when no connection was established. Usually this happens because a user-written program has not logged on. It may happen if communication trouble causes a disconnection. In addition, this message could occur when ALTER SYSTEM KILL SESSION or ALTER SYSTEM DISCONNECT SESSION were issued with the IMMEDIATE qualifier because, in those cases, the client's connection to the database is terminated without waiting for the client to issue a request.
    Action: Try again. If the message recurs and the program is user written, check the program.
    zaibi.

  • FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-106561

    I m working on Fusion Middleware forms 11g with windows plateform. I want to launch an exe (like notepad.exe) from my form on button click, which i m doing using the webutil dde.app_begin. My form is deployed on server, and i want to launch this application from client. The server is on linux. Now when i press the button it gives me error "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-106561". Here is my code:
    DECLARE
    AppID    PLS_INTEGER;
    BEGIN
    AppID := DDE.App_Begin('notepad.exe',DDE.App_Mode_Normal);
    END;
    Any help will be highly appreciable. Also, please tell me for any possibility, if i can call this exe from server, which is on linux.
    Regards,
    Sharjeel

    Any one there pls help me in this. I seen all the forums and threads, for this, but could'nt find any solutions.
    Any help will be highly appreciable.
    Regards,
    Sharjeel

  • FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502

    Hi,
    I am trying to run a form in which I have a button which when pressed should display another popup window with few text fields in it. I have a WHEN-BUTTON-PRESSED trigger on that particular button and its raising an exception called
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502.
    When I debug the form with breakpoints its displaying the popup window correctly, but if I run it in a browser as soon as click the button it raises the Unhandled exception given above.
    Can anyone help with this? Urgent please....
    Thanks

    It is VERY good to handle your exceptions, specially a certain pre-defined exceptions like NO_DATA_FOUND, TOO_MANY_ROWS, ZERO_DIVIDE etc...
    You can also find samples on how to create user-defined exceptions, just search the online forms help (press the question mark in forms builder) for "User-Defined"
    But however you handle your exception never ever do
    WHEN OTHERS THEN NULL;If you do that you are telling to forms that no matter what kind of error is thrown do nothing, now that's very dangerous.
    You might also want to check Oracle's documentation on [url http://www.oracle.com/pls/db102/portal.portal_db?selected=5]Application Development and do a search on "Exception Handling"
    Regards,
    Tony
    Message was edited by:
    Tony Garabedian

  • FRM-40735: when-button-pressed trigger raised unhandled exception ORA-06508

    Hi,
    I built a report using Reports Builder, and a form that calls this report. When I try to run the rdf file (report), using [b]rp2rro.rp2rro_run_product I get the error:
    FRM-40735: when-button-pressed trigger raised unhandled exception ORA-06508.
    How fix it?
    []'s
    Sandro

    Hi Mark,
    The debbuger stopped at line that was causing the error (rp2rro.rp2rro_run_product(REPORTS, 'myReport', SYNCHRONOUS, RUNTIME, FILESYSTEM,v_paramList , NULL);
    The data type passed in arguments and its lenght that's ok... I don't know what I should do...
    Sandro

  • FRM-40735: WHEN-BUTTON-PRESSED raised unhandled exception INVALID_NUMBER

    Hi I get the FRM-40735: WHEN-BUTTON-PRESSED raised unhandled exception INVALID_NUMBER error message for block that has duplicate records.
    It works where the block returns no duplicate records.
    I'm guessing the error occurs because more than one duplicate records exists. How can I handle this?
    Below is the function that I'm using to check for duplicate values:
    FUNCTION find_dup (card_in IN varchar2)
    RETURN BOOLEAN IS
    get_card number;
    BEGIN
    select card_no into get_card from strike.member where
    prop_no = :member.prop_no
    and card_no in (select card_no from strike.member
    where prop_no = :member.prop_no
    having count(*) >1 group by card_no);
    RETURN TRUE;
    end if;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    RETURN FALSE;
    END;
    Below is the trigger used where a check is made for duplicate records before proceeding.
    WHEN-BUTTON-PRESSED trigger has below:
    if find_dup(:member.card_no) then -- guessing it finds more than one card_no value. Help how can I handle this?
    go_block('dup_member');
    execute_query;
    :global.dup_delete := 'Y';
    go_item('dup_member.prop_no');
    else
    message(' No Duplicate Records To View!');
    bell;
    go_block('member');
    hide_view('dup_canvas');
    raise form_trigger_failure;
    end if;
    Edited by: user648524 on Oct 27, 2008 1:33 PM

    It looks to me like strike.member.card_no may not actually be a number, and you are trying to select it into get_card.
    Try changing your get_card definition to:
    get_card    strike.member.card_no%type;

  • GO-ITEM  - WHEN-BUTTON-PRESSED - SQLAP-10048 - You have not selected a record.

    Hi,
    I need to use go-item -> execute-trigger(when-button-pressed) personalization in oracle EBS Payables module. However i face certain problem.
    When i do 'go-item' to particular 'button', row selection disappear(its a multi row block). In the result i receive an error - 10048 - you have not selected a record.
    Manually you just click a button with row selected, and everything goes fine. There must be some kind of a context parameter which is passed from a block/record/row to a button. However how to achieve this through personalization?
    Many thanks for every help.
    Best regards,
    Martin

    write a procedure in forms that disables all your items in that record and call this on When-New-Record-Instance and When-Button-Pressed.
    PROCEDURE disable_item IS
    BEGIN
    IF :<block>.indicator = 'X'
    THEN
    SET_ITEM_INSTANCE_PROPERTY('<block>.<item>, CURRENT_RECORD, INSERT_ALLOWED, PROPERTY_FALSE);
    SET_ITEM_INSTANCE_PROPERTY('<block>.<item>, CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_FALSE);
    .. (repeate this t2o Statemnts for every item,
    more elegantliy you may write a loop using built-in NEXT_ITEM to get all items and set insert and update off) ...
    END IF;
    END;
    On When-Button-Pressed set the value of :block.indicator to 'X' before calling the disable_item procedure.
    Attemtion: This solution assumes that the button is part of your MR block (cited bove as <block>).
    ... and code is just written down, not tested.

  • How can I open the windows file directory in "WHEN-BUTTON-PRESSED" trigger

    Dear All,
    How can I open the windows file directory in “WHEN-BUTTON-PRESSED” trigger?

    Blessan Joseph,
    The solution is dependent on your Forms version and if your applications is traditional Client/Server (CS) (Forms 6i and lower) or web deployed (Forms 6i and higher). For CS, you would use the Get_File_Name() built-in as Faa demonstrated. For Web, you will need to use the WebUtil library function Client_Get_File_Name() as Sarah (OGIR) demonstrated. Both of these functions will return the full path to a file. Note: WebUtil is an external library so it requires you to perform some configuration on your developer client as well as on the Application Server. WebUtil is included with Forms 9i and higher, but you must download it for Forms 6i.
    My requirement is user should able to select windows directory for the output.Do you really need to allow the user to write to a file in the Windows directory? This is very dangerous and you should not allow users or programs to write to the Windows directory. Users should only be able to write files to "User" directories (\My Documents\<Directory name>).
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • Sudden strange LR3 behavior

    Greetings - I've suddenly started having odd things happening when importing in LR 3.4.1. This started after updating to OS 10.6.7, and had been getting wierder after updating to 10.6.8. Ran the usual permission repairs before and after each update(c

  • Pages 2 page brochure order template

    I'm trying to create a wedding program and am unable to find a template which allows me to print the pages in order where I to fold the pages into a book to be stapled down the center. Will I have to make a 2 column brochure and type the pages as I n

  • Column filter on transparent table

    Hi Experts, I have a table (not ALV) and I need column filters on each column of the table. Following are the steps I have followed: 1. Defined 'TABLE' attribute type ref to IF_WD_TABLE_METHOD_HNDL. 2. Created a Tool Bar element on Table with its Vis

  • Trying to convert this sql into a crystal report

    Post Author: ru4real CA Forum: General I have this statement provided to extract via sql but i cannot emulate this in crystal.  can anybody help?  here is the run down.  essentially iam trying to list records in one table auanmast which is not presen

  • IPhoto Library in iCloud

    I have almost 12,000 photos in my iPhoto library. Is it possible and practical to have my library in iCloud. I do have a backup copy on an external HD. But I am going to have to move the library off of my iMac because iPhoto is getting very beachball