ORA-01403: no data found Problem when using AUTOMATIC ROW FETCH to populate

ORA-01403: no data found Problem when using AUTOMATIC ROW FETCH to populate a form.
1) Created a FORM on EMP using the wizards. This creates an AUTOMATIC ROW FETCH
TABLE NAME - EMP
Item Containing PRIMARY KEY - P2099_EMPNO
Primary key column - EMPNO
By default the automatic fetch has a ‘Process Error Message’ of ‘Unable to fetch row.’
2) Created a HTML region. Within this region add
text item P2099_FIND_EMPNO
Button GET_EMP to submit
Branch Modified the conditional branch created during button creation to set P2099_EMPNO with &P2099_FIND_EMPNO.
If I then run the page, enter an existing employee number into P2099_EMPNO and press the GET_EMP button the form is populated correctly. But if I enter an employee that does not exist then I get the oracle error ORA-01403: no data found and no form displayed but a message at the top of the page ‘Action Processed’.I was expecting a blank form to be displayed with the message ‘Unable to fetch row.’
I can work around this by making the automated fetch conditional so that it checks the row exists first. Modify the Fetch row from EMP automated fetch so that it is conditional
EXIST (SQL query returns at least one row)
select 'x'
from EMP
where EMPNO = :P2099_EMPNO
But this means that when the employee exists I must be fetching from the DB twice, once for the condition and then again for the actual row fetch.
Rather than the above work around is there something I can change so I don’t get the Oracle error? I’m now wondering if the automatic row fetch is only supposed to be used when linking a report to a form and that I should be writing the fetch process manually. The reason I haven’t at the moment is I’m trying to stick with the automatic wizard generation as much as I can.
Any ideas?
Thanks Pete

Hi Mike,
I've tried doing that but it doesn't seem to make any difference. If I turn debug on it shows below.
0.05: Computation point: AFTER_HEADER
0.05: Processing point: AFTER_HEADER
0.05: ...Process "Fetch Row from EMP": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:EMP:P2099_EMPNO:EMPNO
0.05: Show ERROR page...
0.05: Performing rollback...
0.05: Processing point: AFTER_ERROR_HEADER
I don't really wan't the error page, either nothing with the form not being populated or a message at the top of the page.
Thanks Pete

Similar Messages

  • APEX bug:9879227 (ORA-01403: no data found error when using validations)

    Hi,
    We are getting the
    ORA-01403: no data found error
    when the APEX page has validations AND a tabular form is also present on the page.
    I did see a couple of other forum links discussing the issue (bug id: 9879227 ?? ).
    But what i want to get a confirmation on is, in which release was this bug really fixed ?
    i see the release notes of 4.0.1.00.03 claiming that it is fixed
    in the release.
    we are on 4.0.1.00.03. is this bug really solved in release 4.0.1.00.03?
    are there any known work-arounds ? i tried re-creating the report multiple times, but that did not help.
    Any suggestions or work-arounds will greatly help us.
    Regards,
    Ramakrishnan

    Ramakrishnan,
    If you are talking about getting no data found when trying to save the report then take a look at the last message in this thread:
    {message:id=9971445}
    Cheers,
    Tyson Jouglet

  • ORA-01403: no data found when calling a web service from HTMLDB

    I am working through Section 6 How to Implement a Web Service of the HTML DB 2 Day Developer tutorial. I can get the first example to work but not the second one. I am able to add the web reference and create the form and report. However, when I run the page and click submit, I get ORA-01403: no data found.
    When I test the service, this is what shows in the Message Request:
    <?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Header><namesp1:Header xmlns:namesp1="http://www.xignite.com/services/"><namesp1:Username xsi:type="xsd:string"></namesp1:Username><namesp1:Password xsi:type="xsd:string"></namesp1:Password><namesp1:Tracer xsi:type="xsd:string"></namesp1:Tracer></namesp1:Header></SOAP-ENV:Header><SOAP-ENV:Body><namesp1:ListFuturesByExchange xmlns:namesp1="http://www.xignite.com/services/"><namesp1:Exchange xsi:type="xsd:string">NYMEX</namesp1:Exchange></namesp1:ListFuturesByExchange></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Nothing shows in the Message Response.
    I have also tried to call a simple web service that I created in .NET. It exhibits the same behavior. I am able to add the reference and create the form. But when I click the submit button, I get ORA-01403: no data found.
    Windows 2000
    HTMLDB 2.0.0.00.49
    Oracle9i 9.2.0.6.0
    Any help will be greatly appreciated.

    I'm having a similar problem!, Although, distressing as it is to observe the lack of response this thread has had for 9 months, I'm still seeking help here!
    I created a web service reference according to the following WSDL : "http://OgAppExpress:[email protected]:5555/invoke/OgAdminUtils.pub:WSDL_HLR" (operation name="getSubscriberInfoByMSISDN") and a form on that web service, all of which went very nicely. But! When I ran the form, inserted the value ("3546933599") into the parameter and pressed submit.... => "ORA-01403: no data found"
    The debug action displays very limited information and sheds no light on the problem :( Multiple attempts, on recreating the project from scratch, have resulted in the same utter failure! Needless to say, this nulls the affect of my Prozac proscription....
    Is there anybody out there who can help me and defend APEX's reputation?

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

  • Process Flow Execution of Mapping results in ORA-01403: no data found

    Hi,
    When the Mapping is run standalone, it runs fine, but when run through a Process Flow, it generates ORA-01403 on a FILTER within the Mapping.
    What should be the debug steps. The RTE_ROWKEY is mentioned as 0 and does not help.
    OWB Version is 9.2.0.2.8
    - Jojo

    So, when I submit the form, the Apex error I see is:
    ORA-01403: no data found
    Error     Unable to process row of table fRQ (the debug is also posted in mail earlier)
    Thanks
    Edited by: skomar on Jan 29, 2011 5:39 PM

  • Strange problem: ORA-01403: no data found when report has a sort

    Hi,
    I have a report which behaves very strangely but only for one particular user. The report runs fine when no columns are set as sort-by in the report attributes. As soon as I try and set a column to sort (any column, it doesn't matter) this user gets the error message:
    failed to parse SQL query:
    ORA-01403: no data found
    appear where the report should be on the page. The rest of the page displays OK. No other users are affected. If I remove the sort then the report is OK for this user (unsorted though!)
    The report is a structured query with custom column headings, nothing unusual, quite basic. I have tried exporting and reimporting the page but it doesn't fix it. Same behaviour for this particular page in our test system as well.
    I could rebuild the page but I'd rather know what is wrong in case it happens to some other region.
    Thanks,
    Steve

    Steve,
    The reports engine stores the sort settings in the user preferences. This is done so that when you return to a report, it maintains the earlier sort settings. Like in your response to the HTML DB studio posting, you would keep your report sorted by "Created On" descending or ascending even when you come back another time. It's save to remove those preferences; all that's going to happen is that your users will see the report using the report's default settings the next time they go to that page. I will try to investigate this problem further, whatever additional information you can provide, will be helpful,
    Marc

  • Problem with new DB app, report+form, report works great, form says ORA-01403: no data found

    I have a new table, the PK is a varchar2(5) column, when I allow the default query in the report to do its work, I get all the expected data.  when I click on the edit icon (pencil), I get an error screen indicating ORA-01403: no data found.  I'm hosed!  This was generated by the app!  no changes were made to anything in the app, except to turn off tabs at create time.  I even left the default name.
    My ARF is hitting the right table with the PK column, but finds nothing.  I have the "success" message showing me the PK value.  What could be going on here, and how can it be addressed?  Today is the 1st time I have seen this matter.
    I'm running 4.22 as the workspace admin, I have other apps that work fine (to expectation), my browser is FF22, though I plan a downgrade to 18.  Our DB is 11.1.0.7.

    Jorge, thanks for your attention to my problem, I appreciate any insights, although there is a little clarification I can offer.  Also, if you can, please remind me the tags to use in my text that would properly set off the code snippets or prior message content?
    [you wrote]
    You said you have a "success" message showing you the PK value. Can you elaborate on this?
    The form page, under the ARF, allows for the display of a "success" message and a "failure" message.  I have seen my "success" message appear, but it didn't show my key field as a brought-back value (which I told it to include), and I think now this is not relevant any longer.  I found that there was a link on the report attributes page between #ROWID# and a P2_ROWID that was incorrect (probably from an earlier stage of dev in the app), and I changed this to my key field, and this altered the outcome of the ARF action.  This leads to ....
    [you wrote]
    Can you see the correct PK value in the URL? Does the item parameter match what you expect (correct page item and value)? Perhaps share that full URL here?
    I have expected values in my URL.  The URL does show my key value (tail end of URL underlined here):
    ../apex/f?p=120:2:7519563874482::NO::P2_VCODE:RB15
    [you wrote]
    Debug the page and see which process, item or step is actually failing. You could be running some other process on the form page and that could be what actually fails.  Treat it as if the ARF works correctly and see what else could be happening.
    I can add the detail that my 1st message was based on testing with a table where I set the PK as data type VARCHAR2, but in more testing on the actual app (whose URL piece is above) I am using a PK which is CHAR.
    The result of the debug effort is that APEX has built its own query for pulling back the row in the ARF, and it is joining on my PK field to an APEX item P_ROWID which I don't think I created.  Nor does it appear to offer me any avenue for correcting it.    debug snippet:    where "VCODE" = :p_rowid; end;

  • Error ORA-01403: no data found is not raised using jdbc

    Hy there I have a problem receiving exceptions from oracle jdbc driver.
    I have the following exception stack if i call insert on a view
    using an instead of trigger.
    ORA-01403: no data found
    ORA-04088: error during execution of trigger
    'MYUSER.MY_VIEW_INSERT'
    if I do the insert by sql worksheet.
    If I do same insert using the following driver
    dbDriver = new intersolv.jdbc.sequelink.SequeLinkDriver();
    I will receive this exception:
    java.sql.SQLException: [INTERSOLV][SequeLink JDBC Driver][ORACLE]ORA-01403: Keine Daten gefunden
    Now if I do same thing using oracle driver:
    dbDriver = new oracle.jdbc.driver.OracleDriver();
    there will no exception be raised!
    here is my code:
    public class myFrame extends Frame
    public static void main( String[] args )
    Frame myFrame = new Frame();
    DbPflege dbPanel = new DbPflege();
    Driver dbDriver = null;
    String connectString = null;
    try
    if( args.length != 0 )
    System.out.println( "main: use sequelink!" );
    connectString = "jdbc:sequelink://myServer:4003/[Oracle]";
    dbDriver = new intersolv.jdbc.sequelink.SequeLinkDriver();
    else
    System.out.println( "main: use oracle!" );
    connectString = "jdbc:oracle:thin:@myServer:1521:idb";
    dbDriver = new oracle.jdbc.driver.OracleDriver();
    DriverManager.registerDriver( dbDriver );
    dbPanel.con = DriverManager.getConnection(connectString, "user", "pwd" );
    catch( Exception ex )
    System.out.println( "main: ERROR: " + ex );
    ex.printStackTrace();
    void jBtnExecute_actionPerformed(java.awt.event.ActionEvent event)
    Statement stmt = null;
    int updateCount = -1;
    int colCount = -1;
    ResultSet rs = null;
    ResultSetMetaData rsMeta = null;
    try
    stmt = con.createStatement();
    stmt.execute( textAreaInput.getText() );
    catch( Exception ex )
    textAreaOutput.append( ex.toString() );
    thanks for your help!!!!

    Hi,
    You should run you query in sql workshop with the expected values (which are set after user clicks Save or Apply changes button) for P10_CR_BOM_CODE and P10_CR_ID.
    Also, please have an exception block in the process to catch any exception and make an appropriate Insert into some user defined error-log table. It would be better to log the P10_CR_BOM_CODE and P10_CR_ID values in case of exception.
    These might help you to figure out the cause of exception.
    Regards,
    Mangal

  • Getting - ORA-01403: no data found - When I Run expdp

    Oracle database version 11.1.0.7.0 on Windows 32-bit.
    When I run:
    expdp system schemas=vms dumpfile=data_pump_dir:vms_bjw%u.dmp logfile=data_pump_dir:vms_bjw.log parallel=2
    Connected to: Oracle Database 11g Enterprise Edition Release *11.1.0.7.0* - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-31626: job does not exist
    ORA-31637: cannot create job SYS_EXPORT_SCHEMA_01 for user SYSTEM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPV$FT_INT", line 736
    ORA-39080: failed to create queues "" and "" for Data Pump job
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPC$QUE_INT", line 1665
    ORA-01403: no data found
    I turned on tracing like this:
    1.) Set the Error Stack 1403 to know exactly which SQL is failing:-
    SQL> alter system set events '1403 trace name errorstack level 3';
    Re-ran the datapump export to reproduce the error then disable the events.
    SQL> alter system set events '1403 trace name errorstack off';
    The trace file, oddly enough, shows that this is the failing SQL:
    Error Stack Dump
    ORA-01403: no data found
    Current SQL Statement for this session (sql_id=3n58uzvnuw2hj) -----
    SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET'
    Under that, I get the call stack.
    I ran this SQL manually and I get:
    SQL> SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET';
    VALUE
    AL32UTF8
    Any ideas as to why I'm getting the ORA-01403 when I run expdp?
    Thank you

    Hello,
    Your error looks like what is descibed into the Metalink Note 345198.1.
    But this note apply to 10.1.0.4 not to 11.1.0.7.
    So, you should open an issue to My Oracle Support.
    Best regards,
    Jean-Valentin

  • ORA-01403: no data found   when displaying a value from an   array

    I have a very simple pl/sql procedure like below which gives an error
    SQL> exec p_ks2;
    BEGIN p_ks2; END;
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "KINASE.P_KS2", line 21
    ORA-06512: at line 1
    if i uncomment the for loop the procedure works ... the loop has nothing to do with my array or what i am doing after it..
    could anyone help me to understand why i need a loop like that or what i am doing wrong when i am not having the loop there.
    ---- procedure
    CREATE OR REPLACE
    PROCEDURE p_ks2 as
    TYPE mdata IS TABLE OF number INDEX BY BINARY_INTEGER;
    data1 mdata;
    k integer;
    m number;
    begin
    data1(1) := 10;
    data1(2) := 20;
    data1(3) := 30;
    data1(4) := 40;
    data1(5) := 50;
    k :=3;
    --for mm in 10..11
    --loop
    -- m := mm;
    --end loop;
    dbms_output.put_line('value of data(' || k || '): ' || data1(k));
    end;
    /

    here is what i am trying.. when i do not have the for loop it fails. when I have the for loop it works eventhough for loop is really not doing anything related to my array.
    and in 10.x both works without error.
    I noticed you have the for loop uncommented when you posted the screen. Did it work when you have commented those lines out?
    SQL> select * from v$version
    2 ;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Linux: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL> CREATE OR REPLACE
    2 PROCEDURE p_ks2 as
    3
    4 TYPE mdata IS TABLE OF number INDEX BY BINARY_INTEGER;
    5 data1 mdata;
    6 k integer;
    7 m number;
    8
    9 begin
    10 data1(1) := 10;
    11 data1(2) := 20;
    12 data1(3) := 30;
    13 data1(4) := 40;
    14 data1(5) := 50;
    15
    16 k :=3;
    17 --for mm in 10..11
    18 --loop
    19 -- m := mm;
    20 --end loop;
    21
    22 dbms_output.put_line('value of data(' || k || '): ' || data1(k));
    23
    24
    25 end;
    26 /
    Procedure created.
    SQL>
    SQL> exec p_ks2;
    BEGIN p_ks2; END;
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "KINASE.P_KS2", line 21
    ORA-06512: at line 1
    SQL>
    SQL> CREATE OR REPLACE
    2 PROCEDURE p_ks2 as
    3
    4 TYPE mdata IS TABLE OF number INDEX BY BINARY_INTEGER;
    5 data1 mdata;
    6 k integer;
    7 m number;
    8
    9 begin
    10 data1(1) := 10;
    11 data1(2) := 20;
    12 data1(3) := 30;
    13 data1(4) := 40;
    14 data1(5) := 50;
    15
    16 k :=3;
    17 for mm in 10..11
    18 loop
    19 m := mm;
    20 end loop;
    21
    22 dbms_output.put_line('value of data(' || k || '): ' || data1(k));
    23
    24
    25 end;
    26 /
    Procedure created.
    SQL> exec p_ks2;
    value of data(3): 30
    PL/SQL procedure successfully completed.
    SQL>

  • ORA-01403: no data found ---- FRM-40735: WHEN-VALIDATE-ITEM trigger raised

    Scenario: I have one Master Detail form. after entering values in master Form, Navigate to Detail form, there I have to enter more that 5000 lines, it's very tough for user to enter huge amount of data.
    Workaround: Give one button on Master form and written a cursor to populate all the 5000(relavent) number of record on detail block.
    Issue: while populating detail data block after around 3000 record detail form start showing Error as
    ORA-01403: no data found
    FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-06502.
    Need suggestion
    Code Written on find button as below
    BEGIN
              --XX customized
              if (:ADJ_IP_CTRL.DUE_DT_FROM is null OR :ADJ_IP_CTRL.DUE_DT_TO is null) then
              fnd_message.set_string('Due Date from and Due Date To Must be entered.');
              fnd_message.Show;
              raise form_trigger_failure;
              end if;
         BEGIN     
              go_block('ADJ_INV_PAY');
    clear_block(no_validate);
         for inv_rec in (
                             SELECT v.invoice_num,
              v.invoice_id,
              v.invoice_type,
              v.pay_alone,
              v.exclusive_payment_flag,
              v.payment_num,
              v.amount_remaining,
              --TO_CHAR (v.amount_remaining,fnd_currency.get_format_mask(v.currency_code, 42)) char_amount_remaining,
              TO_CHAR (v.amount_remaining,'FM999G999G999G999G999G999G999G999G990D00') char_amount_remaining,
              ap_payment_schedules_pkg.get_discount_available (
              v.invoice_id,
              v.payment_num,
              :pay_sum_folder.check_date,
              :pay_sum_folder.currency_code)
              discount_available,
              /*TO_CHAR (ap_payment_schedules_pkg.get_discount_available (
              v.invoice_id,
              v.payment_num,
              :pay_sum_folder.check_date,
              :pay_sum_folder.currency_code),
              fnd_currency.get_format_mask (v.currency_code, 42))*/
              TO_CHAR (ap_payment_schedules_pkg.get_discount_available (
              v.invoice_id,
              v.payment_num,
              :pay_sum_folder.check_date,
              :pay_sum_folder.currency_code),'FM999G999G999G999G999G999G999G999G990D00')
              char_discount_available,
              ap_payment_schedules_pkg.get_discount_date (
              v.invoice_id,
              v.payment_num,
              :pay_sum_folder.check_date)
              disc_date,
              v.always_take_disc_flag,
              v.discount_amount_available,
              v.discount_date,
              v.second_discount_date,
              v.second_disc_amt_available,
              v.third_discount_date,
              v.third_disc_amt_available,
              v.gross_amount,
              v.description,
              v.accts_pay_code_combi_id,
              v.due_date,
              v.REMIT_TO_SUPPLIER_NAME,
              v.REMIT_TO_SUPPLIER_ID,
              v.REMIT_TO_SUPPLIER_SITE,
              v.REMIT_TO_SUPPLIER_SITE_ID,
              v.RELATIONSHIP_ID,
              v.external_bank_account_id,
              ieba.bank_account_num external_bank_account_num,
              ieba.bank_account_name external_bank_account_name
              FROM ap_invoices_ready_to_pay_v v, iby_ext_bank_accounts ieba
              WHERE v.party_id = :pay_sum_folder.party_id /* and v.invoice_num like :adj_inv_pay.invoice_num||'%' */
              AND ( (:pay_sum_folder.payment_type_flag =
              'M')
              OR (:pay_sum_folder.payment_type_flag =
              'R'
              AND v.invoice_type IN
              ('CREDIT',
              'STANDARD',
              'DEBIT',
              'EXPENSE REPORT',
              'MIXED',
              'AWT'))
              OR /*Bug5948003, Bug6069211*/
              (:pay_sum_folder.payment_type_flag =
              'Q'
              /*AND (v.vendor_site_id =
              :pay_sum_folder.vendor_site_id
              OR v.invoice_type =
              'PAYMENT REQUEST')*/
              AND ( (:SYSTEM.LAST_RECORD =
              'TRUE'
              AND :SYSTEM.cursor_record =
              '1')
              OR (NVL (
              v.exclusive_payment_flag,
              'N') =
              'N'
              AND NVL (
              :parameter.pay_alone,
              'N') =
              'N'))))
              AND v.currency_code = :pay_sum_folder.currency_code
              AND v.payment_method_code = :pay_sum_folder.payment_method_code
              AND NVL (v.payment_function, 'PAYABLES_DISB') =
              NVL (:pay_sum_folder.payment_function, 'PAYABLES_DISB')
              AND v.set_of_books_id = :pay_sum_folder.set_of_books_id
              AND NVL (v.future_dated_payment_ccid, -1) =
              DECODE (:parameter.manual_fdp_site_acct_src_flag,
              'Y', NVL (:parameter.site_fdp_account_ccid, -1),
              NVL (v.future_dated_payment_ccid, -1))
              AND v.external_bank_account_id = ieba.ext_bank_account_id(+)
              AND v.due_date BETWEEN :ADJ_IP_CTRL.DUE_DT_FROM and :ADJ_IP_CTRL.DUE_DT_TO
                                  ORDER BY v.due_date, UPPER (invoice_num)          
                        --added 08apr2012 (end)
              removed 08apr2012 ORDER BY UPPER (invoice_num)
              ) loop
                   :ADJ_INV_PAY.INVOICE_NUM := inv_rec.INVOICE_NUM;
    :ADJ_INV_PAY.INVOICE_ID := inv_rec.INVOICE_ID;
    :ADJ_INV_PAY.INVOICE_TYPE := inv_rec.INVOICE_TYPE;
    :ADJ_INV_PAY.EXCLUSIVE_PAYMENT_FLAG := inv_rec.EXCLUSIVE_PAYMENT_FLAG;
    :ADJ_INV_PAY.PAYMENT_NUM := inv_rec.PAYMENT_NUM;
    :ADJ_INV_PAY.AMOUNT_REMAINING := inv_rec.AMOUNT_REMAINING;
    :ADJ_INV_PAY.DISCOUNT_AVAILABLE:= inv_rec.DISCOUNT_AVAILABLE;
    :ADJ_INV_PAY.DISC_DATE := inv_rec.DISC_DATE;
    :ADJ_INV_PAY.ALWAYS_TAKE_DISC_FLAG := inv_rec.ALWAYS_TAKE_DISC_FLAG;
    :ADJ_INV_PAY.DISCOUNT_AMOUNT_AVAILABLE := inv_rec.DISCOUNT_AMOUNT_AVAILABLE;
    :ADJ_INV_PAY.SECOND_DISCOUNT_DATE := inv_rec.SECOND_DISCOUNT_DATE;
    :ADJ_INV_PAY.SECOND_DISC_AMT_AVAILABLE:= inv_rec.SECOND_DISC_AMT_AVAILABLE;
    :ADJ_INV_PAY.THIRD_DISCOUNT_DATE:= inv_rec.THIRD_DISCOUNT_DATE;
    :ADJ_INV_PAY.THIRD_DISC_AMT_AVAILABLE := inv_rec.THIRD_DISC_AMT_AVAILABLE;
    :ADJ_INV_PAY.GROSS_AMOUNT := inv_rec.GROSS_AMOUNT;
    :ADJ_INV_PAY.ACCTS_PAY_CODE_COMBINATION_ID := inv_rec.ACCTS_PAY_CODE_COMBI_ID;
    :ADJ_INV_PAY.DUE_DATE := inv_rec.DUE_DATE;
    :ADJ_INV_PAY.REMIT_TO_SUPPLIER_NAME := inv_rec.REMIT_TO_SUPPLIER_NAME;
    :ADJ_INV_PAY.REMIT_TO_SUPPLIER_ID := inv_rec.REMIT_TO_SUPPLIER_ID;
    :ADJ_INV_PAY.REMIT_TO_SUPPLIER_SITE := inv_rec.REMIT_TO_SUPPLIER_SITE;
    :ADJ_INV_PAY.REMIT_TO_SUPP_SITE_ID := inv_rec.REMIT_TO_SUPPLIER_SITE_ID;
    :ADJ_INV_PAY.APS_EXTERNAL_BANK_ACCOUNT_ID := inv_rec.EXTERNAL_BANK_ACCOUNT_ID;               
    --               go_item ('ADJ_INV_PAY.INVOICE_NUM');
    --               EXECUTE_TRIGGER('WHEN-VALIDATE-ITEM');
              validate(record_scope);
              if form_success then
              next_record;
              end if;
              end loop;
              first_record;
         exception
                   when others then
                   raise form_trigger_failure;
              END;
    synchronize;
    END;
    Thanks
    -Krishn

    Hello Krishn,
    Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Oracle Forums FAQ
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>How to ask questions the smart way
    </ul>
    Following these simple guidelines will ensure you have a positive experience in any forum; not just this one!
    user12266683 wrote:
    Scenario: I have one Master Detail form. after entering values in master Form, Navigate to Detail form, there I have to enter more that 5000 lines, it's very tough for user to enter huge amount of data.
    Workaround: Give one button on Master form and written a cursor to populate all the 5000(relavent) number of record on detail block.
    Issue: while populating detail data block after around 3000 record detail form start showing Error as
    ORA-01403: no data found
    FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-06502.
    Need suggestion
    ORA-01403: no data found clearly indicate that you have SQL Select statement in WHEN-VALIDATE-ITEM trigger and does not handled EXCEPTION
    add exception in your select statement.
    Hope it's clear..
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.*

  • When merging workspace I get ORA-01403: no data found error in WMSYS.LT

    Hi,
    I am investigating an error in a remote system with very little info to go on apart from a stacktrace! This is what it says:
    java.sql.SQLException: ORA-01403: no data found
    ORA-06512: at "WMSYS.LT", line 6028
    ORA-06512: at line 1
    The context is an attempt to merge a child workspace into LIVE (LIVE being its direct parent).
    it is on Oracle Database 11.1.0.7.
    Can you advise what this error means? I am unable to dig deeper into it because the PL-SQL source code for WMSYS.LT is wrapped.
    thanks
    Simon

    Hi,
    Are you able to get a standard trace of the error from the remote database? ora-1403 errors can come from a number of places, so an errorstack trace is usually needed to determine the cause.
    Regards,
    Ben

  • PL/SQL function body returning SQL - report error:ORA-01403: no data found

    Hi,
    I am working on Application Express 4.0.2.00.06, and 11G database.
    I have a problem with classic report area of type - PL/SQL function body returning SQL query. Query works if I define region area as - Use Generic Column Names (parse query at runtime only), and does not when I define it - Use Query-Specific Column Names and Validate Query.
    I am getting error:
    report error:ORA-01403: no data found
    This is my query that is returned from function, and displayed with htp.p, and it works ok and returns data in SQL Developer and SQL Workshop (in Apex).
    <code>
    /* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA
    </code>
    As you can see, I even tried with workaround that I found on the previous post on the forum, and that is to put /* select 1 from dual */ to start query.
    Any help would be appriciated.

    /* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA

  • AFTER INSERT TIGGER, ora-01403: no data found error

    Hi all,
    I'm trying to create a fairly simple trigger which fires after an insert on a table.
    The trigger is based on a function, defined within a package. The function is as follows...
    FUNCTION check_contract_length (V_playerId IN NUMBER)
    RETURN BOOLEAN
    IS
    months NUMBER;
    months2 NUMBER;
    BEGIN
    SELECT months_between(contract_end, contract_start), contract_length
    INTO months, months2
    FROM player
    WHERE playerId = v_playerId;
    IF months <> months2 THEN
    RETURN (true);
    END IF;
    RETURN (false);
    END check_contract_length;The trigger operates when an insert is made on to the player table, it as defined as follows...
    CREATE OR REPLACE TRIGGER play_ins_con
    AFTER INSERT ON player
    FOR EACH ROW
    DECLARE
    isover BOOLEAN;
    BEGIN
    IF INSERTING THEN
    isover := player_constr_pkg.check_contract_length(:new.playerId);
    IF isover THEN
    RAISE_APPLICATION_ERROR(-30001, 'Contract length incorrect');
    END IF;
    END IF;
    END play_ins_con;My problem is, is that every time I try to insert a row into the player table, the trigger fires and produces a "ora-01403: no data found" error. I was under the impression that as the trigger fires after an insert, this shouldn't be a problem.
    I'm also aware that this constraint can probably be implemented using a CHECK constraint, however it would be a learning curve for me to work it out this way.
    Any help would be much appreciated!!
    Cheers guys.

    I'm also aware that this constraint can probably be implemented using a CHECK constraint,
    however it would be a learning curve for me to work it out this way.Starting out by doing stuff the wrong way only increases the learning curve when it comes to doing things the right way. A check constraint is definitely the best way of doing it. However, if you must do it with a trigger this is the way to go:
    CREATE OR REPLACE TRIGGER play_ins_con BEFORE INSERT ON player
    FOR EACH ROW
    BEGIN
        IF months_between(:NEW.contract_end, :NEW.contract_start) <> :NEW.contract_length
        THEN
            RAISE_APPLICATION_ERROR(-30001, 'Contract length incorrect');
        END IF;
    END play_ins_con;
    /Incidentally, as CONTRACT_LENGTH is wholly derivable from the other columns your table structure is obviously insufficiently normalised.
    Also, note that only errors between -20999 and -20000 are reserved for our use. Any other number may be used by Oracle for its own purposes.
    Cheers, APC

Maybe you are looking for