No data found exception: no data found:  [1299] error in Procedure

Hi all,
I am getting "no data found exception: no data found:  [1299] " in SAP HANA procedure, even if data for the corresponding plant and material is present in the respective tables.
Can any-one suggest why I am getting this and what would be the resolution of the same.
Regards
dhinesh.

Hi Dhinesh,
Ok. It seems you have some condition in your SQL and it gets fail. It is best practice to capture SQL exception in all your store procedure to avoid such errors .
Either you can capture the exception and write in a table if your procedure runs in background or simply throw the SQL exception message from dummy table.
Check exceptional handling in SAP Documentation
Thanks
Siva

Similar Messages

  • How to fetch NO DATA FOUND exception in Ref Cursor.

    In my procedure ref cursor is out parameter with returns dataset. in my proceudre
    its like...
    OPEN pPymtCur FOR
    select.....
    when I call this procedure from report to get dataset it causes NO DATA FOUND exception.
    How to fetch this exception in my oracle procedure so I can get some other data.
    Any Idea to do this?
    Edited by: Meghna on 17-Jun-2009 22:28

    Mass25 wrote:
    Correct me if I am wrong.
    So if I do something as follows in my stored proc, I do not have to check for NO_DATA_FOUND?
    OPEN my_CuRSR FOR
          SELECT DISTINCT blah blah blahmy_cursr is what I am returning as OUT param in my SP.Correct. At the point you open the cursor, oracle has not attempted any 'fetch' against the data so it won't know if there is any data or no data. that only occurs when a fetch is attempted.
    Take a read of this:
    [PL/SQL 101 : Understanding Ref Cursors|http://forums.oracle.com/forums/thread.jspa?threadID=886365&tstart=0]

  • IR report - No Data Found exception

    Hi,
    I have created one IR report in apex. I need to get the no data found exception on this report i.e. if user enters some search keywords and he is getting no data in that case want to store the searched keywords in the database for future reference that there is no data for such search criteria.
    Could anyone help me to catch the no data found exception and executing a pl-sql process for fetching the search criteria ?
    Thanks in advance!

    I have created an IR report based on collections. But still I am not able to understand where I can write a code for EXCEPTION NO_DATA_FOUND. The pl-sql code used to create a collection which we write in before header process and the actuall IR report which is build using SQL query on collection so where can I put the exception code?
    What I want is to catch no data found exception when user types something in IR report search bar and gets nothing as a search result. Can you please help me on this?
    Thanks,
    Punam

  • No Data Found Exception in bulk updates

    I am trying to catch no data found exception in bulk updates when it does not find a record to update in the forall loop.
    OPEN casualty;
    LOOP
    FETCH casulaty
    BULK COLLECT INTO v_cas,v_adj,v_nbr
    LIMIT 10000;
    FORALL i IN 1..v_cas.count
    UPDATE tpl_casualty
         set casualty_amt = (select amt from tpl_adjustment where cas_adj = v_adj(i))
         where cas_nbr = v_nbr(i);
    EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('exception')
    I get this error at the line where i have exception:
    PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
    begin case declare end exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe
    Can someone pls direct me on how to get around this?
    If I do not handle this exception, the script fails when it attempts to update a record that does not exist and the error says : no data found exception.
    Thanks for your help.
    Edited by: user8848256 on Nov 13, 2009 6:15 PM

    No Data Found isn't an exception raised when an UPDATE cannot find any records to process.
    SQL%ROWCOUNT can be used to determine the number of rows affected by an update statement, but if 0 rows are updated then no exception will be raised (it's just not how things work).
    If you post your actual CURSOR (casualty) declaration, it's quite possible we can help you create a single SQL statement to meet your requirement (a single SQL will be faster than your current implementation).
    Have you looked in to using the MERGE command?

  • No Data Found: Exception in SQL inside PL/SQL block

    Hi Friends
    I am trying to execute an SQL SELECT stmt inside a PL/SQL block. But when i execute the procedure, it gives me No Data Found Exception.
    I know it is because no row is fetched in the query, but the condition of the SELECT query i have specified is being satisfied, i have checked it by running it on the SQL prompt.
    But somehow, it is not running from inside the PL/SQL procedure.Can anybody help me out on this as to why is this happening?? I am giving my code for reference and have Highlighted the Query inside it:
    CREATE OR REPLACE procedure insert_sfdc_account
    as
    --DECLARE
    CURSOR C1 IS
    SELECT customer_code, name1, name2, name3, name4, phone_number, fax, web_address, industry_sector, customer_profile, customer_type,
    address, city, postal_code, country_key, zzcust_type, vat_code
    FROM load_cust_general
    WHERE account_group = 'ZSIT';
    v_cust_cur c1%ROWTYPE;
    -- type sales_tab is table of load_cust_sales_area%rowtype;
    v_sales_area load_cust_sales_area%ROWTYPE;
    -- v_sales_area sales_tab;
         v_salesorg varchar2(10);
         v_sales_district varchar2(10);
         v_salesoff varchar2(10);
         v_custgrp varchar2(10);
         v_salesgrp varchar2(10);
    v_type varchar2(20);
    v_nature varchar2(10);
    v_partner_code varchar2(10);
    v_parent_cust varchar2(20);
    v_credit_blk varchar2(20);
    BEGIN
    open c1;
    loop
    fetch c1 into v_cust_cur;
    exit when c1%NOTFOUND;
    for i in (SELECT customer_code, salesorg from load_cust_partner
    where customer_code = v_cust_cur.customer_code ) LOOP
    dbms_output.put_line(v_cust_cur.customer_code );
                        SELECT partner_code into v_partner_code from load_cust_partner
    where customer_code = i.customer_code and salesorg = i.salesorg and partner_function = 'Z1';
    dbms_output.put_line(v_partner_code||i.customer_code);
    SELECT salesorg, sales_district, salesoff, salesgrp, custgrp INTO v_salesorg, v_sales_district, v_salesoff, v_salesgrp, v_custgrp FROM load_cust_sales_area
              WHERE customer_code = i.customer_code and salesorg = i.salesorg;
                   dbms_output.put_line(v_salesorg||i.salesorg);
                        SELECT parent_customer INTO v_parent_cust from load_cust_hierarchy
    WHERE customer_code = i.customer_code and salesorg = i.salesorg and hierarchy_type = 'G'; dbms_output.put_line(v_parent_cust);
                        SELECT credit_block INTO v_credit_blk from load_cust_company_cod
              WHERE customer_code = i.customer_code;
    dbms_output.put_line(v_credit_blk);
    for j in (SELECT account_group, customer_type from load_cust_general
    where customer_code IN (select customer_code from load_cust_partner
                                  where partner_code = i.customer_code and salesorg = i.salesorg and partner_function = 'ZS'))
                                                      LOOP
    -- exit when j%NOTFOUND;
         dbms_output.put_line(j.account_group);
    if (j.account_group = 'ZDIS') THEN
    v_type := 'DISAC';
              v_nature := '06';
         --     EXIT ;
    else
    v_type := 'SPACC';
    v_nature := '01';
    END IF;
    dbms_output.put_line(v_type||' '||v_nature);
    END LOOP;
    INSERT INTO sfdc_account
              (SAP_ACCOUNT_ID__C, NAME, TYPE, RECORDTYPEID, PARENTID, PHONE, FAX, WEBSITE, OWNERID, MARKETING_DOMAIN__C,
    INDUSTRIAL_SECTOR__C, ABC_CLASSIFICATION__C, NAME_1__C, NAME_2__C, NAME_3__C, NAME_4__C, PAYMENT_STATUS__C,
    CUSTOMER_GROUP__C, ADDRESS_STREET__C, CITY__C, POSTAL_CODE__C, COUNTRY__C, SALES_OFFICE__C, SALESORG__C,
    SALESDISTRICT__C, SALESGROUP__C, NATURE__C, VATCODE__C)
    VALUES((i.customer_code||i.salesorg), (v_cust_cur.Name1||' '||v_cust_cur.name2), ' ', v_type, v_parent_cust,
    v_cust_cur.phone_number, v_cust_cur.fax, v_cust_cur.web_address, v_partner_code, SUBSTR(v_cust_cur.industry_sector,1,2),
    v_cust_cur.industry_sector, v_cust_cur.customer_profile, v_cust_cur.name1, v_cust_cur.name2, v_cust_cur.name3,
    v_cust_cur.name4, v_credit_blk, v_custgrp, v_cust_cur.address, v_cust_cur.city, v_cust_cur.postal_code,
    v_cust_cur.country_key, v_salesoff, v_salesorg, v_sales_district,
    v_salesgrp, v_nature, v_cust_cur.vat_code);
    end loop;
    end loop;
    CLOSE c1;
    -- Delete data from Load Table
    -- EXECUTE IMMEDIATE 'TRUNCATE TABLE load_cust_general';
    /* truncate table load_cust_partner;
    truncate table load_cust_hierarhy;
    truncate table load_cust_sales_area;
    truncate table load_cust_company_cod;
    commit;
    exception
    when others then
    raise_application_error( -20001, substr( sqlerrm, 1, 150 ) );
    END;
    Kindly Help.....
    Thanks and Regards

    Create the procedure again and execute it in SQL*Plus environment and paste the output:
    CREATE OR REPLACE procedure insert_sfdc_account
    as
    --DECLARE
    CURSOR C1 IS
    SELECT customer_code, name1, name2, name3, name4, phone_number, fax, web_address, industry_sector, customer_profile, customer_type,
    address, city, postal_code, country_key, zzcust_type, vat_code
    FROM load_cust_general
    WHERE account_group = 'ZSIT';
    v_cust_cur c1%ROWTYPE;
    -- type sales_tab is table of load_cust_sales_area%rowtype;
    v_sales_area load_cust_sales_area%ROWTYPE;
    -- v_sales_area sales_tab;
    v_salesorg varchar2(10);
    v_sales_district varchar2(10);
    v_salesoff varchar2(10);
    v_custgrp varchar2(10);
    v_salesgrp varchar2(10);
    v_type varchar2(20);
    v_nature varchar2(10);
    v_partner_code varchar2(10);
    v_parent_cust varchar2(20);
    v_credit_blk varchar2(20);
    BEGIN
    open c1;
    loop
    fetch c1 into v_cust_cur;
    exit when c1%NOTFOUND;
    for i in (SELECT customer_code, salesorg from load_cust_partner
    where customer_code = v_cust_cur.customer_code ) LOOP
    SELECT partner_code into v_partner_code from load_cust_partner
    where customer_code = i.customer_code and salesorg = i.salesorg and partner_function = 'Z1';
    SELECT salesorg, sales_district, salesoff, salesgrp, custgrp INTO v_salesorg, v_sales_district, v_salesoff, v_salesgrp, v_custgrp FROM load_cust_sales_area
    WHERE customer_code = i.customer_code and salesorg = i.salesorg;
    dbms_output.put_line('Customer_Code : '|| i.customer_code);
    dbms_output.put_line('SalesOrg : '|| i.salesorg);
    SELECT parent_customer INTO v_parent_cust from load_cust_hierarchy
    WHERE customer_code = i.customer_code and salesorg = i.salesorg and hierarchy_type = 'G';
    dbms_output.put_line('Successfully Executed SQL st. Error is somewhere else');
    SELECT credit_block INTO v_credit_blk from load_cust_company_cod
    WHERE customer_code = i.customer_code;
    for j in (SELECT account_group, customer_type from load_cust_general
    where customer_code IN (select customer_code from load_cust_partner
    where partner_code = i.customer_code and salesorg = i.salesorg and partner_function = 'ZS'))
    LOOP
    -- exit when j%NOTFOUND;
    if (j.account_group = 'ZDIS') THEN
    v_type := 'DISAC';
    v_nature := '06';
    -- EXIT ;
    else
    v_type := 'SPACC';
    v_nature := '01';
    END IF;
    END LOOP;
    INSERT INTO sfdc_account
    (SAP_ACCOUNT_ID__C, NAME, TYPE, RECORDTYPEID, PARENTID, PHONE, FAX, WEBSITE, OWNERID, MARKETING_DOMAIN__C,
    INDUSTRIAL_SECTOR__C, ABC_CLASSIFICATION__C, NAME_1__C, NAME_2__C, NAME_3__C, NAME_4__C, PAYMENT_STATUS__C,
    CUSTOMER_GROUP__C, ADDRESS_STREET__C, CITY__C, POSTAL_CODE__C, COUNTRY__C, SALES_OFFICE__C, SALESORG__C,
    SALESDISTRICT__C, SALESGROUP__C, NATURE__C, VATCODE__C)
    VALUES((i.customer_code||i.salesorg), (v_cust_cur.Name1||' '||v_cust_cur.name2), ' ', v_type, v_parent_cust,
    v_cust_cur.phone_number, v_cust_cur.fax, v_cust_cur.web_address, v_partner_code, SUBSTR(v_cust_cur.industry_sector,1,2),
    v_cust_cur.industry_sector, v_cust_cur.customer_profile, v_cust_cur.name1, v_cust_cur.name2, v_cust_cur.name3,
    v_cust_cur.name4, v_credit_blk, v_custgrp, v_cust_cur.address, v_cust_cur.city, v_cust_cur.postal_code,
    v_cust_cur.country_key, v_salesoff, v_salesorg, v_sales_district,
    v_salesgrp, v_nature, v_cust_cur.vat_code);
    end loop;
    end loop;
    CLOSE c1;
    -- Delete data from Load Table
    -- EXECUTE IMMEDIATE 'TRUNCATE TABLE load_cust_general';
    /* truncate table load_cust_partner;
    truncate table load_cust_hierarhy;
    truncate table load_cust_sales_area;
    truncate table load_cust_company_cod;
    commit;
    exception
    when others then
    raise_application_error( -20001, substr( sqlerrm, 1, 150 ) );
    END;
    SQL> set serveroutput on
    SQL> exec insert_sfdc_account;

  • No Data Found Exception

    I'm getting No Data found exception while selecting a query.
    I'm trying to insert into a table by selecting records from a table.
    I'm doing this inside a loop. So I need to continue with insertion even though i get this error( NO DATA FOUND). How can this be done?
    Any help?
    Eg.
    FOR id IN (select Emp_ID from Table A)
    Begin
    LOOP
    BEGIN
    Select COL_B INTO Var_X from Table B where COL_C = id.EMPID;
    EXCEPTION
    NO DATA FOUND ---- I need to go for insertion even though i get this error
    END
    ---- Insertion Goes here to TABLE_C
    ----- Inserting VAR_X into the TABLE_C along with other Columns
    END LOOP
    END
    Thanks
    Harshini

    What you have should work. Are you saying thet the exception handler doesn't catch the exception? If that is the case then it must be another exception. You could change the exceptiuon handler to be a when others (which will catch everything) or you could just decalre a cursor which you open, fetch from, and then close. If no data is found you won't get an exception, but your variables won't be null unless you reset them every time you go round the loop.
    Obviously the no data found exception is actually no_data_found (i.e. with underscores) but your code wouldn't compile if you missed out the underscores so you must have that right.

  • Delete record No data found exception

    Hi,
    I have a query like this in a procedure:
    Select c_on_file into v from table1 where id =pid;
    If(v =0 ) then
    Delete from table1 where id=pid;
    If passed id not exist in table1 then there is no value for the c_on_file so I am getting No_data found exception. How to overcome this?
    Here my requirement is if c_on_file =1 for the specific id I don't want to delete the record from the table else delete that record.
    Thanks

    Why don't you write something like this:
    Delete from table1
    where id = pid
    and c_on_file = 0;
    Message was edited by:
    RPuttagunta
    --zero not one.                                                                                                                                                                                                                                                                                                                                                   

  • Crystal Report 2011- SAP Data Sources: CL - no items found

    Background:
    SAP ECC 6.0 was purchased three years ago with DSD package. Only FI and SD modules are in use. Accounts download data filesfrom SAP to produce spreadsheet reports. Few user trust these numbers. We are setup as "SAP in the Cloud" model- Listening to constant user complaints, it seems SAP is broken. Interim solution: Crystal Report for everyone.
    Encouraged by Ingo Hilgefort papers and Crystal Report Forum:
    We decided to deploy Crystal Report 2011 and Business Object XI 3.1 with SP4 for our small user community. These software are installed on local XP laptop and Business Object XI 3.1 installed in the SAP server as well.
    Problem Description:
    The desktop user cannot see SAP infosets or tables contents. When connect to the data sources. After user login, she can navigate to expand the data source CL.- displays "no items found ". I can reproduce this error. Using the Crystal Report wizard and selecting various data sources such as: SAP Table, Cluster and Functions: CL, DD and FN category only DD and FN display items.
    Current Environment: SAP in the Cloud.
    SAP Server::ECC 6.0 EhP3 dual stack. Database MSSQL, OS 2008 Server, Business Object Intergration Kit 3.1, Remote Acces VPN.
    Desktop Environment: Crystal Report 2011: SP1, Business Object Xi 3.1, XP SP3
    Surprise: Clicking on either DD and FN tab inside the connector window in Crystal- it expands and displays tables and content reference but not CL.
    Questions: Do we have to move to EhP5 for the CRX 2011 to work ? What is wrong: ? Any help will be appreciated?
    This question is for Ingo H. How to convince SAP hosting company otherwise to solve our problem ? Is is desktop problem or Host side configuration ?

    Ahmad
    K900687 is Open SQL Connectivity transport and required for direct SAP tables connectivity, so you need it, but I am not sure if the warning message relevant to your problem. Sometimes warning is just a warning.
    You can see other objects in DD, but not in CL, it means the connection works. You probably do not have required authorisations to see objects.
    I would suggest to review the Authorisation section of SAP Integration Kit Installation Guide here:
    [http://service.sap.com/~sapidb/011000358700000559912010E/xi31_sp3_bip_sap_inst_en.pdf ]
    You may also check what is the differences between DD and CL in terma of authorizations.
    If you think CR 2011 is broken, then test CR 2008. Is still available for free 30-days trial download here:
    [http://www12.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx]
    , but you would need to add SAP Integration Kit to it.
    Vitaly

  • I have recently got a new replacement iPhone 4.  since I got this I have found that my data allowance is getting used up during the night while my phone is charging on the bedside table.  How an I find out what is causing this and stop it happening

    I have recently got a new replacement iPhone 4.  Since I got this I have found that my data allowance is getting used up during the night while my phone is charging on the bedside table.  How an I find out what is causing this and stop it happening?  Some nights the usage is 150 meg!

    You can not access the backup directly.
    Did you restore your replacement from this backup?
    If so then you already have everything in the backup on your device.
    If not, you can wipe the device and restore from this backup:
    Settings > General > Reset > Erase All Content & Settings
    What is it you are worried about losing that isn't already on your current device?

  • How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

  • Data type /BIC/CCABIS_COST was found in a newer version

    Hai,
    I am uploading Flat file (only two fields Act_period & account).
       In the schdule of preview, I am getting the following message "Error 8 when compiling the upload program: row 197, message: Data type /BIC/CCABIS_COST was found in a newer version.
    My excel sheet:
    Actual, Period     Account
    1371                  DEP EXP- BLDG IMPR(P
    1755                  DEP EXP- OFFICE EQUI
    154,027.10             DEP EXP- COMP HARD
    168,259.05             DEP EXP- COMP SOFT
    10                 Spare Parts (P)
    10                 Mis.Operat.Exp (P)
    129,093.87            Basic Salary -(P)
    10                 Basic Salary -(P)
    10                Overtime Wages-(P)
    10               Casual Salary-Skilled-(P)
    10              Casual Salaries Unskilled-(P)
    5,64484.99               Housing All/House Rent-(P)
    5,42443.78               Vacation Airticket-(P)
    5,54466.08               Vacation Salary-(P)
    6,35574.34               Employee Indemnity-(P)
    0               Relocation-Production
    0              Medical-(P)
    2,97550.00              Transport Allowance-(P)
    1,522.53             GOSI-(P)
    Any tips to solve this porblem?
    ****Points will be given************
    With Regards,Jaheer.

    Simply restart AWB using /NRSA1 will do the magic..
    go out the transaction RSA1 ans return to the transaction RSA1 again.
    This would help for me without restarting anything.
    else try the following :
    In case of the flat file datasource, when you assign flat file source system again, the system assign IS to the old transfer structure! Because of the same DS name.
    u can try the following :
    1. Log off the system. During the current session the system may keep deleted IO, TRs, URs etc and propose them again. Log off should clean the eleted objects.
    2. If the #1 didn't help. - Recreate an infosource with a new name. Create all other structures as needed
    else try this :
    delete Infosource - Source system assignment (with PSA tables etc.
    - activate Infosource communication structure
    - assign source system
    - create infopackage
    - load data again

  • Ever since I upgraded iPhoto to 9.5, my camcorder videos aren't all downloading properly  and I have several of the videos to say a necessary data reference could not be found.  I also can see many of the pixels on the video footage that was downloaded???

    ever since I upgraded iPhoto to 9.5, my camcorder videos aren't all downloading properly  and I have several of the videos to say a necessary data reference could not be found.  I also can see many of the pixels on the video footage that was downloaded.  Anyone have any suggestions???

    What version of iPhoto and system are you using?  Also what camera make and model are you using?
    See if you can download all of the videos to a folder on the Desktop using Image Capture and import  into iPhoto from that folder.
    OT

  • Help, just got a new hard drive installed and now my videos say, "a necessary data reference could not be found"

    Help, just got a new hard drive installed and now my videos in iPhoto say, "a necessary data reference could not be found"

    Not sure what happened but I was able to click on the movie, go to File then Reveal in Finder, then drag it to my desktop and then drag it back into iPhoto and it worked. 

  • Error -2000 a necessary data reference could not be found

    I'm trying to play a DVD movie in QuickTime. When I drag from the file and drop on top of the QuickTime icon I get this message.
    Error -2000 a necessary data reference could not be found
    I have followed the directions I found on the web site.
    In Windows Explorer, double-click the file or drag it to the QuickTime Player application icon.
    Choose File > Open and select the file.
    What is the problem? Is there no list of QuickTime error messages and what they mean? I've been looking everywhere for something that applies to me.

    Try going back to QuickTime 7.4, we've seen the same problem occur with the 7.5 update. How did you make the .mov file that plays all of the files? For us, the problem shows up with reference movies (such as that .mov) made on a Mac, but works fine if it is created on Windows.

  • Unable to found Bucket start date and bucket end date in OFSAA 6

    Hi,
    How to find the Bucket start date and bucket end date in OFSAA 6.
    I found following tables to mapped to Dim_Result_Bucket but  unable to found columns pointing to Bucket Start Date and Bucket End Date.
    Tables:
    fsi_income_simulation_buckets
    fsi_process_run_history
    fsi_time_bucket_master
    fsi_lr_irr_buckets_aux
    fsi_m_alm_process
    Kindly let me know the solution.

    Hi;
    Please check below link which could be helpful for your issue:
    https://blogs.oracle.com/ebs/entry/service_contracts_warranty_created_by
    Regard
    Helios

Maybe you are looking for