Ora-01403 no data found cursor error - Please help.

DECLARE
name1 talent.candidate_name%TYPE; -- Declare variables
name2 long; -- Declare variables
emp_id talent_id.emplid%TYPE;
NO_DATA_FOUND EXCEPTION;
CURSOR c1 IS
select candidate_name,(''''||trim(upper(candidate_name))||'''') as tst from talent ;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO name1, name2;
EXIT WHEN c1%NOTFOUND; -- TRUE when FETCH finds no more rows
select distinct emplid
INTO emp_id
from names a
where a.name_type = 'PRI'
and upper(a.last_name)||', '||upper(a.first_name) = name2;
INSERT INTO talent_id VALUES (emp_id, name1);
END LOOP;
CLOSE c1;
COMMIT;
Question: Above queries prompt me error msg ora-01403 no data found for emplid. I try but fail to solve it. Please help me. Thank you
Edited by: user12051088 on Mar 4, 2010 1:38 AM
Edited by: user12051088 on Mar 4, 2010 1:40 AM

Yes, this is very helpful :-)
My testing to insert table where emplid is null but still having error ora-01403 no data found when i remove on dbms_output.put_line as shown below:
Anyway, if i dint remove the dbms_output.put_line. It is working to insert emp_id is not null. How do I include record which emp_id is null? Thank you.
begin
select distinct emplid
INTO emp_id
from gdw_names a
where a.name_type = 'PRI'
and upper(a.last_name)||', '||upper(a.first_name) = name1;
IF emp_id is null THEN
RAISE no_data_found;
else
INSERT INTO gdw_talent_id VALUES (emp_id, name1);
end if;
exception
when no_data_found then
INSERT INTO gdw_talent_id VALUES (null, name1);
--when too_many_rows then
-- dbms_output.put_line('too many rows for ' || name1);
-- when others then
-- dbms_output.put_line('Unknown error for ' || name1);
end;
Edited by: user12051088 on Mar 4, 2010 9:11 PM

Similar Messages

  • ORA-01403: no data found BPEL Error on DB Adapter

    Dear All,
    I am using a DBAdapter to call a Stored Procedure in a Package. One of the parameter of the stored procedure is of table type. While invoking the BPEL Process, it shows the following error:
    Fault Error.com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{code=<code>1403</code> ,summary=<summary>file:/u03/soauser/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_InventoryProduct_1.0_579640da6283d0dbd00cca17cf50e0f7.tmp/InvProductDBService.wsdl [ InvProductDBService_ptt::InvProductDBService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'InvProductDBService' failed due to: Error while converting to a Java struct object. Unable to convert the XSD element P_ITEM_TBL_ITEM whose user defined type is APPS.XXHDNL_INV_MTL_SYSITEMS_PKG_2. Cause: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 [Caused by: ORA-01403: no data found ORA-06512: at line 1 ] ; nested exception is: ORABPEL-11802 Error while converting to a Java struct object. Unable to convert the XSD element P_ITEM_TBL_ITEM whose user defined type is APPS.XXHDNL_INV_MTL_SYSITEMS_PKG_2. Cause: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 [Caused by: ORA-01403: no data found ORA-06512: at line 1 ] Check to ensure that the XML data describing the user defined type matches the definition of the struct in the XSD. Contact oracle support if error is not fixable. </summary> ,detail=<detail> Internal Exception: java.sql.SQLException: ORA-01403: no data found ORA-06512: at line 1 Error Code: 1403</detail> }} </ErrorDescription>
    What could be the possible solution for this to get fixed. Please update..
    Many thanks in advance....

    This is a PL/SQL error, it occurs when a cursor (SQL statement) is called and returned no values, typically you should have an exception handler in the PL/SQL to mange this. But sometimes you want the PL/SQL to fail.
    The parameters you are using to invoke the PL/SQL procedure returned no values, therefore to fix provide information that does return values, or in the PL/SQL put an exception handler in to manage the no-data-found error, e.g.
    begin
      Select ...
      Into ..
      From ..
      Where ..
    Exception
      when no_data_found then
    end;cheers
    James

  • ORA-01403: no data found  .  Error Unable to fetch row

    Hi
    I have a form that, when inserting a new record, should submit the form but remain in the same page with the same info. I have set up the "after processing" branch (unconditional) to redirect to that specific page (page 5), the "reset pagination for this page" option selected and "clear cache" option empty. What happens is that, when inserting a new record, i get error ORA-01403 indicating that it's unable to fetch the record. Although i get this error, the new record is inserted in the DB... I have also selected option "Only when current value in session state is null" for source used for all fields of form. What am i doing wrong? I thank in advance all replies!

    Hi again
    Because you have a trigger on the table that selects the current max(ID)+1, when creating the form you should have used "Existing Trigger"when defining the source for the primary key, not "Existing Sequence". You should also change the trigger to use the sequence.NEXTVAL for the ID.
    When you created the form using "Exisitng Sequence", Apex would have created a "Get PK" process which gets the primary key value from the sequence before passing control to the DML process. You should delete the Get PK process and let the database trigger do it's job.
    In the DML process, set "Item Containing Primary Key Column Value" to the page item name e.g. "P5_ID", and set "Primary Key Column" to "ID" (the name of your table column).
    That should do the trick.
    Cheers
    Richard
    Message was edited by:
    Richard.

  • "ORA-01403: no data found" while calling AR_INVOICE_API_PUB.CREATE_INVOICE

    I am trying to run this AR API, for a perticular set of value in Oracle R12 instance...
    DECLARE
    L_RETURN_STATUS VARCHAR2(1);
    L_MSG_COUNT NUMBER;
    L_MSG_DATA VARCHAR2(2000);
    L_BATCH_SOURCE_REC AR_INVOICE_API_PUB.BATCH_SOURCE_REC_TYPE;
    L_TRX_HEADER_TBL AR_INVOICE_API_PUB.TRX_HEADER_TBL_TYPE;
    L_TRX_LINES_TBL AR_INVOICE_API_PUB.TRX_LINE_TBL_TYPE;
    L_TRX_DIST_TBL AR_INVOICE_API_PUB.TRX_DIST_TBL_TYPE;
    L_TRX_SALESCREDITS_TBL AR_INVOICE_API_PUB.TRX_SALESCREDITS_TBL_TYPE;
    BEGIN
    FND_GLOBAL.APPS_INITIALIZE(112,50368,7000);
    MO_GLOBAL.SET_POLICY_CONTEXT('S',82);
    L_BATCH_SOURCE_REC.BATCH_SOURCE_ID := 1024;
    L_TRX_HEADER_TBL(1).TRX_HEADER_ID := 16828;
    L_TRX_HEADER_TBL(1).TRX_NUMBER := '620121V';
    L_TRX_HEADER_TBL(1).TRX_DATE := '29-APR-08';
    L_TRX_HEADER_TBL(1).GL_DATE := '30-SEP-2010';
    L_TRX_HEADER_TBL(1).TRX_CURRENCY := 'INR';
    L_TRX_HEADER_TBL(1).CUST_TRX_TYPE_ID := 1033;
    L_TRX_HEADER_TBL(1).BILL_TO_CUSTOMER_ID := 8256;
    L_TRX_HEADER_TBL(1).BILL_TO_ADDRESS_ID := 1476;
    L_TRX_HEADER_TBL(1).SHIP_TO_CUSTOMER_ID := 8256;
    L_TRX_HEADER_TBL(1).SHIP_TO_ADDRESS_ID := 1476;
    L_TRX_HEADER_TBL(1).BILL_TO_SITE_USE_ID := 1687;
    L_TRX_HEADER_TBL(1).TERM_ID := 1001;
    L_TRX_HEADER_TBL(1).ORG_ID := 82;
    L_TRX_HEADER_TBL(1).TRX_CLASS := 'INV';
    L_TRX_HEADER_TBL(1).REFERENCE_NUMBER := NULL;
    L_TRX_HEADER_TBL(1).COMMENTS     := 'Sale';
    L_TRX_LINES_TBL(1).TRX_HEADER_ID := 16828;
    L_TRX_LINES_TBL(1).TRX_LINE_ID := 16864;
    L_TRX_LINES_TBL(1).WAREHOUSE_ID := 102;
    L_TRX_LINES_TBL(1).QUANTITY_INVOICED := 1;
    L_TRX_LINES_TBL(1).MEMO_LINE_ID := 1001;
    L_TRX_LINES_TBL(1).UNIT_SELLING_PRICE := 8070;
    L_TRX_LINES_TBL(1).LINE_NUMBER := 1;
    L_TRX_LINES_TBL(1).AMOUNT := 8070;
    L_TRX_LINES_TBL(1).LINE_TYPE := 'LINE';
    L_TRX_LINES_TBL(1).INTERFACE_LINE_CONTEXT := 'CONVERSION';
    L_TRX_LINES_TBL(1).INTERFACE_LINE_ATTRIBUTE1 := 3882;
    L_TRX_LINES_TBL(1).INTERFACE_LINE_ATTRIBUTE2 := 1;
    L_TRX_LINES_TBL(1).INTERFACE_LINE_ATTRIBUTE3 := 'Sale';
    L_TRX_LINES_TBL(1).DESCRIPTION     := 'Conversion';
    AR_INVOICE_API_PUB.CREATE_INVOICE(P_API_VERSION => 1.0,
    P_BATCH_SOURCE_REC => L_BATCH_SOURCE_REC,
    P_TRX_HEADER_TBL => L_TRX_HEADER_TBL,
    P_TRX_LINES_TBL => L_TRX_LINES_TBL,
    P_TRX_DIST_TBL => L_TRX_DIST_TBL,
    P_TRX_SALESCREDITS_TBL => L_TRX_SALESCREDITS_TBL,
    X_RETURN_STATUS => L_RETURN_STATUS,
    X_MSG_COUNT => L_MSG_COUNT,
    X_MSG_DATA => L_MSG_DATA);
    IF ((L_RETURN_STATUS = FND_API.G_RET_STS_ERROR) OR (L_RETURN_STATUS = FND_API.G_RET_STS_UNEXP_ERROR)) THEN
    DBMS_OUTPUT.PUT_LINE('Unexpected Errors Found While Calling API');
    END IF;
    DBMS_OUTPUT.PUT_LINE(CHR(10));
    DBMS_OUTPUT.PUT_LINE('L_RETURN_STATUS: '||L_RETURN_STATUS);
    DBMS_OUTPUT.PUT_LINE('L_MSG_COUNT: '||L_MSG_COUNT);
    DBMS_OUTPUT.PUT_LINE('L_MSG_DATA: '||L_MSG_DATA);
    DBMS_OUTPUT.PUT_LINE(CHR(10));
    END;
    On running this,the output comes as -
    Unexpected Errors Found While Calling API
    L_RETURN_STATUS: U
    L_MSG_COUNT:
    L_MSG_DATA: Error in AR_INVOICE_UTILS.validate_tax_exemption ORA-01403: no data found
    Can some one help me out where am i going wrong???

    Hi Gourab
    You have posted this request to the wrong forum, so no one here will be able to help you.
    I believe the correct forum for the question you are asking is the EBS Financials forum:
    Financials
    Please try posting your query there, hopefully someone there will be able to help you.
    Regards
    Simon Kissane
    Oracle Support

  • I am getting ORA-01403: no data found error while calling a stored procedur

    Hi, I have a stored procedure. When I execute it from Toad it is successfull.
    But when I call that from my java function it gives me ORA-01403: no data found error -
    My code is like this -
    SELECT COUNT(*) INTO L_N_CNT FROM TLSI_SI_MAST WHERE UPPER(CUST_CD) =UPPER(R_V_CUST_CD) AND
    UPPER(ACCT_CD)=UPPER(R_V_ACCT_CD) AND UPPER(CNSGE_CD)=UPPER(R_V_CNSGE_CD) AND
    UPPER(FINALDEST_CD)=UPPER(R_V_FINALDEST_CD) AND     UPPER(TPT_TYPE)=UPPER(R_V_TPT_TYPE);
         IF L_N_CNT >0 THEN
              DBMS_OUTPUT.PUT_LINE('ERROR -DUPlicate SI-1');
              SP_SEL_ERR_MSG(5,R_V_ERROR_MSG);
              RETURN;
         ELSE
              DBMS_OUTPUT.PUT_LINE('BEFORE-INSERT');
              INSERT INTO TLSI_SI_MAST
                   (     CUST_CD, ACCT_CD, CNSGE_CD, FINALDEST_CD, TPT_TYPE,
                        ACCT_NM, CUST_NM,CNSGE_NM, CNSGE_ADDR1, CNSGE_ADDR2,CNSGE_ADDR3,
                        CNSGE_ADDR4, CNSGE_ATTN, EFFECTIVE_DT, MAINT_DT,
                        POD_CD, DELVY_PL_CD, TRANSSHIP,PARTSHIPMT, FREIGHT,
                        PREPAID_BY, COLLECT_BY, BL_REMARK1, BL_REMARK2,
                        MCC_IND, NOMINATION, NOTIFY_P1_NM,NOTIFY_P1_ATTN , NOTIFY_P1_ADDR1,
                        NOTIFY_P1_ADDR2, NOTIFY_P1_ADDR3, NOTIFY_P1_ADDR4,NOTIFY_P2_NM,NOTIFY_P2_ATTN ,
                        NOTIFY_P2_ADDR1,NOTIFY_P2_ADDR2, NOTIFY_P2_ADDR3, NOTIFY_P2_ADDR4,
                        NOTIFY_P3_NM,NOTIFY_P3_ATTN , NOTIFY_P3_ADDR1,NOTIFY_P3_ADDR2, NOTIFY_P3_ADDR3,
                        NOTIFY_P3_ADDR4,CREATION_DT, ACCT_ATTN, SCC_IND, CREAT_BY, MAINT_BY
                        VALUES(     R_V_CUST_CD,R_V_ACCT_CD,R_V_CNSGE_CD,R_V_FINALDEST_CD,R_V_TPT_TYPE,
                        R_V_ACCT_NM,R_V_CUST_NM ,R_V_CNSGE_NM, R_V_CNSGE_ADDR1,R_V_CNSGE_ADDR2, R_V_CNSGE_ADDR3,
                        R_V_CNSGE_ADDR4,R_V_CNSGE_ATTN,     R_V_EFFECTIVE_DT ,SYSDATE, R_V_POD_CD,R_V_DELVY_PL_CD,R_V_TRANSSHIP ,R_V_PARTSHIPMT , R_V_FREIGHT,
                        R_V_PREPAID_BY ,R_V_COLLECT_BY ,R_V_BL_REMARK1 ,R_V_BL_REMARK2,R_V_MCC_IND,
                        R_V_NOMINATION,R_V_NOTIFY_P1_NM, R_V_NOTIFY_P1_ATTN, R_V_NOTIFY_P1_ADD1, R_V_NOTIFY_P1_ADD2,
                        R_V_NOTIFY_P1_ADD3, R_V_NOTIFY_P1_ADD4, R_V_NOTIFY_P2_NM, R_V_NOTIFY_P2_ATTN, R_V_NOTIFY_P2_ADD1,
                        R_V_NOTIFY_P2_ADD2, R_V_NOTIFY_P2_ADD3, R_V_NOTIFY_P2_ADD4, R_V_NOTIFY_P3_NM, R_V_NOTIFY_P3_ATTN,
                        R_V_NOTIFY_P3_ADD1, R_V_NOTIFY_P3_ADD2, R_V_NOTIFY_P3_ADD3, R_V_NOTIFY_P3_ADD4,
                        SYSDATE,R_V_ACCT_ATTN,R_V_SCC_IND,R_V_USER_ID,R_V_USER_ID
                        DBMS_OUTPUT.PUT_LINE(' SI - REC -INSERTED');
         END IF;

    Hi,
    I think there is a part of the stored procedure you did not displayed in your post. I think your issue is probably due to a parsed value from java. For example when calling a procedure from java and the data type from java is different than expected by the procedure the ORA-01403 could be encountered. Can you please show the exact construction of the call of the procedure from within java and also how the procedure possible is provided with an input parameter.
    Regards, Gerwin

  • Help with ORA-01403: no data found please.

    First off I'd like to apologise for my lack of PL/SQL experience, what follows may seem naive, but I guess we all have to start somewhere.
    I'm trying to create a function which determines an employee's Annual Holiday Entitlement by comparing their length of service against a lookup of entitlement values. Due to the complexity of the application I'm targeting there are a number of other factors to be take into consideration, but this is the basic idea of what I want to achieve.
    I've started by taking a working SQL Server 2005 function and converted this using the translation scratch pad in SQL Developer 1.5.1 I'm now hand cranking the subtleties into the script but when I debug the code I'm getting "ORA-01403: no data found" at almost every SELECT. In fact the only successful select is from the ABS_SYSTEM_CONTROLS table. I can handle the first few failures by setting default values in the variables that I'm trying to load, but this isn't an option when it comes to selecting the DATE_OF_START from the PERSON table.
    I've sure I've probably made some fundamental error, but can't spot it myself. Any help would be most welcome.
    I've included the entire script below for your entertainment ;-)
    Thanks
    Phil.
    create or replace
    function mygetannualholidayentitlement
    ( v_empNo in varchar2
    , v_inputDate in DATE
    ) return number as
       -- Declare variables here
       v_entitlement FLOAT(53);
       v_holidayPlan VARCHAR2(20);
       v_contServiceOption VARCHAR2(255);
       v_postNo CHAR(16);
       v_lengthOfService NUMBER(10,2) ; -- Need to give this a default value else the CURSOR (below) won't initialise.
       v_empStartDate DATE;
       -- Load up our loacal variable for each row in the loop and the final value is the one we want.
       v_selectedLOF FLOAT(53);
       v_selectedDateEffective DATE;
       v_selectedAmount FLOAT(53);
       v_effectiveDate DATE;
       -- Cursor declaration
       -- Holiday plan details are also keyed on DATE_EFFECTIVE.  Need to identify which row is active as at our @effectiveDate.
       CURSOR holDefCursor
         IS SELECT length_of_service,
       date_effective,
       amount
         FROM holiday_plan_def
          WHERE hplan_code = v_holidayPlan
         AND length_of_service < v_lengthOfService
         ORDER BY date_effective ASC,
       length_of_service ASC;
    BEGIN
       -- Initialise variables --
       -- truncate any hours/Mins & secs from effective date
       v_effectiveDate := trunc(v_inputdate);
       v_entitlement := 0;
       v_contServiceOption := 0;
       v_lengthOfService := 0;
       BEGIN
       SELECT HPLAN_CODE
         INTO v_holidayPlan
         FROM APPT_HOLIDAY_BALANCE
          WHERE emp_no = v_empNo
                  --          post_no = @postNo and
                  AND ( v_effectiveDate BETWEEN HOLIDAY_YEAR_START AND HOLIDAY_YEAR_END );
       EXCEPTION
       WHEN NO_DATA_FOUND THEN
          v_holidayplan:=NULL;
       WHEN OTHERS THEN
           raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
       END;
       -- Still no hoildayPlan? Then use the default plan code from ABS_SYSTEM_CONTROLS.
       IF v_holidayPlan IS NULL THEN
          SELECT HPLAN_CODE
            INTO v_holidayPlan
            FROM ABS_SYSTEM_CONTROLS ;
       END IF;
       BEGIN
        SELECT OPTION_VALUE
          INTO v_contServiceOption
          FROM PS_OPTIONS
           WHERE OPTION_NAME = 'CONTINUOUS_SERVICE_OPTION';
       EXCEPTION
       WHEN NO_DATA_FOUND THEN
          v_contServiceOption := 'N' ;
       WHEN OTHERS THEN
           raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
       END;
       IF v_contServiceOption = 'Y' THEN
       BEGIN
          -- Need to take into account the employees CONTINUOUS_SERVICE_DATE when calculating length of service
          BEGIN
          SELECT CONTINUOUS_SERVICE_DATE
            INTO v_empStartDate
            FROM person
             WHERE emp_no = v_empNo;
          EXCEPTION  
            WHEN NO_DATA_FOUND THEN
              v_empStartDate := NULL;
            WHEN OTHERS THEN
              raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
          END;
          -- If we can't get a CONTINUOUS_SERVICE_DATE we will fall back to PERSON.DATE_OF_START
          IF v_empStartDate IS NULL THEN
          BEGIN
             SELECT DATE_OF_START
               INTO v_empStartDate
               FROM PERSON
                WHERE emp_no = v_empNo;
          EXCEPTION  
            WHEN OTHERS THEN
              raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
          END;
          END IF;
       END;
       ELSE
       BEGIN
          -- Need to use employees DATE_OF_START when calculating length of service
          SELECT DATE_OF_START
            INTO v_empStartDate
            FROM PERSON
             WHERE emp_no = v_empNo;
       END;
       END IF;
       -- Now we can get length of service
       v_lengthOfService := sqlserver_utilities.datediff('MONTH', v_empStartDate, v_effectiveDate) / 12.00;
       OPEN holDefCursor;
       FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
       WHILE ( sqlserver_utilities.fetch_status(holDefCursor%FOUND) = 0 )
       LOOP
          BEGIN
             IF v_selectedDateEffective < v_effectiveDate THEN
                v_entitlement := v_selectedAmount;
             END IF;
             -- Get the next value.
             FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
          END;
       END LOOP;
       CLOSE holDefCursor;
       -- Return the result of the function
       RETURN v_entitlement;
    END;Edited by: user4395499 on 27-Oct-2008 04:04
    Edited by: user4395499 on 27-Oct-2008 04:05
    Edited by: user4395499 on 27-Oct-2008 07:10

    Your code is extremely procedural - whilst you could ultimately get it to work like this, it is not the most efficient way of doing it.
    You should think about reducing your code to one sql statement if at all possible - this reduces the amount of context switching that needs to take place (eg. Going from PL/SQL to SQL back to PL/SQL to SQL, etc) and is usually much easier to maintain and test. You could do this by joining the various tables together, (and you might want to think about using nvl() to combine the two queries on the PERSON table!).
    Also, you've labelled your parameters "v_" and your variables "v_" ... common convention uses "p_" for parameters, to allow for easy distinction between parameters passed in and variables declared during the course of the procedure/function.
    As to the char() defined column - is there any chance that you could change that? As you've found out, chars are usually not a good datatype to use! Storing numbers in a char/varchar2 column is a no-no too, as you then run the risk of having invalid numbers stored in the column.

  • NEED HELP IN CONFLICT HANDLER ERROR ORA-01403: no data found

    Hi All,
    I am using Oracle Streams to replicate the data...
    I need to update the records on the destination with some particular condition like if USER_COUNTRY = 'XXX' then the data need to be updated in the destination side else skip ...
    I wrote the procedure ..below .. the data is not replicating and found the below error from dba_apply_error..
    ORA-01403: no data found
    ORA-06512: at "SYS.LCR$_ROW_RECORD", line 419
    Table called history_row_lcrs is created in the strmadmin to store the lcr values...
    CREATE OR REPLACE PROCEDURE proc_test(in_any sys.anydata)IS
    lcr sys.lcr$_row_record;
    rc pls_integer;
    v_type varchar2(20);
    col_1 sys.anydata;
    lcr_usercountry varchar2(20);
    TRANS varchar2(20);
    skip_routine Exception;
    BEGIN
    rc:=in_any.GetObject(lcr);
    v_type:=lcr.get_command_type();
    col_1:=lcr.get_value('NEW','USER_COUNTRY');
    rc:=col_1.GetVarchar2(lcr_usercountry);
    for x in ( select user_country from TEST.TESTREP1
    where USER_COUNTRY=lcr_usercountry)
    Loop
    IF (x.USER_COUNTRY = 'XXX')
    THEN
    insert into strmadmin.history_row_lcrs VALUES (SYSDATE, lcr.GET_SOURCE_DATABASE_NAME(), lcr.GET_COMMAND_TYPE(),
    lcr.GET_OBJECT_OWNER(), lcr.GET_OBJECT_NAME(), lcr.GET_TAG(), lcr.GET_TRANSACTION_ID(), lcr.GET_SCN(),
    lcr.GET_COMMIT_SCN,lcr.GET_VALUES('old'), lcr.GET_VALUES('new', 'n'));
    lcr.EXECUTE(true);
    ELSE
    Raise Skip_routine;
    END IF;
    END Loop;
    Exception
    when skip_routine Then
    null;
    END;
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'TEST.TESTREP1',
    object_type => 'TABLE',
    operation_name => 'UPDATE',
    error_handler => false,
    user_procedure => 'STRMADMIN.PROC_TEST',
    apply_database_link => NULL,
    apply_name => NULL);
    END;
    Please try to help me if am doing something wrong...because I need to update only one colums am using DML_HANDLER instead of SET_UPDATE_CONFLICT_HANDLER...
    Any other inputs are also appreciated...
    Thanks In Advance and appreciate for the quick reply...

    I fired the query, am not getting any output from dbms_output.put_line('..|USER_COUNTRY..');
    Is that no data is reading or may be any reason else..
    in this table store_id is the primary key ..
    SQL> set serveroutput on
    SQL> CREATE OR REPLACE PROCEDURE test(in_any sys.anydata) IS
    2 lcr sys.lcr$_row_record;
    3 rc pls_integer;
    4 v_type varchar2(20);
    5 col_1 sys.anydata;
    6 col_2 sys.anydata;
    7 lcr_usercountry varchar2(20);
    8 lcr_storeid number;
    9 TRANS varchar2(20);
    10 store_id number;
    11 USER_COUNTRY varchar2(20);
    12
    13 BEGIN
    14 rc:=in_any.GetObject(lcr);
    15 v_type:=lcr.get_command_type();
    16 col_1:=lcr.get_value('NEW','USER_COUNTRY');
    17 rc:=col_1.GetVarchar2(lcr_usercountry);
    18 col_2:=lcr.get_value('NEW','STORE_ID');
    19 rc:=col_2.getnumber(lcr_storeid);
    20 select user_country into user_country from dev03.testrep1 where user_country=lcr_usercountry and store_id=lcr_storeid;
    21 dbms_output.put_line('---------||USER_COUNTRY ||-----------');
    22 END;
    23 /
    Procedure created.
    Thanks for your help ....

  • Error in AR_INVOICE_UTILS.validate_tax_exemption ORA-01403: no data found

    Hi All,,
    --API - AR Invoice (Transaction) Creation
    CREATE OR REPLACE procedure APPS.xxx_ar_invoice_api
    is
    l_return_status varchar2(1);
    l_msg_count number;
    l_msg_data varchar2(2000);
    l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type;
    l_trx_header_tbl ar_invoice_api_pub.trx_header_tbl_type;
    l_trx_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
    l_trx_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
    l_trx_salescredits_tbl ar_invoice_api_pub.trx_salescredits_tbl_type;
    l_cust_trx_id number;
    --l_batch_id              number;
    --l_batch_id              number;
    BEGIN
    begin
    MO_GLOBAL.SET_POLICY_CONTEXT('S',85);
    end;
    fnd_global.apps_initialize(1153,50642,222);
    l_batch_source_rec.batch_source_id := 1002;
    l_trx_header_tbl(1).trx_header_id := 5555;
    l_trx_header_tbl(1).trx_date := sysdate;
    l_trx_header_tbl(1).trx_currency := 'INR';
    l_trx_header_tbl(1).cust_trx_type_id := 1;
    l_trx_header_tbl(1).bill_to_customer_id := 24059;
    l_trx_header_tbl(1).term_id := 1000;
    l_trx_header_tbl(1).finance_charges := 'Y';
    -- l_trx_header_tbl(1).status_trx := 'OP';
    -- l_trx_header_tbl(1).printing_option := 'NOT';
    --l_trx_header_tbl(1).reference_number            :=  '1111';
    l_trx_lines_tbl(1).trx_header_id := 5555;
    l_trx_lines_tbl(1).trx_line_id := 501;
    l_trx_lines_tbl(1).line_number := 1;
    l_trx_lines_tbl(1).inventory_item_id := 10008;
    --l_trx_lines_tbl(1).description              :=  'TUBRO 100 SAE 20W40 - 5 * 20 LTR Carton;
    l_trx_lines_tbl(1).quantity_invoiced := 10;
    l_trx_lines_tbl(1).unit_selling_price := 12; --Price
    l_trx_lines_tbl(1).uom_code := 'Nos';
    l_trx_lines_tbl(1).line_type := 'LINE';
    -- l_trx_dist_tbl(1).trx_dist_id := 501;
    --l_trx_dist_tbl(1).trx_line_id               :=  501;
    --l_trx_dist_tbl(1).ACCOUNT_CLASS             := 'REV';
    --l_trx_dist_tbl(1).percent                   := 100;
    --l_trx_dist_tbl(1).CODE_COMBINATION_ID       := 1012;
    --Here we call the API to create Invoice with the stored values
    AR_INVOICE_API_PUB.create_invoice
    (p_api_version => 1.0
    --,p_commit => 'T'
    ,p_batch_source_rec => l_batch_source_rec
    ,p_trx_header_tbl => l_trx_header_tbl
    ,p_trx_lines_tbl => l_trx_lines_tbl
    ,p_trx_dist_tbl => l_trx_dist_tbl
    ,p_trx_salescredits_tbl => l_trx_salescredits_tbl
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data
    dbms_output.put_line('Created:'||l_msg_data||l_return_status);
    IF l_return_status = fnd_api.g_ret_sts_error OR
    l_return_status = fnd_api.g_ret_sts_unexp_error THEN
    dbms_output.put_line(l_return_status||':'||sqlerrm);
    Else
    dbms_output.put_line(l_return_status||':'||sqlerrm);
    If (ar_invoice_api_pub.g_api_outputs.batch_id IS NOT NULL) Then
    Dbms_output.put_line('Invoice(s) suceessfully created!') ;
    Dbms_output.put_line('Batch ID: ' || ar_invoice_api_pub.g_api_outputs.batch_id);
    Dbms_output.put_line('customer_trx_id: ' || l_cust_trx_id);
    Else
    Dbms_output.put_line(sqlerrm);
    End If;
    end if;
    commit;
    End;
    exec xxx_ar_invoice_api;
    when im running this im getting error " Error in AR_INVOICE_UTILS.validate_tax_exemption ORA-01403: no data found" pls send me solution

    Pls mention you app/db and OS version.
    Please see if below MOS notes helps:-
    LNS: Billing Fails With Error In AR_INVOICE_UTILS.validate_tax_exemption ORA - 01403 no data. [ID 797974.1]
    Oracle Receivables Invoice API: Known Issues and Patches [ID 1306471.1]
    Thanks,
    JD

  • Urgent: ORA-01403: no data found Error during Order Import

    Hi Experts,
    I 'am performing order import by populating the order interface tables and then running the order import concurrent program. I 'am encountering the following error while running the order import program:
    No. of orders failed: 1
    "*ora-01403: no data found in package oe_order_pvt procedure lines*"
    Can anyone please provide some pointers on why this is occurring and how this can be overcome. Any pointers on this will be immensely helpful.
    Thanks,
    Ganapathi

    Hi Nagamohan,
    Thanks for your response. I tried calling mo_global.set_policy_context('S', <org_id>) before invoking the concurrent program using fnd_request.submit_request(...); But, this still does n't seem to prevent the No data found issue.
    One more thing that I noticed is, this is happening while importing the customer along with the order. I 've ensured that I use the same org_id for the customer data as well. Can you please let me know whether there is anything else that I should check for.
    Thanks,
    Ganapathi

  • Unable to open SO Form - ORA-01403: No data found error

    Hi All,
    I have created a new OU, a new INV org & sub-inventories under it in the Vision Instance 11.5.10.2. I have linked this OU to the existing LE - Vision Operation & SOB - Vision Operations.
    Then, I have created a new OM responsibility just like OM SuperUser responsibility & have set the MO: Operating Unit profile option to the newly created OU at the responsibility level & finally ran the Replicate Seed Data program for this OU as the parameter.
    When I navigate to the new responsibility & try to open on the Sales Order form, i'm getting an error as "ORA-01403 : no data found in the Package OE_Order_Cache Procedure Load_Set_Of_Books" & the SO form doesn't open at all.
    Can anyone please guide me how to resolve this issue or is there any set-up that I'm missing? The package & package body OE_ORDER_CACHE is 'VALID' in the database.
    Regards,
    Hemanth

    Hi Hemanth,
    Hope by now ur issue is resolved.
    If not pls check the following.
    Pls check all the profile options
    GL set of books
    Mo operating unit
    These are mandatory.
    Apart from that check whether u have set the system parameters in OM and AR.
    If these parameters are not set u cannot open the sales order form.
    Pls check this.
    Regards,
    Madhu

  • Misterious "ORA-01403: no data found" error

    Hi,
    I've been searching through the forum and the Internet with no results, so I'm posting here hoping you can help me.
    Here is the situation: I had a page 30 with a tree branching to a form on a view.This worked fine until one day that suddenly, we got the "ORA-01403: no data found" error when loading the page. I guess that's normal, since the form shows the data filtered in the tree (in the tree we click on an element and pass its ROWID to the form), and when we load the page no ROWID is selected. So, the first question would be, how can I manage this situation? My first option was to have a condition in the Automatic Fetch for the Form, so that it's executed only when the ROWID item is not null. It worked a couple of times. After a while, it crashed again.
    Tired of trying things, we decided to copy this page 30 to another page (page #80). Surprisingly, page #80 worked meanwhile #30 crashed. And they are completely the same, the data has not changed either.
    Could it be that page #30 somehow is corrupted? It's really strange that the same exact copy of the page works with one ID but not with another one.
    Has someone experienced this situation? it makes me feel like the app is unsecure and unstable. Any ideas, please?
    Apex version: 4.1.1 on APEX listener.
    Thanks,
    Elena.

    fac586 wrote:
    Elena.mtc wrote:
    Thanks for your response. The form is a single row (a form on a table or view). Here is what I've found out thanks to your tips:
    It affects to all the three users that I have access with.Try it with a new user that has never accessed the page before.
    I used the debug mode (new to me, so I'm kind of slow on this, still) and wrote an exception message on the Automatic Fetch Row and I managed to know the ROWID that the fetch process is using in the where clause. Of course this ROWID does not exist in the table, so the first question that comes to my mind is "how come and from where is the page getting this ROWID?". I don't know and can't comment because I can't see the app. ;-)
    If the ROWID is stored in an item, check the Maintain session state property isn't set to Per User.I changed this and seemed to work. But it crashed later. I made a computation process to set to null the rowid's when loading the page. After reset, I deleted the computations (due to application functionality) and it worked. However, I do not trust this page anymore. So we created a new fresh app and copied this page. Luckily we are on development environment :)
    >
    So, I made a computation to initialize to null the item that saves the ROWID, and now it worked.
    This page that I'm testing on is #30, but the valid page is #80 (it has changes made on the look and feel of the page). So, I deleted page #30, and copied page #80 (which works perfectly) into #30. And it crashes again (obvius, since it doesn't have the computation that gives null to the rowid item). What's "interesting" is that I still see the exception message I wrote in the older version of page #30. So, it seems that some values need to be purged and that the delete is not clean, but how? I'm not entirely clear on what you've been doing there, but it does indeed all sound rather odd.
    I suspect that you wouldn't be able to reproduce this problem on apex.oracle.com. However, it would probably be helpful if you could upload the app and provide developer credentials to the workspace so we could see how it works and if there's anything obvious (or not) that might cause this problem.Unluckily I cannot do this. Thank you anyway for the help, it's hard to explain when something so weird happens.
    Thanks!
    Elena.

  • ORA-01403 No DATA FOUND Error

    Hi all,
    I have a Select Statement and when there is no record returned by the select I have the following error :
    ORA-01403 NO DATA FOUND. Is there a parameter or something I can change to avoid this error to occure ?
    Any help will be appreciated.
    Kind regards.
    Sébastien.

    The following query returns no row and an Exception ORA-01403 NO DATA FOUND occurs when I execute the statement.
    OPEN curs_Dealers FOR
    Select DD.DealerID, DEDP.FullName
    FROM D_Dealer DD, D_EditionDealerParticipation DEDP, T_LAnguage TL
    WHERE DEDP.FairEditionID = FairEditionID_ AND
    DEDP.DealerID = DD.DealerID AND
    DD.LanguageID = TL.LanguageID AND
    TL.LanguageTranslationID = LanguageID_
    ORDER BY FullName;
    The following query does not return any result either and there is no ORA 01403 NO DATA FOUND Exception thrown.
    It just returns an empty cursor.
    OPEN curs_Object FOR
    SELECT TOb.Title, DO.EntityID, DO.ObjectID
    FROM D_Object DO, T_Object TOb, D_Dealer DD
    WHERE DO.ObjectID = TOb.ObjectID AND
    TOb.LanguageID = Language_ID AND
    DO.DealerID = DD.DealerID AND
    DD.SiteID = Site_ID
    ORDER BY TOb.Title;
    Do you have any idea why those query does not returns the same thing?
    I'm using Oracle 10G
    Regards.

  • ORA-01403 NO DATA FOUND ERROR AFTER SELECTING PORTAL LINK TO CALL FORM

    I have a portal application link that I use to call a form. The field on this
    form gets populated based on a bind variable that is passed in by the link.
    This was working 2 weeks ago but now when I click on the link to call the form
    I am receiving the following error "AN UNEXPECTED ERROR OCCURRED ORA-01403 - NO
    DATA FOUND". This happens in more than one application where I set this type
    of link to call a form. Anyone have any ideas?!!

    Hi Andy,
    Thank you very much for your time!
    The fields in the form are all right. The fields get filled in perfectly in most of the cases, only those few rows don't :(
    However, now that you wrote of the process of row fetching, I think that maybe I have an idea of what is happening. My table has two primary keys (two fields together make the primary key, I don't know how it's called in English), one of them is a date. (I know that this is quite a bad practice, but, much to my regret, I cannot change it.) Now, this date is in YY-MON-DD format, which is used by my language.
    One of this dates is from 1800's. As my report shows it, the year gets truncated to the last two character. APEX passes this value into the field of the form using varchar2, and when it tries to cast it back to YY-MON-DD format, then it supposes it's from 1900's instead of 1800's. With 19xx however it doesn't find my field.
    Does this sound logical? It seems logical to me, but I am a beginner... :(
    Still, if this is the core of the problem, it's most possibly not the only problem, because I have dates from 19xx which can't identify their rows... But I am suspicious because of these date things. If you have any idea then please let me know.
    Thanks,
    Eszter

  • ORA-01403: no data found error (given by edit link of APEX-made form)

    Hello!
    I am a newbie in apex, so please forgive me if my question is stupid or obvious. I got a bit confused because of a problem, and I really hope that you professionals can give me some clues of where could I begin the elimination of this error.
    I made a report and a form in another page with APEX's tool Add Form/Report and Form. The report shows a full table, and the rows of the table are editable. However, I have rows which I can't edit because APEX gives me the following error:
    ORA-01403: no data found
    Error Unable to fetch row.
    Not all rows do this, but I have a few that do. Of course the report shows them, so I think they must exist. I didn't change anything special on the APEX-made items or processes.
    I thought that the problem could be with my data, but I couldn't see anything weird in that rows.
    Does anyone have an idea of what can this be caused by? I have APEX 2.1.0.00.39.
    Thanks,
    Eszter

    Hi Andy,
    Thank you very much for your time!
    The fields in the form are all right. The fields get filled in perfectly in most of the cases, only those few rows don't :(
    However, now that you wrote of the process of row fetching, I think that maybe I have an idea of what is happening. My table has two primary keys (two fields together make the primary key, I don't know how it's called in English), one of them is a date. (I know that this is quite a bad practice, but, much to my regret, I cannot change it.) Now, this date is in YY-MON-DD format, which is used by my language.
    One of this dates is from 1800's. As my report shows it, the year gets truncated to the last two character. APEX passes this value into the field of the form using varchar2, and when it tries to cast it back to YY-MON-DD format, then it supposes it's from 1900's instead of 1800's. With 19xx however it doesn't find my field.
    Does this sound logical? It seems logical to me, but I am a beginner... :(
    Still, if this is the core of the problem, it's most possibly not the only problem, because I have dates from 19xx which can't identify their rows... But I am suspicious because of these date things. If you have any idea then please let me know.
    Thanks,
    Eszter

  • ORA-01403: no data found error hile inserting into a table

    Hi,
    I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
    Please someone help me. Below is the code.
    CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
    IS
    BEGIN
       IF  t_array.count> 0 THEN
        FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
        FOR i IN t_array.FIRST..t_array.LAST
        LOOP
            INSERT INTO XXDL_TEST
            VALUES(t_array(i).name )
      END LOOP;
    END IF;
    EXCEPTION
      WHEN OTHERS THEN
        FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
    END;Thanks
    Alaka

    It looks like your Array is sparsely populated:
    SQL> DECLARE
      2    TYPE l_tab_type IS TABLE OF VARCHAR2(10)
      3      INDEX BY BINARY_INTEGER;
      4    l_tab l_tab_type;
      5  BEGIN
      6    l_tab(1) := 'A';
      7    l_tab(2) := 'B';
      8    l_tab(3) := 'C';
      9    FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
    10      dbms_output.put_line(l_tab(i));
    11    END LOOP;
    12  END;
    13  /
    A
    B
    C
    PL/SQL procedure successfully completed.
    SQL>
    SQL> DECLARE
      2    TYPE l_tab_type IS TABLE OF VARCHAR2(10)
      3      INDEX BY BINARY_INTEGER;
      4    l_tab l_tab_type;
      5  BEGIN
      6    l_tab(1) := 'A';
      7    l_tab(3) := 'B';
      8    l_tab(4) := 'C';
      9    FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
    10      dbms_output.put_line(l_tab(i));
    11    END LOOP;
    12  END;
    13  /
    A
    DECLARE
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
    You should also be using the FORALL syntax with INDICES OF. Check out The Docs

Maybe you are looking for

  • My App Store is not working, My App Store is not working

    My App Store is not working

  • Third party plug in problem?

    I am using IMac 10.6 and have just upgraded from CS4 to CS5. I have been using Nik Complete Collection plug-ins. Where as in CS4 I could select the Nik plug-in under the Photo Shop Filter tool bar, in CS5 it is not showing. Also they do not show up u

  • HT204411 why is not every song available in a country?

    Hi, I am wondering about why not every song is available in every country, especially in the European Union. I mean, we are one region without real boundaries anymore. But if I get over a "boundary" like Germany and I hear a song overthere, which is

  • Getting ripped episodes of LOST on my iPod Touch

    I own season 1 of LOST and Season 3 of Rescue Me. I've recently ripped some of the files to MP4 format to place on my Touch with handbrake. I cannot get the ripped versions of these episodes to load to my Touch. They are loading fine into my iTunes l

  • Photoshop and Mac sleep problem.

    Hi everyone, I have a MacBook Pro Retina, intel i7, 8 GB of RAM, SSD, I've installed the Photoshop CC (2014) trail version, because i'm interested to buy the complete version. The problem is that if my mac goes in stop, only after the installation of