KEY-ENTQRY raised unhandled Exception

Hi,
In master details form, I try to filter record through pre-query and the condition is as follows
v_sql_string := '( select K.CLIENT_ID, K.VISIT_ID,K.SERVICE_CD, k.Visit_Dt, k.Visit_type,k.Consultant,k.service_descr '||
               ' from ( select m.*, row_number() over(partition by m.Visit_Dt '||
               ' order by m.Visit_Dt) rn from clans_visit_summary_V m where client_id = ' || v_client_id ||
                    ' ) k ';
v_def_where := 'where k.rn = 1 '||') ';
Actual query is
select client_id,Visit_Dt, Visit_type,Consultant,service_descr
from
( select m.*, row_number() over(partition by m.Visit_Dt order by m.Visit_Dt) rn
from clans_visit_summary_V m where client_id = 21503
) k
where k.rn = 1 order by visit_Dt ;
The query is working fine for the first time.. But, If i would like to query again, oracle returned the error as follows
FRM-40735 KEY-ENTQRY Trigger raised unhandled exception ORA-06502.
Will you give your suggesion to fix it.
Regards,
Murali

Murali,
Can you take your query in the Pre-Query trigger and run it in SQL*Plus? Looking at your code, it looks like the cause of the 6502 error is your ONETIME_WHERE.
v_sql_string := '( select K.CLIENT_ID, K.VISIT_ID, K.SERVICE_CD, '
              ||'         k.Visit_Dt, k.Visit_type,k.Consultant,k.service_descr '
              ||'   from ( select m.*, row_number() over(partition by m.Visit_Dt '
              ||'           order by m.Visit_Dt) rn '
              ||'           from clans_visit_summary_V m where client_id = ' || v_client_id
              ||' ) k ';
v_def_where := 'where k.rn = 1 '||') ';
Set_block_property(v_trigger_block,QUERY_DATA_SOURCE_NAME, v_sql_string);
Set_block_property(v_trigger_block, ONETIME_WHERE, v_def_where);You change the WHERE clause of the block to k.rn = 1, but referencing "*k.rn*" doesn't look like valid SQL to me because you are selecting multiple values from your RN Alias (in-line view) therefore, I don't see how you could compare k.rn to the value of 1.
Also, what version of Oracle Forms are you using? You may be running into a limitation of Forms where it does not support the Analytical Functions you have in your query. From what I could quickly find, Analytical Functions are only supported in Forms 10.1.2 or higher and the Database must be 10.1 or higher. If this is the case, perhaps you could create a view on the database and base your block on the view.
Hope this helps.
Craig...
If my response or the response of another was helpful, please mark it accordingly

Similar Messages

  • FRM-40735:KEY-COMMIT  ORA-02291 trigger raised unhandled exception

    FRM-40735:KEY-COMMIT ORA-02291 trigger raised unhandled exception. when i tried to save records.
    I am using multi record block , 12 records will display at a time, i am trying to save 1st and 5th record which i changed.
    calling a procedure in key-commit trigger
    PROCEDURE desig_updation IS
    V_count number := get_block_property('employee_master',query_hits);
    BEGIN
    go_block('employee_master');
    first_record;
    for i in 1.. V_count loop
         if((:desig is not null ) and (:new_date is not null) and (:emp_desig<>:desig) and (:new_date >=:emp_desig_date)) then
              :emp_desig :=:desig;
              :emp_grade:=:grade;
              :emp_desig_date:=:new_date;
              :emp_upd_by:=:global.usr;
              :emp_upd_on:=:system.current_datetime;
              if( (:radio_group=2) and (:incr_amt is not null)) then
                   increment_process;
                   end if;
         end if;
         if :system.last_record ='TRUE' then exit;
         else next_record;
         end if;     
    end loop;
    END;
    PROCEDURE commit_action IS
    BEGIN
    desig_updation;
    commit_form;
    IF FORM_SUCCESS THEN
    CLEAR_FORM(NO_VALIDATE);
    EXECUTE_TRIGGER('PRE-FORM');
    END IF;     
    END;
    key-commit-trigger
    commit_action;
    commit_form;
    IF FORM_SUCCESS THEN
    CLEAR_FORM(NO_VALIDATE);
    EXECUTE_TRIGGER('PRE-FORM');
    END IF;
    PROCEDURE increment_process IS
    m_gross_sal number;
    p_rslt varchar2(200);
    p_status varchar2(20);
    BEGIN
    delete from INCR_TEMP where ECODE = :emp_code ;
    m_gross_sal := aod_gross_salary(:emp_orgn,:emp_code,'A');--find current salary
    insert into INCR_TEMP(ECODE , CURR_SAL ,
    INCREMENT_AMT ,TOTAL_AOD,
    STATUS,INCR_TYPE)
    values(:emp_code,m_gross_sal,
    :incr_amt,m_gross_sal+:incr_amt,
    'N','I');
    forms_ddl('commit');
    update_emp_increment(:emp_orgn,:emp_code,
    TRUNC(to_date(to_char(:new_Date,'DD/MM/YYYY'),'DD/MM/YYYY')),null,
    :incr_amt, p_rslt,
    :parameter.p_user,to_date(to_char(SYSDATE,'DD/MM/YYYY'),'DD/MM/YYYY'),'I',
    p_status);
    END;
    thanks,
    rinz

    It seems you are insert some data in child table. For which parent data does not exist. In simple primary key values does not exist while you are trying to insert in foreign key values. check this link.
    http://www.lmgtfy.com/?q=ORA-02291
    -Ammad

  • FRM-40735: When-Validate-Item trigger raised unhandled exception ORA-01861

    Dear all, I runned a form designed by Developer 2000 version 4.5 and encountered a puzzling problem. The same program could be runned on one computer but not in another one. The error message is as below: FRM-40735: When-Validate-Item trigger raised unhandled exception ORA-01861. The OS of both computers are windows 2000 professional. The only difference between two computers is the patch files didn't installed on one of them. I don't know if it is the key point. Could you tell me why?
    Thank you!!!

    I sure wish people would post the entire text of the error message. "ORA-01861: literal does not match format string."
    What kind of field are you trying to validate? This message is usually due to a date format error. If you are trying to convert text into a date without using TO_DATE('some text','date-format'), then that is the problem. It sounds like you are, and the database default date format is different between the two systems.

  • In R12.1.3 we get FRM-40735: ON-ERROR trigger raised unhandled exception.

    Hello,
    after we upgrade to R12.1.3 users are getting FRM-40735: ON-ERROR trigger raised unhandled exception ORA-01001, can you please help to resolve this issue immediately.

    Can you provide the list of patches you have applied?
    In addition to the log files mentioned above, please confirm that you have no invalid objects in the database.
    Loading the System Administrator Forms Responibility Produces Error FRM-40735,ORA-06508 (Doc ID 271652.1)
    Oracle Application Return The following Error FRM-40735: ON-ERROR trigger raised unhandled exception ORA-6508 (Doc ID 797293.1)
    After Migrating To Linux, Users Are Seeing FRM-40735 When Trying To Access Forms. (Doc ID 1282488.1)
    Thanks,
    Hussein

  • FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403

    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    I am getting the above error when i am trying to change the Assignment Category field of
    an employee from Junior Staff to Senior Staff.
    Navigation People> Enter & Maintain> (B)Assignment.
    Kindly assist me to resolve this error.
    Plz note there is a promotion that is suppose to be given to some employees in our company as of
    01-APR-2010 so i had to open the closed payroll periods and do the changes. I managed to change for all
    the 9 employees but 1 employee's assignment is giving me an error as follows :
    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    The error displays after i try to save the changes made to the Assignment Category from Junior Staff to Senior Staff.
    NB: i have also tried to switch off the custom code...but its giving me same error.
    Also the element links have been defined for employment category on the links window.
    please help!!
    Edited by: 594647 on Jul 20, 2010 10:26 PM

    Release 12.1.1.
    OS is Red Hat Ent Ed 4
    i am trying to change the employee assignment category from Junior to Senior. so when i am updating the assignment details on the assignment screen (Navigation is People >Enter & Maintain> Assignment) and trying to save, the system gives error on the status bar of the application as follows:
    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    NB: Error is appearing on the Assignment screen.
    Please help!!
    Edited by: 594647 on Jul 21, 2010 2:48 PM

  • When-new-form-Instance trigger raised unhandled exception ORA-04062

    Hi,
    We are facing ORA-04062 (FRM-40735 WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA 04062) while trying to run the first form of our Application.
    We are using a PL/SQL LIBRARY(.pll) for forms.
    We are using 10G Application Server,10G DB and Oracle 9i Forms.
    DB Version----10.1.0.4.0
    Application Server--9.0.4.0
    During compilation, we are following the below steps:
    1. Compile the .pll
    2.Compile Forms.
    When we are running these compiled version of forms and pll in Development server where we are compiling it,we are not facing any error.
    But when we are taking these compiled version of forms and pll to the Production Server,we are getting the above error.
    When we are compiling the .pll in Production server, Application runs fine.
    But we should not compile form or pll in Production server.
    Searching in Metalink(Note:73506.1) , we find a solution that remote_dependency_mode if set to signature this problem may be resolved.
    We tried that by chaning ' REMOTE_DEPENDENCIES_MODE=SIGNATURE' in Init.ora file in both Production and Development server.
    But the error still persist.
    I think the problem is regarding .pll.Because for the time being to test the application,I compiled the pll in Production and we didnot get any error while running the Application.
    But whenever we are tring to deploy the compiled version of pll (compiling in Development sever) and to run the application in Production, we are facing the error.
    Also, pll calls one standard database package in SYS.That standard package has VALID status both in Production and in Development.
    We donot have priviledge to change/compile that package.So,we didnot change anything in that package. We didnot change anything in .pll also.
    We are upgrading our forms from 6i to 9i.And now when we are trying to deploy it to Production we are facing ORA-04062 error.
    Can anyone please help ?

    Exactly what procedure or package in SYS are you calling that causes this problem?
    <p>Are both test and production databases at the same version?
    <p>Do you know what procedure or package is named in the error? If not, then you need to improve your on-error trigger processing. I use a PLL_On_Error trigger to capture and improve a number of Oracle messages. It is posted here:
    <p> Re: FRM-40735:Pre_Insert trigger raised unhandled exception ORA-20011
    <p>Note especially the part near the end that deals with FRM-40735. (Not sure, but you may also want to display DBMS_ERROR_TEXT in your situation.)
    <p>If that doesn't help find the actual problem, I would pull out my Re: Zdebug -- Download a Forms debugging message tool, and add messages before every call in the when-new-form-instance process to zero-in on the offending call.
    <p>If it really IS a call to a system process, I would then experiment with creating a server-side package or stored procedure that calls the process, and then call that stored procedure from my form. That way, you effectively insulate your form from system differences.

  • FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-

    Hi,
    In R12 When trying to search existing users through Sysadmin or any other user ...we are getting the below errror...
    ORA-01403: no data found
    FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-06510
    This error is not happening when we search for the SYSADMIN user....
    Any idea why this error happening...
    Also another error which is faced by users other than SYSADMIN is the below one when changing the responsability...
    APP-FND-01926---The custom event WHEN-RESPONSIBILITY-CHANGED raised unhandled exception:User Defined Exception
    Thanks
    Joseph
    Edited by: 783717 on Sep 27, 2010 10:49 PM

    Hi,
    In R12 When trying to search existing users through Sysadmin or any other user ...we are getting the below errror...
    ORA-01403: no data found
    FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-06510
    This error is not happening when we search for the SYSADMIN user....
    Any idea why this error happening...What changes have been done recently?
    Please run AutoConfig and make sure it completes successfully.
    Also another error which is faced by users other than SYSADMIN is the below one when changing the responsability...
    APP-FND-01926---The custom event WHEN-RESPONSIBILITY-CHANGED raised unhandled exception:User Defined ExceptionCan you find any errors in the database log file?
    Please compile CUSTOM.pll (and other files) as per these docs and try again (as you are on R12 use frmcmp_batch.sh instead of f60gen).
    APP-FND-01926, ORA-06508 [ID 797242.1]
    APP-FND-01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception: ORA-06508: PL/SQL: [ID 831159.1]
    APP-FND-01926 when logon changed ORA-06508 [ID 334295.1]
    Thanks,
    Hussein

  • FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception

    I have a form that I migrated to 10g from 6i. I have no problems with it in 6i.
    When I launch this migrated form on the web in 10g, I get the following error:
    Error: FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-03127From oracle error code
    03127, 00000, "no new operations allowed until the active operation ends"
    // *Cause: An attempt was made to execute a new operation before the active
    //         non-blocking operation completed or a new operation was attempted
    //         before all the pieces of a column were inserted or fetched.
    // *Action: Execute the new operation after the non-blocking operation
    //          completes. If piecewise binds/defines were done, execute the new
    //          operation after all the pieces have been inserted or fetched.What does the above suggested action mean?
    Any suggestions.
    Thanks

    Run the debugger and see what line of code is failing.

  • FRM-40735 WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-065

    Please help....This error is comming when opening the form. The form is running on oracle 11g 64bits web logic.
    "FRM-40735 WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-065"

    Welcome to OTN
    Before posting on this forum please read
    FRM-40735: WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06502.
    you'll get some hint here
    Oracle/PLSQL: ORA-06502 Error

  • Post-form trigger raised unhandled exception

    I have enabled TRANSLATION and ATTACHMENTS menu on my oracle form(form customization).
    but if i click on attachment menu the window opens for attachments but when i am going to close a window it throws an exception as
    **FRM-40735: POST_FORM trigger raised unhandled exception ORA-06502**
    and it is not allowing to close an window i have to terminate application every time.
    what shall i do in this situation ????????

    Hello,
    There is a related known issue for the Qualifications form of Oracle Human Resources -
    PERWSQUA Cannot add Attachments to the Qualification Form - FRM-40735: POST-FORM trigger raised unhandled exception ORA-06502 (Doc ID 1470386.1)
    Reference the solution steps and search on your form name as opposed to the PERWSQUA.
    If still not resolved, please open an SR with the owning application of the form or for Forms Developer.
    Thank you,
    Deborah Bourgeois
    Oracle Customer Support

  • Re: FRM-40735: WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception OR

    hi all
    i am facing a problem.i hav a master detail form. my 'select into' has to fectch more than one record in detail which is tabular.
    it giving error(FRM-40735:WHEN-MOUSE-CLICK TRIGGER raised unhandled exception ORA-01422).
    so i had written cursor to fetch records.
    DECLARE
    CURSOR Fetch_Rec IS
    select bill_id,mat_id,mat_code,send_qty,rec_qty,ast_no,serial_no,transact_note
    from ship_dtl;
    BEGIN
         GO_BLOCK('ship_dtl');
    FOR Get_Rec IN (select bill_id,mat_id,mat_code,send_qty,rec_qty,ast_no,serial_no,transact_note
    from ship_dtl where rec_qty=null AND rec_qty != send_qty AND BILL_ID=:SHIP_MSTR.BILL_ID) LOOP
    :ship_dtl.bill_id:=get_rec.bill_id;
    :ship_dtl.mat_id:=get_rec.mat_id;
    :ship_dtl.mat_code:=get_rec.mat_code;
    :ship_dtl.send_qty:=get_rec.send_qty;
    :ship_dtl.rec_qty:=get_rec.rec_qty;
    :ship_dtl.ast_no:=get_rec.ast_no;
    :ship_dtl.serial_no:=get_rec.serial_no;
    :ship_dtl.transact_note:=get_rec.transact_note;
    NEXT_RECORD;
    END LOOP;
    FIRST_RECORD;
    END;
    it is not retriving any records.please help.i also put ship_mstr.bill_id in properties of ship_dtl.bill_id(copy value)
    so please guide me how to handle it.
    thanks in advance

    911229 wrote:
    hi all
    i am facing a problem.i hav a master detail form. my 'select into' has to fectch more than one record in detail which is tabular.
    it giving error(FRM-40735:WHEN-MOUSE-CLICK TRIGGER raised unhandled exception ORA-01422).
    so i had written cursor to fetch records.where you use the cursor ?
    it is not retriving any records.please help.i also put ship_mstr.bill_id in properties of ship_dtl.bill_id(copy value)Which one is not retrieving any record ? first one or second one... and
    check the sql separately first..
    select bill_id,mat_id,mat_code,send_qty,rec_qty,ast_no,serial_no,transact_note
    from ship_dtl
    where rec_qty is null
    AND rec_qty != send_qty
    AND BILL_ID=:SHIP_MSTR.BILL_ID  ---How you pass the value here ? do you give input or any other way ?Hamid

  • FRM-40735: When validate item raised unhandled exception ora-04063

    hi experts,
    FRM-40735: When validate item raised unhandled exception ora-04063
    I have noticed the below error on my instance while trying to test some functionality.
    My EBS Version is R12.1.1 +11.1.0.7 db.
    Please advise.
    regards
    Mohammed. Abdul Muqeet

    FRM-40735: When validate item raised unhandled exception ora-04063
    I have noticed the below error on my instance while trying to test some functionality.How do you get this error?
    What is the navigation path?
    Please check the application.log file along with Apache log files for any errors.
    Thanks,
    Hussein

  • FRM-40735 on-error raised unhandled exception ORA-06502

    Hi there,
    I have a form and all the items on canvas are base table items. If iam in normal mode and click on buttons, the LOVs show up correctly.
    If i query records and i click on any of buttons to get LOV i get " FRM-40735 on-error raised unhandled exception ORA-06502". I checked insert_allowed,enabled,update_allowed properties and also format mask for each items and all are correct.
    ANy help is appreciated.
    Thanks

    Use the debugger to single step through your code line by line. The debugger will stop at the line where the error is occurring. Look at that line of code. You will probably see a problem with a data type or the data length.

  • FRM-40735: ON-ERROR triggers raised unhandled exception ORA-06508

    I get the following error message: FRM-40735: ON-ERROR triggers raised unhandled exception ORA-06508
    after login in a Web forms application.
    I tried the solution as described in the Headstart Manual, e.g. recompiling the libraries in the specified order.
    All the libraries are in the working directory and has been included in FORMS60_PATH.
    All the involved stored procedures and packages are valid.
    the same application works fine as C/S.
    Any clue?
    Used configuration:
    Forms 6i
    Designer 6i r 4.11
    Headstart 6.5
    Oracle 8.1.7.4
    Oracle 9ias r 1 running on Sun Solaris 64bit version 5.8

    This is actually a pretty generic error and I would suggest running through the debugger to see the line of code it is actually failing at - that may make it easier to track.
    Regards
    Grant Ronald
    Forms Product Management

  • FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-06508

    Hi all,
    In Production instance we have an issue on AP invoice workbench, gives an error (FRM-40735 Post-Query Trigger On Quering Invoice ) when we retrieve the existing invoice data entered.
    For this we compiled the invalid objects and applied the patch according to the metalink id [ID 1209736.1]
    After that we came up with new error FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-06508.
    Can any one help us
    Thanks
    SAI

    Hi Thanks for the reply we have implemented the following things
    1) Please download and review the readme for Patch 8671468:R12.AP.B
    2) Please apply Patch 8671468:R12.AP.B in a test environment.
    3) Check the file versions , they have to be the same as given below.
    Patch/115/sql/aphanwfb.pls 120.64.12010000.11
    4) Please retest the issue.
    5) If the issue is resolved, please migrate the solution as appropriate to other environments.
    APXINWKB : When Entering Invoice Details, Get Error: FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-06508 [ID 1284114.1]
    This is done no luck.
    Thanks
    Sai

Maybe you are looking for

  • G-drive not recognized by Finder or Disk Utility

    I've been using this G-drive for almost a year now and have never had any issues. Today I just tried to use it to move some files off of my Macbook Air and not only would it not appear in Finder, but it doesn't appear in Disk Utility either. I've spe

  • RKD_WORD_WRAP with string input

    hi all, I need to split a string with RKD_WORD_WRAP, but it seems it takes only chars as input, so I would like to do this: create a char variable dynamically as long as the string in input and then pass it to the RKD_WORD_WRAP. Can anybody please te

  • Help trying to list measures from cube.

    Hi all, I'm trying to list measures from a cube using BAPI_MDPROVIDER_GET_MEASURES, but the name of the measures (MES_NAM) I get seems to be coded, and I haven't been able to find how to convert it to "the usual" name. I must note that I don't know m

  • SAP WEB AS 6.20 unicode installation on XP

    I am getting the following error during installation. It stops at 'SAPDb Clint Software'. I need some help. Execute Action READ_PROFILE_INFO succeeded. INFO 2004-08-14 00:50:44 Execute Action READ_PROFILE_INFO succeeded. INFO 2004-08-14 00:50:44 Copy

  • KanPeke - Kanji drill exercises in Bash

    I've been practicing Japanese and wanted to share what I wrote. It's a simple driller and there are tons of programs just like this and much better, but what I really wanted was to spend a long time on large practice sets, with dictionaries that make