Raise IGNORE_RECORD Exception

Hi All,
I have the following code. What I do not understand is when processing certain records, when the v_per = 100, record gets written to the "ct_vv_chargeback_actual" table but not to the other following tables like CT_ORIG_ORDER, CT_VV_CHARGEBACK etc.
Is it because of the raise IGNORE_RECORD? If so, can any one explain how the user defined exception works? (apologize for the long code)
Thanks,
DECLARE
CURSOR GET_TKT_CB_DETAILS IS
  SELECT orh.order_no,
         ssku.shipment,
         ssku.sku,
         orh.supplier,
         sum(ssku.qty_expected) tkt_qty,
         sum(ssku.qty_expected) tkt_cost,
      ctt.qty_printed ctt_qty_printed,
      ctt.qty_printed ctt_tkt_cost
    FROM ordhead orh,
         ct_chargeback_shipment shp,
         shipsku ssku,
         uda_item_lov uil,
         (select order_no,pack_no,sum(qty_printed) qty_printed
         from ct_tkt_ticket_print_hist
        group by order_no,pack_no)   ctt
   WHERE shp.receive_date = (select trunc(vdate) from period)
     AND shp.location = 930
     AND shp.tkt_flag is null
     AND shp.order_no = orh.order_no
     AND orh.import_order_ind = 'N'
     AND orh.written_date > to_date('31-MAY-03')
     AND shp.shipment = ssku.shipment
     AND ssku.sku = uil.item                       
     AND uil.uda_id = 6                            
     AND uil.uda_value <> 7
     AND shp.order_no = ctt.order_no
     AND ssku.sku = ctt.pack_no
   group by orh.order_no,
         ssku.shipment,
         ssku.sku,
         orh.supplier,
      ctt.qty_printed ,
      ctt.qty_printed ;
v_chk      varchar2(1);
v_old_quantity number;
v_sku_qty  number;
v_order_no number;
v_shipment number;
v_tkt_cost number;
v_pack_no  number;
v_tkt_qty  number;
v_orig_qty number;
v_supplier number;
v_cb_id    number;
v_vdate    date;
v_dept     number;
v_tkt_dept number;
v_tkt_div  varchar2(2);
v_per      number(12,4);
v_orig_ord_qty number;
v_rate     number(12,4);
v_yn       varchar2(1);
v_err_desc varchar2(200);
v_mail_country_id varchar2(4);
v_pre_tick varchar2(1);
v_actual   number;
IGNORE_RECORD   EXCEPTION;
IGNORE_SUPPLIER EXCEPTION;
BEGIN
select vdate
  into v_vdate
  from period;
FOR get_tkt_cb IN get_tkt_cb_details LOOP
BEGIN
BEGIN
   SELECT '1'
     INTO v_chk
     FROM CT_ORIG_ORDER
    WHERE ORDER_NO = get_tkt_cb.order_no
      AND PACK_NO = get_tkt_cb.sku;
   RAISE IGNORE_RECORD;
EXCEPTION
   WHEN NO_DATA_FOUND THEN
     NULL;
END;
v_old_quantity := 0;
v_sku_qty := 0;
v_order_no := null;
v_shipment := null;
v_tkt_cost := 0;
v_actual   := 0;
v_err_desc := null;
v_chk := null;
v_pack_no := 0;
v_tkt_qty := 0;
v_orig_qty := 0;
v_supplier := 0;
v_cb_id    := 0;
v_dept := 0;
v_tkt_dept := 0;
v_tkt_div := 0;
v_per := 0;
v_rate := 0;
v_yn := null;
v_pre_tick := null;
   v_pack_no  := get_tkt_cb.sku;
   BEGIN
    select sum(sku_qty)
      into v_sku_qty
      from packsku
     where pack_no =v_pack_no;
   EXCEPTION
    WHEN NO_DATA_FOUND THEN
       v_sku_qty := 1;
   END;
   select dept
     into v_dept
     from desc_look
    where sku = v_pack_no;
   v_supplier := get_tkt_cb.supplier;
   v_order_no := get_tkt_cb.order_no;
   BEGIN
    select nvl(per,0),
           nvl(rate,1)
      into v_per,
           v_rate
      from AP_CB_EXCEPTIONS
     where vendor_number = lpad(to_char(v_supplier),'6','0')
       and nvl(div,'0') = decode(length(v_dept),4,substr(to_char(v_dept),1,1),'1')
       and nvl(dept,0) = v_dept
       and nvl(cb_no,410) = 410
       and trunc(v_vdate) between trunc(start_date) and nvl(trunc(end_date),trunc(v_vdate));
   EXCEPTION
     WHEN NO_DATA_FOUND THEN
      BEGIN
        select nvl(per,0),
               nvl(rate,1)
          into v_per,
               v_rate
          from AP_CB_EXCEPTIONS
         where vendor_number = lpad(to_char(v_supplier),'6','0')
           and nvl(div,'0') = decode(length(v_dept),4,substr(to_char(v_dept),1,1),'1')
           and nvl(dept,0) = 0
           and nvl(cb_no,410) = 410
           and trunc(v_vdate) between trunc(start_date) and nvl(trunc(end_date),trunc(v_vdate));
      EXCEPTION
       WHEN NO_DATA_FOUND THEN
       BEGIN
        select nvl(per,0),
               nvl(rate,1)
          into v_per,
               v_rate
          from AP_CB_EXCEPTIONS
         where vendor_number = lpad(to_char(v_supplier),'6','0')
           and nvl(div,'0') = '0'
           and nvl(dept,0) =  v_dept
           and nvl(cb_no,410) = 410
           and trunc(v_vdate) between trunc(start_date) and nvl(trunc(end_date),trunc(v_vdate));
       EXCEPTION
        WHEN NO_DATA_FOUND THEN
          BEGIN
           select nvl(per,0),
                  nvl(rate,1)
             into v_per,
                  v_rate
             from AP_CB_EXCEPTIONS
            where vendor_number = lpad(to_char(v_supplier),'6','0')
              and nvl(div,'0') = '0'
              and nvl(dept,0) = 0
              and nvl(cb_no,410) = 410
              and trunc(v_vdate) between trunc(start_date) and nvl(trunc(end_date),trunc(v_vdate));
          EXCEPTION
           WHEN NO_DATA_FOUND THEN
             v_per := 0;
             v_rate := .01;
             --RAISE IGNORE_SUPPLIER;
          END;
       END;
      END;
   END;
   BEGIN
    select country_id
      into v_mail_country_id
      from addr
     where key_value_1 = to_char(v_supplier)
       and seq_no in (select mail_addr_type_seq_no
                        from ct_ordhead
                       where order_no = v_order_no)
       and addr_type = 15;
    IF v_mail_country_id <> 'US' THEN
     Select import_rate
       into v_rate
       from ap_ticket_cb_rates;
    END IF;
   EXCEPTION
    WHEN NO_DATA_FOUND THEN
      RAISE IGNORE_RECORD;
   END;
   BEGIN
    select qty_ordered
      into v_orig_ord_qty
      from ct_po_log
     where order_no = v_order_no
       and sku = v_pack_no
       and date_changed = (select min(date_changed)
                             from ct_po_log
                            where order_no = v_order_no
                              and sku = v_pack_no);
   EXCEPTION
     when others then 
       v_err_desc := substr(sqlerrm,1,100);
       INSERT INTO IF_ERRORS VALUES (
         'CT_TKTCHB.SQL',SYSDATE,'Order no ' || v_order_no || ' sku ' || v_pack_no || ' ',
          v_err_desc);
       commit;
       RAISE IGNORE_RECORD;
   END;
   v_shipment := get_tkt_cb.shipment;
   v_tkt_qty  := get_tkt_cb.ctt_qty_printed;
   v_orig_qty := get_tkt_cb.tkt_qty*v_sku_qty;
   v_orig_ord_qty := v_orig_ord_qty * v_sku_qty;
   v_tkt_cost := round(v_orig_ord_qty*v_rate*((100-v_per)/100)*1.15,2);
   v_actual   := round(v_orig_ord_qty*1.15,2);
   IF v_per = 100 THEN
     insert into ct_vv_chargeback_actual values (
        null,
        v_supplier,
        v_order_no,
        v_shipment,
        v_pack_no,
        '410',
        v_actual,
        1,
        v_vdate);
     COMMIT;
     raise IGNORE_RECORD;
   END IF;
   select ct_vv_chargeback_seq.nextval
     into v_cb_id
     from dual;
   INSERT INTO CT_ORIG_ORDER VALUES (
        v_order_no,
        v_shipment,
        v_pack_no,
        v_tkt_qty,
        v_orig_qty,
        v_orig_ord_qty,
        'N',
        v_supplier,
        v_cb_id,
        'N',
        v_tkt_cost,
        v_vdate);
   INSERT INTO CT_VV_CHARGEBACK VALUES (
     v_cb_id,
        v_order_no,
        'A',
        v_supplier,
        null,
        null,
        null,
        null,
        v_shipment);
   INSERT INTO CT_VV_CHARGEBACK_DETAIL VALUES (
        v_cb_id,
        v_pack_no,
        '410',
        v_tkt_cost,
        1);
   IF v_tkt_cost <> v_actual THEN
     insert into ct_vv_chargeback_actual values (
        v_cb_id,
        v_supplier,
        v_order_no,
        v_shipment,
        v_pack_no,
        '410',
        v_actual,
        1,
        v_vdate);
   END IF;    
   UPDATE CT_CHARGEBACK_SHIPMENT
      SET TKT_FLAG = 'C'
    WHERE shipment = get_tkt_cb.shipment;
   COMMIT;
EXCEPTION
  WHEN IGNORE_SUPPLIER THEN
    NULL;
  WHEN IGNORE_RECORD THEN
    NULL;
  WHEN NO_DATA_FOUND THEN
   UPDATE CT_CHARGEBACK_SHIPMENT
      SET TKT_FLAG = 'D'
    WHERE shipment = get_tkt_cb.shipment;
   COMMIT;
  WHEN OTHERS THEN
   rollback;
   v_err_desc := substr(sqlerrm,1,200);
   insert into if_errors values ('ct_tktchb.sql',
                                 sysdate,
                                 v_err_desc,
                                 'Error while processing  order - ' ||
                                  to_char(v_order_no) ||
                                 ' shipment - ' || to_char(v_shipment));
   commit;
END;
END LOOP;
   

Without analysing the code in detail, the
IGNORE_RECORD exception is raised in four places
within the BEGIN-END block that implements the loop.
When it's raised, processing drops to the exception
handler at the bottom, then the loop continues with
the next record. It's kind of a pre-11g CONTINUE.gotcha...thats what I wanted to know. Glad to know that it works as CONTINUE....couldn't figure out why some values are not showing up.
Thanks,
Chiru

Similar Messages

  • Raising cx_rsrout_abort exception in Start Routine of Transformations

    Hello Abap OO Gurus:
    This is likely a very simple question but I'm brand new to Abap OO and despite reading and searching, I cannot convert some old abap code used in the start routine of business content in BW to be used in the Transformation start routine in SAP BI.
    My Start Routine inside a BI 7.0 transformation rule has a method declared like this:
    <b>METHODS
    start_routine
    IMPORTING
    request type rsrequest
    datapackid type rsdatapid
    EXPORTING
    monitor type rstr_ty_t_monitors
    CHANGING
    SOURCE_PACKAGE type tyt_SC_1
    RAISING
    cx_rsrout_abort.</b>
    The Exception "cx_rsrout_abort" has replaced what used to be a simple ABORT data field. The <u>old code I want to replace was just "abort = 1'.</u>
    But now it seems like I have to use TRY... ENDTRY statement to raise Exception "cx_rsrout_abort". I am inside the abap code of the Method "start routine"
    METHOD start_routine.
    *=== Segments ===
    Could some kind soul educate me as to how to raise the Exception "cx_rsrout_abort" inside the Method start routine?
    thanks in advance, David

    Tx HDev:
    we are almost there...  I have that PDF but never got thru to the rest of the Appendix B as my project is just too crazy...
    When try what Appenix B suggest..
    <u>"raise exception type CX_RSROUT_SKIP_RECORD."</u>
    I get the following Warning msg which makes sense...
    <b>"W:The exception CX_RSROUT_SKIP_RECORD is neither caught nor is it
    declared in the RAISING clause of "START_ROUTINE".</b>
    The METHOD statement in the start routine never declares another exception other than cx_rsrout_abort as seen below:
        METHODS
          start_routine
            IMPORTING
              request                  type rsrequest
              datapackid               type rsdatapid
            EXPORTING
              monitor                  type rstr_ty_t_monitors
            CHANGING
              SOURCE_PACKAGE              type tyt_SC_1
            RAISING
              cx_rsrout_abort.
    Maybe NW2004s has a bug here... I'm hoping that a SAP Developer reads this posting and can enlighten us all... otherwise I'll have to post a OSS msg
    So the mystery is still how to do
    "raise exception type CX_RSROUT_ABORT" and make this equal to ABORT = 1
    which makes the start routine skip a record
    tx again,  David

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

  • How to raise the exception in function module

    Dear abaper's.
                   I am creating a Function module .In that in' EXCEPTION' Tab i am giving
    3 exception .1.NO_DATA_FOUND 2.NO_PRINTER_FOUND 3.SMARTFORM_INTERFACE_NOT_FOUND.
    In my coding if this condtion matches i want to raise this exception.how can i do this in my coding .can any one suggest me..
    advance thanks,
    Warm regards,
    Veera

    Hi,
    if that condition is not satisfied,and u didn't handle that exception while calling function module then in the runtime error u will get the text as the description of the exception in function module definition.
    rgds,
    bharat.

  • 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

  • Use of raise in exception handling block

    what is the use of raise in exception handling block for eg.
    declare
    a number;
    b emp.empno%type;
    begin
    begin
    SELECT empno INTO a FROM emp where 1=2;
    exception
    when others then
    dbms_output.put_line('inner');
    raise;
    end;
    exception
    when no_data_found then
    dbms_output.put_line('outer');
    end;
    output will be like below ..
    inner
    outer
    PL/SQL procedure successfully completed.
    my question is wht is the use of using raise in exception handing part, is there any specific reason we use in the development ????
    Regards,
    AAK.

    In the first block, you do not raise you user-defined exception WHEN_NO_DATA_FOUND, but the predefined one, which is raised to the WHEN OTHERS exception handler.
    Consider:
    SQL> declare
      2     a number;
      3     my_err exception;
      4     no_data_found exception;
      5  begin
      6     begin
      7        select 1 into a from dual where 1=2;
      8     exception
      9     when no_data_found then
    10        dbms_output.put_line(' In system defined');
    11        raise my_err;
    12     end;
    13  exception
    14     when my_err then
    15        dbms_output.put_line('In User Defined');
    16     when others then
    17        declare
    18           v_sqlerrm varchar2(100);
    19        begin
    20           v_sqlerrm := sqlerrm;
    21        dbms_output.put_line(' In when others '||sqlerrm);
    22        end;
    23  end;
    24  /
    In when others ORA-01403: no data found
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2     a number;
      3     my_err exception;
      4     --no_data_found exception;
      5  begin
      6     begin
      7        select 1 into a from dual where 1=2;
      8     exception
      9     when no_data_found then
    10        dbms_output.put_line(' In system defined');
    11        raise my_err;
    12     end;
    13  exception
    14     when my_err then
    15        dbms_output.put_line('In User Defined');
    16     when others then
    17        declare
    18           v_sqlerrm varchar2(100);
    19        begin
    20           v_sqlerrm := sqlerrm;
    21        dbms_output.put_line(' In when others '||sqlerrm);
    22        end;
    23* end;
    SQL> /
    In system defined
    In User Defined
    PL/SQL procedure successfully completed.
    SQL>Note that in the second block, I deleted the declaration of the user defined exception NO_DATA_FOUND.
    This is taken from the documentation:
    Redeclaring Predefined Exceptions
    Remember, PL/SQL declares predefined exceptions globally in package STANDARD, so you need not declare them yourself. Redeclaring predefined exceptions is error prone because your local declaration overrides the global declaration. For example, if you declare an exception named invalid_number and then PL/SQL raises the predefined exception INVALID_NUMBER internally, a handler written for INVALID_NUMBER will not catch the internal exception. In such cases, you must use dot notation to specify the predefined exception, as follows:
    EXCEPTION
      WHEN invalid_number OR STANDARD.INVALID_NUMBER THEN
        -- handle the error
    END;You can read yourself :
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/errors.htm
    Regards,
    Gerd

  • How to raise a exception if the incoming value for a source field is empty

    Dear all,
    I have a scenario where the source and target structures are as follows :
    The output for the above transformation logic is
    The occurrence for field id in source and target is 1:1   Even if i don't provide the input value for id field,
    system is not throwing any runtime exception.But if the field tag id is missing in incoming payload, then
    system throws exception.
    1) *** How can i raise a exception it the value for field id is empty
    2) As the target structure occurrence for field id is 1:1  why system doesn't throw exception for null value
    Regards
    Koti Reddy

    1) *** How can i raise a exception it the value for field id is empty
    You need to impliment the check  to throw the error
    2) As the target structure occurrence for field id is 1:1  why system doesn't throw exception for null value
    You are sending a blank value " " and the same is being passed. if you remove the tag from source xml it'll throw the error
    Message was edited by: Hareesh Gampa

  • 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

  • JHS 10.1.3 Internal Server Error - Page when a view raises an exception

    I have a view with some logic (based on a table function) and created: entity object, view object and (jhs) an advanced search page. When the view raises an exception an "500 Internal Server Error"-page is showed, but I expected the error would be showed in de messages-component.
    I created a test case: a view on employees-table with in the select a function that raises an exception when last_name starts with "L". On this view an entity obejct, a view object and application module.
    I generated with JHS a page : layout: table and only advanced search.
    The first time the page is loaded (with auto query) some records are showed and the exception is showed as expected in the message-component. When I do a search (without criteria) the "500 Internal Server Error" pages is showed.
    When I create manual a search page, the behavior is as expected.
    (see below for error stack)
    Greetings, Frank
    "500 Internal Server Error"-page :
    javax.faces.FacesException: #{searchVEmps.advancedSearch}: javax.faces.el.EvaluationException: oracle.jbo.RowNotFoundException: JBO-25060: Er is een onverwachte fout opgetreden bij het ophalen van de volgende rij uit JDBC ResultSet voor verzameling VEmps.
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: oracle.jbo.RowNotFoundException: JBO-25060: Er is een onverwachte fout opgetreden bij het ophalen van de volgende rij uit JDBC ResultSet voor verzameling VEmps.
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         ... 27 more
    Caused by: oracle.jbo.RowNotFoundException: JBO-25060: Er is een onverwachte fout opgetreden bij het ophalen van de volgende rij uit JDBC ResultSet voor verzameling VEmps.
         at oracle.jbo.server.QueryCollection.hasNextInResultSet(QueryCollection.java:3103)
         at oracle.jbo.server.ViewObjectImpl.hasNextForCollection(ViewObjectImpl.java:3650)
         at oracle.jbo.server.QueryCollection.hasNext(QueryCollection.java:2992)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2207)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2088)
         at oracle.jbo.server.QueryCollection.getRowCount(QueryCollection.java:1821)
         at oracle.jbo.server.ViewRowSetImpl.getRowCount(ViewRowSetImpl.java:1933)
         at oracle.jbo.server.ViewObjectImpl.getRowCount(ViewObjectImpl.java:5918)
         at oracle.jheadstart.controller.jsf.bean.JhsSearchBean.executeAdvancedSearchBinding(JhsSearchBean.java:326)
         at oracle.jheadstart.controller.jsf.bean.JhsSearchBean.advancedSearch(JhsSearchBean.java:214)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 28 more

    Could you send your testcase to [email protected]? Rename extension .zip to something else (.zipped for example)
    Thanks,
    Steven Davelaar,
    JHeadstart Team

  • System instability using reports that raise an exceptions

    I am having a problem with some reports when I use the type "PL/SQL function body returning SQL query".
    If the Function raise an exception, the apex's engine will call again the function and it raise again the exception. These will make a loop that doesn't end until you close the session. The problem is that this page consume all the recourse of the CPU and/or fill the partition where the logs are saved. All these generate Instability on the server and also could bring down the server.
    To reproduce this error you have to follow this steps:
    1)     First create a simple function to return a raise.
    FUNCTION DORTEGA_TEST_RAISE RETURN VARCHAR2 IS
    BEGIN
    DECLARE
    A NUMBER;
    BEGIN
    A := 12/0; --This operation generate an exception.
    END;
    RETURN 'SELECT 1 FROM DUAL';
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END;
    2)     Create a empty page with one report region.
    3)     Edit the report region and set these values:
    a.     Type = SQL Query (PL/SQL function body returning SQL query)
    b.     Display Point = Page Template Region Position 2
    c.     Source = BEGIN RETURN DORTEGA_TEST_RAISE; END;
    Use Generic Column Names (parse query at runtime only)
    4) When we run the application the page never load, and if you look the data base, you can view that the session it’s growing and it’s begins to consume all the memory and the processor of the server.
    I am using APEX 3.1.0.00.32. And the DB is 11g.
    Someone know why is this happening? Are there any fix for this bug?

    Hi:
    I was able to reproduce this in APEX 3.1.2 installed in an Oracle XE instance.
    The APEX engine does seem to go into an endless loop and the server Oracle process handling this request eventually does with an out-of-memory error.
    However, if instead of raising an exception in the exception handler of the function I have a statement like 'Return Null;' then the APEX engine comes back with an expected response of
    failed to parse SQL query:
    ORA-00900: invalid SQL statement
    Varad

Maybe you are looking for

  • Open Source license question....

    My client is planning on using some code from a third party that uses BlazeDS 3.0.0.544. We've found some files that seem to have another license and my client isn't going to want to risk any possibility of license infringement. Can anyone shed any l

  • Adobe PDF email problem

    Hello all, I use "Scansoft" to create pdf's of excell sheets, I then just click on email to create an email to send using "Thunderbird" I've used this method without fail over the last few years.  The problem I now have is as I click on email after c

  • Cp 6 no blinking cursor in text entry box

    Howdy, Upon slide enter, when a slide has a text entry box, there would be a blinking cursor in the TEB to help alert the user that they will need to type something. Howerver, in Cp 6 I'm not seeing a blinking/flashing cursor in a TEB like I did with

  • Others can view my webpage in Safari, but I cannot

    I have my own personal website www.naturalyoga.com which was created on WordPress. I own the domain name. On my Mac computer, I cannot view the webpage in Safari. However, it works in Firefox. Others have tried it as well and it also works in Explore

  • Are contacts actually restored from a backup?

    So like many other people, all of my contacts were wiped in the 2.0 upgrade. I've read a million support threads and the official apple page, but I can't seem to figure out if my contacts will return if I do a "restore". I already let the iphone back