Cursor with in clause in not fetching any rows (happens rarely)

Hi Experts,
Applications: Oracle Apps 11.5.10.2
Data base version: 11.2.0.1.0
we are running concurrent programs (scheduled every day),
we obsereved one of cursor is not fetching any records (happens rarely);
please refer the cursor below.
CURSOR LCU_GET_ADJ_JN_CAT_DET IS WITH LCU_GET_ROWS_DETAILS AS(
      SELECT <columns1, columns1_1, columns1_2>
        FROM (SELECT <columns2> from table1 <conditions>            
               GROUP BY <columns>
              UNION ALL
              SELECT <columns3> from table2 <conditions>
              GROUP BY <columns>)
       WHERE (columns1_1 <> 0 OR columns1_2 <> 0)
       GROUP BY <columns>)
      SELECT *
        FROM (SELECT ROW_DET.* FROM LCU_GET_ROWS_DETAILS ROW_DET),
             (SELECT COUNT(1) TOTAL_RECORDS,
                     SUM(columns1_1) TOTAL_CLOSING_DEBIT,
                     SUM(columns1_2) TOTAL_CLOSING_CREDIT
                FROM LCU_GET_ROWS_DETAILS ROW_SUM)
       ORDER BY <columns>;

Please enable trace/debug and check the log files then.
How To Get Level 12 Trace And FND Debug File For Concurrent Programs (Doc ID 726039.1)
How to enable and retrieve FND debug log messages (Doc ID 433199.1)
Thanks,
Hussein

Similar Messages

  • Cursor with clause not fetching / retrieving any rows, happens very rarely

    Hi Experts,
    Applications: Oracle Apps 11.5.10.2
    Data base version: 11.2.0.1.0
    we are running concurrent programs (scheduled every day), we obsereved one of cursor is not fetching any records (happens rarely);
    cursor looks
    CURSOR LCU_GET_ADJ_JN_CAT_DET IS WITH LCU_GET_ROWS_DETAILS AS(
    -- followed by select (  ) --
    --ending with
    SELECT *
            FROM (SELECT ROW_DET.* FROM LCU_GET_ROWS_DETAILS ROW_DET),
                 (SELECT COUNT(1) TOTAL_RECORDS,
                         SUM(ENTERED_DR) TOTAL_CLOSING_DEBIT,
                         SUM(ENTERED_CR) TOTAL_CLOSING_CREDIT
                    FROM LCU_GET_ROWS_DETAILS ROW_SUM)
    we need total_records, total_closing_debit & total_closing_credit.
    please suggest..

    This how the cursor looks like;
    CURSOR LCU_GET_ADJ_JN_CAT_DET IS WITH LCU_GET_ROWS_DETAILS AS(
          SELECT <columns1>
            FROM (SELECT <columns2> from table1 <conditions>             
                   GROUP BY
                  UNION ALL
                  SELECT <columns3> from table2 <conditions>
                  GROUP BY )
           WHERE (columns1_1 <> 0 OR columns1_2 <> 0)
           GROUP BY )
          SELECT *
            FROM (SELECT ROW_DET.* FROM LCU_GET_ROWS_DETAILS ROW_DET),
                 (SELECT COUNT(1) TOTAL_RECORDS,
                         SUM(columns1_1) TOTAL_CLOSING_DEBIT,
                         SUM(columns1_2) TOTAL_CLOSING_CREDIT
                    FROM LCU_GET_ROWS_DETAILS ROW_SUM)
           ORDER BY NATURAL_ACCOUNT, BRANCH_CODE, TRANS_CURRENCY;

  • Sys_refcursor not fetching any data although query returns value

    hi!!!
    I am using sys_refcursor to return columns,and using below procedure to do so.Although data is there in table_1 and table_2.
    PROCEDURE test_pro(abc_date N DATE,
    cur_get_data OUT sys_refcursor
    OPEN cur_get_data
    for
    select A.col1,B.col2
    from table_1 A
    where A.dis_date=abc_date
    left outer join
    table_2 B
    on
    A.dis_date=B.dis_date;
    IF cur_get_data%rowcount=0
    then
         raise e_error;
    END if;
    EXCEPTION
         when e_error
         then
              ------no_data_found;
         when others
         then
    --------(giving SQL error with error code);
    END      test_pro;
    while running below sql in sql window of pl/sql developer fetching
    data
    select A.col1,B.col2
    from table_1 A
    where A.dis_date=abc_date
    left outer join
    table_2 B
    on
    A.dis_date=B.dis_date;
    but while testing the test_pro in test window of pl/sql developer it is
    not fetching any data and raising e_error each time
    is there any problem arising using IF cur_get_data%rowcount=0 as each time it is going to exception block..
    so can somebody please put some ideas what cud be the possible reason for this??

    Welcome to the forum!
    Unfortunatley you posted to the wrong forum. This question belongs in the SQL and PL/SQL forum.
    PL/SQL
    >
    sys_refcursor not fetching any data although query returns value
    but while testing the test_pro in test window of pl/sql developer it is
    not fetching any data and raising e_error each time
    is there any problem arising using IF cur_get_data%rowcount=0 as each time it is going to exception block..
    >
    A cursor doesn't fetch data - your code has to do that. The code you posted doesn't have any FETCH statements so no data will be fetched.
    There is no problem using 'IF cur_get_data%rowcount=0' but it will always be 0 in your code because you are not fetching any data.
    I'm guessing that you are trying to determine if there are any rows for the query. That isn't going to work since a cursor doesn't fetch rows.
    You just have to return the cursor to the caller and the caller will have to perform at least one fetch to see if there are any rows.
    If the above answers your question the just mark the question ANSWERED. Otherwise, since you have posted in the wrong forum
    1. repost the question in the SQL and PL/SQL forum
    2. Edit this post to add a link to the new thread in the other forum
    3. Mark this question ANSWERED so people will follow up in the other forum.
    Thanks.

  • Not fetching any operations of a service in VC

    HI,
    I am trying to connect to SR in CE 7.1 machine from VC 7.1. I am done with all the prerequisites   required for VC to connect to SR.
    I have defined
    1. UDDI_DESTINATION
    2. CLASSIFICATION_DESTINATION
    3. BACKEND DESTINATION.
    4. Service Registry.
    In VC when I select "Search In" in Search Panel. I selected "SERVICE REGISTRY" and System
    In order to fetch the services and their operations but it is  not fetching any operations of a service which we published in SR other than that for  default services we could see all the services and there operations in VC .
      What could be the reason? What to do for getting the operations in VC?
    Thanks
    Srikanth

    Hi,
    I experience the same problem in EhP1 NWCE 7.1 Preview (the latest fom SDN) with VC 7.1. I made the settings according to this guide: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/605303db-9d5f-2a10-e0a2-c0e1c8af9e96
    It worked fine with NWCE 7.1 SP3, but with the new CE version I get no search results for enterprise services (ES). I can open the classification dialog (Advanced Search) and browse to the service I want to use, but when I click on search it finds nothing.
    Is there a problem with the new CE version?
    Regards
    André

  • Not fetching any operations of a service

    HI,
    I am trying to connect to SR in CE 7.1 machine from VC 7.1. I am done with all the prerequisites   required for VC to connect to SR.
    I have defined
    1. UDDI_DESTINATION
    2. CLASSIFICATION_DESTINATION
    3. BACKEND DESTINATION.
    4. Service Registry.
    In VC when I select "Search In" in Search Panel. I selected "SERVICE REGISTRY" and System
    In order to fetch the services and their operations but it is  not fetching any operations of a service which we published in SR other than that for  default services we could see all the services and there operations in VC .
      What could be the reason? What to do for getting the operations in VC?
    Thanks
    Srikanth

    Resolved

  • In ical I just added new calendars to a pre-existing calendar group, I can make events with these calendars, but not reminders, any suggestions?

    in ical I just added new calendars to a pre-existing calendar group, I can make events with these calendars, but not reminders, any suggestions?

    Hi,
    Lion has changed the way reminders (todos as was) work. They now seem to need to be in a seperate calendar.
    In iCal open the File menu and select New Reminder List... and select where to put it.
    Best wishes
    John M

  • Safari 5.1 is not working with Lion. Will not open any websites. Solutions?

    Safari 5.1 is not working with Lion. Will not open any websites. Solutions?

    http://support.apple.com/kb/TS1920

  • Deploying manually CC PKG file built with CC Packager. Not using any third party deployment tool. However after each 5 installations, the PKG files corrupt and cannot be use for a 6th installation. I have to build a new PKG file using CC packager.  Why ?

    Deploying manually CC PKG file built with CC Packager. Not using any third party deployment tool. However after each 5 installations, the PKG files corrupt and cannot be use for a 6th installation. I have to build a new PKG file using CC packager.  Why ?

    http://helpx.adobe.com/creative-cloud/packager.html
    http://forums.adobe.com/community/download_install_setup/creative_suite_enterprise_deploym ent

  • Trying to access row values in a table which does not have any rows yet

    try{
                             MappedRecord importParams = recordFactory.createMappedRecord("CONTAINER_OF_IMPORT_PARAMS");
                             IFunction function1 = client.getFunctionsMetaData().getFunction(funModGetDet);
                             IStructureFactory strucFact = interaction.retrieveStructureFactory();
                             response.write("try2 :"+pnumber);
                            IRecord structure = (IRecord) strucFact.getStructure(function1.getParameter("PERNR_TAB").getStructure());
                             response.write("try111 :"+pnumber);
                             structure.setString("PERNR",pnumber);
    I am getting the following error "Trying to access row values in a table which does not have any rows yet " where PERNR_TAB is a table containing field "PERNR".
    Can anybody help me out?

    Please re-post this question in the appropriate forum. It seems to have nothing to do with Web Dynpro.

  • Mapping is done ....but it is not inserting any rows

    hi,
    Mapping is validated successfully.
    We will deploy the code in the backend by generating the code.
    When the package is created and executed It.It shows me procedure completed succesfully...But it will not insert any rows.
    I am unable to find the reason for it.Please help me in solving this.
    Thanks,
    kiran

    what is your owb version
    how many rows are there in source
    what is your filter criteria and are any rows returned through simple sql but using that filter criteria.
    what is the loading type of your target table
    the ebst way is to debug the map and find out, i wouldnt recomment using backend code to debug as the ebst option since debug facility is availabe in owb, if that doesnt work then probably you can try using the package code.
    Edited by: Darthvader-647181 on Nov 18, 2008 1:54 AM

  • How to Create a record if vo.executequery does not return any rows

    I would like to update a single record on adf form. However if the record does not exist would like to create a row and save it in the table.
    The user does not want to add a "create" button on the screen. Hence would need to add the create code if vo.execute does not return any rows...
    How to add this and where to add?

    you can have a TF router for for exists and does not exist and based on that execute transient VO and other VO.
    Add a method call activity like below to create a row in transient VO
    public Row createRow()
    ViewObjectImpl tVO = (ViewObjectImpl)getTVO();
    tVO.executeEmptyRowSet();
    Row newRow = tVO.createRow();
    tVO.setCurrentRow(newRow);
    tVO.insertRow(newRow);
    return newRow;
    }

  • Cursor with IN CLAUSE in PACKAGE

    Hi
    Hope someone can help and I'm really not sure why Oracle makes it so difficult.
    To simplify, I have a package that takes an associative table - tabStr = {a,b,c}
    as input.Based on this, it build a string variable varStr which is of type 'a','b','c'
    I need to return a ref cursor
    OPEN out_refCur for select * from tab where col in (varStr)
    If I hardcode - varStr than out_refCur return data.
    But the above does not.
    I'm open to using even tabStr but could not find any example.
    Any inputs? Please ignore syntax .... since that not the issue.
    Thanks in advance

    Declare a nested table collection in the procedure. SQL can query these and not associative arrays. Loop through the associative array copying each value into a corresponding element in the collection. Use the collection in the query. Very rough example:
    DECLARE
        TYPE aa IS TABLE OF INTEGER INDEX BY PLS_INTEGER;
        p_batch_numbers AA;  -- This would be your parameter array
        i PLS_INTEGER; -- := p_batch_numbers.FIRST;
        v_batch_numbers_coll INTEGER_TT := INTEGER_TT();  -- Type defined with CREATE TYPE
    BEGIN
        -- Sample values:
        p_batch_numbers(1) := 7369;
        p_batch_numbers(2) := 7521;
        p_batch_numbers(3) := 7839;
        -- Copy values into queriable collection:
        i := p_batch_numbers.FIRST;
        WHILE i IS NOT NULL LOOP
            v_batch_numbers_coll.EXTEND;
            v_batch_numbers_coll(v_batch_numbers_coll.COUNT) := p_batch_numbers(i);
            i := p_batch_numbers.NEXT(i);
        END LOOP;
        -- Cursor that uses the collection:
        FOR r IN (
            SELECT empno, ename FROM emp
            WHERE  empno IN
                   ( SELECT column_value
                     FROM   TABLE(v_batch_numbers_coll) )
        LOOP
            DBMS_OUTPUT.PUT_LINE(r.empno || ': ' || r.ename);
        END LOOP;
    END;
    /

  • BizTalk Server 2013 SFTP Adapter with private key - Did not poll any files

    Hello, 
    We have a requirement to connect SFTP secure site with the private key and polling files.   Initially I have
    tested BizTalk Server 2013 SFTP Adapter receiver Port using  Bitvise SSH SFTP Server tool and it was working perfectly in our local network environment( with public private key authentication).
    However when we connected to Client SFTP server with private key authentication, It successfully connected to SFTP Server but
    did not poll any files from SFTP Site.  I added only one file to SFTP Server ( 145 kb file) for testing purpose.
    However BizTalk Server 2013 SFTP Send Adapter is working well with the same configuration.
    I could not find any errors in Event viewer also.  I can download\upload file using WinSCP tool .
    So I downloaded nSoftware SFTP Adapter trial version and deployed on server. nSoftware SFTP adapter  is also working find
    without any issues for Client SFTP Site.
     This is the configuration on SFTP Receive Adapter
    This is how SFTP Server download folder permission configured. I have got this details using WinSCP tool. 
    <o:p></o:p>
    Appreciate your help on this.<o:p></o:p>
    Thanks<o:p></o:p>
    PrabathD<o:p></o:p>

    BizTalk Adapter for SFTP is where the polling logic is implemented. It is not part of the SFTP Client logic. any SFTP Client is for User Interaction and you do what you want/when you want.
    The BizTalk Receive however is for purposes of automation and the adapter polls the receive location using the credentials every polling interval to check for the files matching the filter. When it find a file, it will read and publish to message box or
    submit to pipeline for processing. Your setting the polling interval to 0 (ZERO) might actually be disabling the polling.
    Set your poll interval to a non-zero value and check the behavior.
    Regards.

  • Function 'HR_READ_INFOTYPE'  not fetching any records in rfc

    Hi All,
       We have created a custom info type 9110 , we have a wrapper RFC build around the function 'HR_READ_INFOTYPE' to read the data from it as we have a separate web dynpro ECC 6.0 system and a 4.7 back end system.
       The rfc is working correctly in the 4.7 system but when we call it from the we dynpro system it does not return any records.
       Is this a problem with the function 'HR_READ_INFOTYPE' ?
    Thanks & Regards
    Gaurav Jain

    hi check this..
    there is no problem with the function module but there may be some wrong data passing into the input of the fm ....mainly at the dates ....the date format is inportant ....otherwise it will not return any thing...

  • "Colleagues" and "In common with you" webparts do not show any userpics anymore

    Hi,
    I use the Colleagues and the in common with you webpart on our mysite and today I realised that these two webparts show only the usernames, but do not show any userpics anymore.
    Is this configuration or what might be the reason?
    Thanks
    Sven 

    Hi,
    the web part In Common with you when added on my site is not working for me at all. On sharepoint2013.
    Can you help me with the steps to get it work

Maybe you are looking for

  • Problems with using Flat Brushes in Photoshop Elements 10

    Hi, Today when I use the flat brushes to paint the colours are not flat but differant tones of the colour in the shape of the brush. Any suggestions please? Thanks, Jeff

  • New 8820 email issue

    I have a new 8820, upgraded from a previous blackberry.  How do I apply the same blackberry email address to forward to my handheld.  I can't seem to find an option to use an exisiting blackberry.net email account.

  • Tomcat, htaccess, can it be done?

    Hi all, I'm running tomcat via apache via the appropriate connector. I had a directory under a web application, which I secured using htaccess. Fine, got the password working and everything, apache correctly protected the directory itself, and html c

  • Catalog list blank on startup

    When launching LR 4.3RC, the dialog box appears with no catalogs listed.  Clicking in the blank field where the names should be makes the one under the cursor appear.  Clicking each line will eventually populate the whole list.  Is this a known bug? 

  • How QoS works in UCS

    Hi All, I configured QoS in UCS and want to know how it actually works Once I configured system classes form GUI following is the configuration found in NXOS policy-map type queuing system_q_in_policy   class type queuing class-platinum     bandwidth