Data in payload out of sequence

Hi,
I have 10 fields between source and target but only 7 are mapped so other fields are optional and will need to be mapped later when necessary. Right now, the fields in the payloads are getting populated out of sequence. Meaning, if first field is 10 character and the data in the file for first first field is only coming with 7 chars, then the first field is taking additional 3 chars from the next field column in the data file. In the file adapter, I have simple configuration with Fields.fieldNames, Fields.lastFieldsOptional, Fields.fieldFixedLengths and Fields.fieldSeparator. How can I correct this? Do I need to make changes in the content conversion? Should I change the min-max length in data type or in the file adapter?

Hi,
Thank you for your help and advice. Here is the structure and occurrences of source structure. The target structure is same as the source structure except that field 3 and field 7 are not sending any data so I have mapped constants in the target fields.
FieldNames_DT     Complex Type                         null                    
Names1          Element               1          false                    
Fields               Element               1          false                    
Field1               Element     xsd:string     0..1          false     minLength="0"; maxLength="5"               
Field2               Element     xsd:date     0..1          false                    
Field3               Element     xsd:string     0..1          false     minLength="0"; maxLength="4"               
Field4               Element     xsd:string     0..1          false     minLength="0"; maxLength="4"               
Field5               Element     xsd:decimal     0..1          false     totalDigits="10"; fractionDigits="2"               
Field6               Element     xsd:string     0..1          false     minLength="0"; maxLength="10"               
Field7               Element     xsd:string     0..1          false     minLength="0"; maxLength="8"               
Field8               Element     xsd:string     0..1          false     minLength="0"; maxLength="2"               
Field9               Element     xsd:string     0..1          false     minLength="0"; maxLength="1"               
Field10               Element     xsd:string     0..1          false     minLength="0"; maxLength="2"

Similar Messages

  • ORA-01002 fetch out of sequence issue

    Hi,
    I am facing a weird ORA-01002 issue where I am passing the payload by opening a cursor to a separate package which has the merge statement. This fails with ORA-01002 error when there are multiple updates for a single record on target. I read through the Oracle documentation which states "MERGE is a deterministic statement. That is, you cannot update the same row of the target table multiple times in the same MERGE statement."
    My use case is such that there can be multiple updates in a day for an account and I have to maintain history for this on the target and I have a merge to do this. I am implementing SCD using triggers. What do you guys suggest to implement this solution? I need to update the same target table record multiple times in the same MERGE statement.
    Calling procedure:
    declare
    acct load_<package>.account_list;
    begin
    OPEN acct FOR
            SELECT DISTINCT<cols>
          FROM <table> where action_type='UPDATE' order by account_updatedate;
            load_<package>.<proc>(acct);
        CLOSE acct;
    end;
    Merge package/procedure:
    PROCEDURE merge_<proc(acct IN account_list)
      AS
      BEGIN
        MERGE INTO <target_table> d USING (
          SELECT DISTINCT *
          FROM TABLE(<pipelined_proc>(acct))
        ) s
        ON (<condition>   
        WHEN NOT MATCHED THEN INSERT (
          <cols>
          ) VALUES (
    <cols>      );
        COMMIT;
      END;
    Thanks,
    Vikram

    The thread title's ORA-01002: fetch out of sequence error is potentially from the merge statement restarting to get a consistent view of the data.
    It looks like "acct" is a REF CURSOR. If the merge decides to restart, the cursor cannot be restarted, so you will get a ORA-01002: fetch out of sequence error. That's a problem with using a ref cursor inside a SQL statement that modifies data - the statement can restart.
    E.g. see AskTom: Ask Tom &amp;quot;BEFORE Triggers Fired Multiple Times &amp;quot;
    The current URL for the statement
    If the triggering statement of a BEFORE statement trigger is an UPDATE or DELETE statement that conflicts with an UPDATE statement that is running, then the database does a transparent ROLLBACK to SAVEPOINT and restarts the triggering statement. The database can do this many times before the triggering statement completes successfully. Each time the database restarts the triggering statement, the trigger fires. The ROLLBACK to SAVEPOINTdoes not undo changes to package variables that the trigger references. To detect this situation, include a counter variable in the package.
    is PL/SQL Triggers

  • Line Item numbers out of sequence in C_T_DATA

    We are using several different data sources within include ZXRSAU01.
    For one of them, we have assigned a custom structure ZOXNRD0112 to C_T_DATA which contains two different fields for Line Item number. One of these fields is based on FAGLFLEXA-DOCLN and the other is based on BSEG-BUZEI.
    The values in these two fields should agree on each record contained within C_T_DATA, but occasionally we get a situation where they do not. BUZEI is always correct when compared to the Billing Document, but DOCLN will be out of sequence.
    For example:
    DOCLN BUZEI
    000001 001
    000003 002
    000002 003
    DOCLN & BUZEI both arrive already populated in the C_T_DATA table.
    We simply use the values as keys to read FAGLFLEXA and BSEG, the values in DOCLN & BUZEI themselves are not derived.
    They are there when entering the user exit ZXRSAU01, and they are still there when processing leaves ZXRSAU01.
    I donu2019t have a lot of experience in BI, and am not familiar with how C_T_DATA receives itu2019s data.
    Iu2019m trying to look back further in the processing to find where C_T_DATA is populated and draw some conclusions from that. I have asked a couple of our FI people to examine the documents involved to see what could be going on there.
    We are on ECC 6.0, and BI version 7.0.
    Has anyone out there run into this kind of problem before?

    Hello Dan,
    Welcome to SDN!
    The program ZXRSAU01 is an exit program for transactional DataSource extraction. Whenever the DataSource pulls data from ECC, it usually divides the data into several data packages, and for every package it will comes to that program. The internal table C_T_DATA contains all records of the data package.
    We don't use sequence to link data together, but use fields mappings. For example, I want to read FAGLFLEXA-DOCLN, I first need to find a key field say XXXX which exist both in C_T_DATA and FAGLFLEXA. Then use below statement to read FAGLFLEXA:
    loop at c_t_table into ls_structurename.
    select single DOCLN
        from FAGLFLEXA
        into ls_structurename-docln
      where XXXX = ls_structurename-XXXX.
      modify c_t_table from ls_structurename.
    endloop.
    With the code we don't need to worry about sequence. And it works for either full loading or delta loading.
    Please let us know if you have any questions.
    Regards,
    Frank

  • ProC code- error ORA-1002 fetch out of sequence

    Hi,
    we have an application currntly running on an HP UX system that uses Oracle 9i database.
    the pro*C codes work fine with Oracle 9i, on the older system. however now we are migrating it to LINUX system (ORACLE 10g). in the new system we are facing issues with fetch statement
    here is how we have the code:
    the cursor statement:
    EXEC SQL DECLARE diff_cns_list CURSOR FOR
    select PREV.CNS_CODE,
    PREV.CNS_DESCRIPTION,
    PREV.CGP_CODE,
    CURR.CNS_DESCRIPTION,
    CURR.CGP_CODE
    from NCIP_CNS_LIST PREV, NCIP_CNS_LIST CURR
    where CURR.SAMPLE_DATE =
    to_date('01' || :currdate || ' 00:00','ddyymm hh24:mi')
    and PREV.SAMPLE_DATE =
    to_date('01' || :prevdate || ' 00:00','ddyymm hh24:mi')
    and PREV.CNS_CODE = CURR.CNS_CODE
    and (PREV.CGP_CODE != CURR.CGP_CODE or
    PREV.CNS_DESCRIPTION != CURR.CNS_DESCRIPTION);
    ======================
    currdate=1106 (i.e. june 2011)
    prevdate=1105 (i.e. may 2011)
    ======================
    cursor is opened and then following fetch statement is run:
    while( 1 )
    exec sql FETCH diff_cns_list INTO :prev_vcns,
    :prev_vdesc,
    :prev_vcgp,
    :curr_vdesc,
    :curr_vcgp;
    /* If no data found then exit from loop */
    if( sqlca.sqlcode == 1403 )
    break;
    else if( sqlca.sqlcode != 0 )
    vLOG_Msg(LOG_MSG_ERROR,"fniCmpNcipCnsList",
    "ORACLE error on fetching diff_cns_list %s", sqlca.sqlerrm.sqlerrmc);
    return( ERROR );
    oravarterm( prev_vcns );
    oravarterm( prev_vdesc );
    oravarterm( prev_vcgp );
    oravarterm( curr_vdesc );
    oravarterm( curr_vcgp );
    fprintf( output_fp,"'%s','%s','%s','%s','%s'\r\n",prev_vcns.arr,
    prev_vdesc.arr,
    prev_vcgp.arr,
    curr_vdesc.arr,
    curr_vcgp.arr);
    the code runs fine in the old operating system (HP UX) where oracle 9i was used.
    but fails in Oracle 10g(OS-LINUX).
    the probable reason that we found out is that:
    the fetch statement returns zero rows, that is the reason why this error is being displayed.
    but Oracle 9i seemed to work out well with this.
    we tried reducing the cursor conditions, where it fetches 3 rows. this is when is the fetch statement works fine.
    the functionality of the code is that it should work fine even with no rows selected. Is there a way we can modfy the code to work with zero rows as well.
    the error we are getting is : ORA-01002: fetch out of sequence
    ==========================
    as per what is given in Oracle sites:
    1) Fetching from a cursor after the last row has been retrieved and the ORA-1403 error returned. 2) If the cursor has been opened with the FOR UPDATE clause, fetching after a COMMIT has been issued will return the error. 3) Rebinding any placeholders in the SQL statement, then issuing a fetch before reexecuting the statement.
    ========================
    we have checked:
    1>this is not the case and ORA-1403 not returned
    2>No update statements involved , there is a insert statement which inserts data in this table
    3>i am not clear with this one.
    Could anyone please guide us through this, please?

    Note the name of this forum is SQL Developer (Not for general SQL/PLSQL questions) - so for issues with the SQL Developer tool. Please post these questions under the dedicated OCCI forum (you've posted there before).
    Regards,
    K.

  • ORA-01002: fetch out of sequence using multiple XA datasources

    Hi,
    I have a problem accessing multiple XA datasources :
    - launch an sql request on datasource 1
    - rs.next() on the resultset
    - use the data to launch another sql request on datasource 2
    After 10 iterations, the next() method throws an SQLException (ORA-01002: fetch out of sequence).
    After further investigation, I noticed that :
    - the problem doesn't occur if the same datasource is used for the 2 requests
    - if I set the fetch size to 15 for the first request, the exception is thrown after 15 iterations (but I can't use this as a workaround because the number is potentially above the million).
    Anyone experiencing the same problem ?
    Thanks in advance
    Nicolas
    Here's my configuration :
    - Weblogic 8.1 SP4
    - JDK sun 1.4.2_04 (we have the same problem with various JDKs including JRockit)
    - Oracle 10g
    - Oracle thin driver xa 10.1.0.2.0
    A JSP I use to reproduce the problem :
    <pre><%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ page import="java.util.ArrayList,
                        java.sql.Connection,
                        java.sql.PreparedStatement,
                        java.sql.ResultSet,
                        java.sql.SQLException,
                        javax.naming.InitialContext,
                        javax.naming.NamingException,
                        javax.sql.DataSource,
                        javax.transaction.UserTransaction"%>
    <%!
         public void launchTest() throws Exception {
              Connection cnx =null ;
              try {
                   getUserTransaction().begin();
                   // SQL access #1
                   cnx = getConnection("jdbc/xaDatasource1");
                   PreparedStatement stmt = cnx.prepareStatement("SELECT test_col from test_table");
                   ResultSet rs = stmt.executeQuery();
                   // iterate on resulset from SQL 1
                   int i=1;
                   while (rs.next()){ // SQL exception after 10 iterations
                        System.out.println(i + "");
                        i++;
                        // SQL access #2
                        Connection cnx2 = getConnection("jdbc/xaDatasource2");
                        // problem occurs even if we don't request
                        cnx2.close();
                        // end SQL access #2
                   getUserTransaction().commit();
              } catch (Exception e) {
                   e.printStackTrace();
                   try {
                        getUserTransaction().rollback();
                   } catch (Exception e1) {
                        e1.printStackTrace();
                        throw e;
              } finally {
                   try {
                        if (cnx != null && !cnx.isClosed())
                             cnx.close();
                   } catch (Exception e1) {
                        e1.printStackTrace();
         private UserTransaction getUserTransaction() throws NamingException {
              return (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
         private Connection getConnection(String jndiName) throws NamingException, SQLException {
              DataSource ds = (DataSource) new InitialContext().lookup(jndiName);
              return ds.getConnection();
    %>
    <%
    launchTest();
         SQL CODE :
         CREATE TABLE TEST_TABLE (     TEST_COL NUMBER(2));
         insert into test_table values(1);
         insert into test_table values(2);
         insert into test_table values(3);
         insert into test_table values(4);
         insert into test_table values(5);
         insert into test_table values(6);
         insert into test_table values(7);
         insert into test_table values(8);
         insert into test_table values(9);
         insert into test_table values(10);
         insert into test_table values(11);
    %>
    </pre>

    Nicolas Mervaillie wrote:
    Hi,
    I have a problem accessing multiple XA datasources :
    - launch an sql request on datasource 1
    - rs.next() on the resultset
    - use the data to launch another sql request on datasource 2
    After 10 iterations, the next() method throws an SQLException (ORA-01002: fetch out of sequence).
    After further investigation, I noticed that :
    - the problem doesn't occur if the same datasource is used for the 2 requests
    - if I set the fetch size to 15 for the first request, the exception is thrown after 15 iterations (but I can't use this as a workaround because the number is potentially above the million).
    Anyone experiencing the same problem ?Hi. This is a known weakness of Oracle. If the XA transactional context of a connection
    changes during a result set processing, even if it is switched back correctly, the result
    set is aborted. If the oracle driver has fetched 10 rows, that's all you get. The next
    call to next() that needs real DBMS communication will fail.
    By spec, an XA connection should be able to be swapped out and enlisted in different
    transactions at a per-call granularity, so our pools allow that by default. Try setting
    the KeepXAConnTillTxCOmplete setting in your pool.
    When a connection is put back in the pool, if it is an XA connection we will suspend
    any user tx, and test it with our own test tx, then re-enlist and re-start the user
    tx in flight. This may be the context switch that kills the oracle result set.
    Joe
    >
    Thanks in advance
    Nicolas
    Here's my configuration :
    - Weblogic 8.1 SP4
    - JDK sun 1.4.2_04 (we have the same problem with various JDKs including JRockit)
    - Oracle 10g
    - Oracle thin driver xa 10.1.0.2.0
    A JSP I use to reproduce the problem :
    <pre><%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ page import="java.util.ArrayList,
                        java.sql.Connection,
                        java.sql.PreparedStatement,
                        java.sql.ResultSet,
                        java.sql.SQLException,
                        javax.naming.InitialContext,
                        javax.naming.NamingException,
                        javax.sql.DataSource,
                        javax.transaction.UserTransaction"%>
    <%!
         public void launchTest() throws Exception {
              Connection cnx =null ;
              try {
                   getUserTransaction().begin();
                   // SQL access #1
                   cnx = getConnection("jdbc/xaDatasource1");
                   PreparedStatement stmt = cnx.prepareStatement("SELECT test_col from test_table");
                   ResultSet rs = stmt.executeQuery();
                   // iterate on resulset from SQL 1
                   int i=1;
                   while (rs.next()){ // SQL exception after 10 iterations
                        System.out.println(i + "");
                        i++;
                        // SQL access #2
                        Connection cnx2 = getConnection("jdbc/xaDatasource2");
                        // problem occurs even if we don't request
                        cnx2.close();
                        // end SQL access #2
                   getUserTransaction().commit();
              } catch (Exception e) {
                   e.printStackTrace();
                   try {
                        getUserTransaction().rollback();
                   } catch (Exception e1) {
                        e1.printStackTrace();
                        throw e;
              } finally {
                   try {
                        if (cnx != null && !cnx.isClosed())
                             cnx.close();
                   } catch (Exception e1) {
                        e1.printStackTrace();
         private UserTransaction getUserTransaction() throws NamingException {
              return (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
         private Connection getConnection(String jndiName) throws NamingException, SQLException {
              DataSource ds = (DataSource) new InitialContext().lookup(jndiName);
              return ds.getConnection();
    %>
    <%
    launchTest();
         SQL CODE :
         CREATE TABLE TEST_TABLE (     TEST_COL NUMBER(2));
         insert into test_table values(1);
         insert into test_table values(2);
         insert into test_table values(3);
         insert into test_table values(4);
         insert into test_table values(5);
         insert into test_table values(6);
         insert into test_table values(7);
         insert into test_table values(8);
         insert into test_table values(9);
         insert into test_table values(10);
         insert into test_table values(11);
    %>
    </pre>

  • ORA-01002 fetch out of sequence after suspend/resume transaction

    Environment
    - WebLogic 10.0.2.0
    - Oracle thin driver 10.2.0.2.0
    I iterate throw elements of ResultSet. During that global transaction is suspended and resumed. Then invoking of next on ResultSet caused following exception “java.sql.SQLException: ORA-01002: fetch out of sequence”.
    I found that similar problem was reported in older WLS version ORA-01002 fetch out of sequence
    Do you have any idea how I can fix it?
    Best regards,
    Adam

    OK, to get to the complete explanation, I suggest you open
    an official support case. And I'm not trying to avoid the issue,
    but fetching millions of rows out of the database to process
    them outside is the wrong way to go. I highly recommend
    DBMS-side logic in stored procedures to do the raw data processing.

  • Fetch out of sequence

    when I run report (report2.5) in C/S structure,soemtime I meet ORA-01002 : fetch ut of sequence problem, I go to another pc and try to run same report, It will not happen. Who can help me?
    Is it a problem of report programing or client PC setup or Database configure or even a reports 2.5 bugger?
    My environemnt:
    server : Window NT 4.0+sp5 HP lh6000 server
    client: Windows 95 Pentinum II/III PC
    databse: Oracle 8.0.4.3 enterprise edition
    Application : DEvelop2000 v1.5( forms V4.5, Reports V2.5)

    I seemed to be missing the initial portion of this discussion BUT
    it has been my experience that a Fetch out of sequence can be
    caused by:
    specifying a cursor with the FOR UPDATE statement,
    committing data, and then
    trying to fetch again.
    Frank Huether (guest) wrote:
    : Elbasheer (guest) wrote:
    : : Reports 2.5 and 3.0 sqlnet2.3 and even 8 , database 7.3.4.
    : The
    : : client is win95. Database reside on HP-UX 10.20. NonBlocksql
    : is
    : : taken_care_of. I did everything. I wish if I could get the
    : : source code for the reports to fix it myself.
    : Also reduce the array size.
    : Frank
    null

  • ORA-01002/ Fetch out of sequence on lazy loading

    Hello,
    We are facing an oracle SQLException (ORA-01002: fetch out of sequence)
    while we are trying to get a field (retrieved via lazy loading) from an
    object that was retrieved using a kodoquery.
    This error only occurs during performance testing under a heavy load.
    (100 concurrent users). For each thread we get a new persistencemanager
    from the factory. And we have put the multithreaded option to true.
    Can anyone help us with this problem?
    Thanks in advance,
    Kind Regards,
    Niels Soeffers
    Caused by: java.sql.SQLException: ORA-01002: fetch out of sequence
         at
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
         at
    oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at
    oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1027)
         at
    oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:291)
         at
    oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:213)
         at
    com.solarmetric.jdbc.DelegatingResultSet.next(DelegatingResultSet.java:97)
         at kodo.jdbc.sql.ResultSetResult.nextInternal(ResultSetResult.java:151)
         at kodo.jdbc.sql.AbstractResult.next(AbstractResult.java:123)
         at kodo.jdbc.sql.Select$SelectResult.next(Select.java:2236)
         at
    kodo.jdbc.meta.AbstractCollectionFieldMapping.load(AbstractCollectionFieldMapping.java:592)
         at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:521)
         at
    kodo.runtime.DelegatingStoreManager.load(DelegatingStoreManager.java:133)
         at kodo.runtime.ROPStoreManager.load(ROPStoreManager.java:79)
         at kodo.runtime.StateManagerImpl.loadFields(StateManagerImpl.java:3166)
         at kodo.runtime.StateManagerImpl.loadField(StateManagerImpl.java:3265)
         at kodo.runtime.StateManagerImpl.isLoaded(StateManagerImpl.java:1386)
         at
    com.ardatis.ventouris.domain.OntvangstReeks.jdoGetontvangstTransacties(OntvangstReeks.java)
         at
    com.ardatis.ventouris.domain.OntvangstReeks.getStatus(OntvangstReeks.java:72)
         at
    com.ardatis.ventouris.service.financien.transfer.FinancienTOAssembler.getOntvangstReeksBaseTO(FinancienTOAssembler.java:71)
         at
    com.ardatis.ventouris.service.financien.transfer.FinancienTOAssembler.getOntvangstReeksBaseTOs(FinancienTOAssembler.java:84)
         at
    com.ardatis.ventouris.service.financien.FinancienManagerImpl.getOntvangstReeksBaseTOs(FinancienManagerImpl.java:241)
         at
    com.ardatis.ventouris.service.financien.ejb.FinancienManagerBean.getOntvangstReeksBaseTOs(FinancienManagerBean.java:62)
         at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
         at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at
    com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
         at
    com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy31.getOntvangstReeksBaseTOs(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
         at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at
    com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)

    We are using Oracle 10g and have tried multiple dirvers. (classes12.jar,
    ojdbc14.jar)
    Our kodo.properties ( actually the ra.xml we supply with the kodo.rar )
    <connector>
    <display-name>KodoJDO</display-name>
    <description>Resource Adapter for integration of the Kodo Java Data
    Objects (JDO) implementation with J2EE 1.3 compliant managed
    environments</description>
    <vendor-name>Solarmetric, Inc.</vendor-name>
    <spec-version>1.0</spec-version>
    <eis-type>jdo</eis-type>
    <version>1.0</version>
    <license>
    <description>
    See http://www.solarmetric.com for terms and license conditions.
    </description>
    <license-required>true</license-required>
    </license>
    <resourceadapter>
         <managedconnectionfactory-class>kodo.jdbc.ee.JDBCManagedConnectionFactory</managedconnectionfactory-class>
    <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
    <connectionfactory-impl-class>kodo.jdbc.ee.JDBCConnectionFactory</connectionfactory-impl-class>
    <connection-interface>javax.resource.cci.Connection</connection-interface>
    <connection-impl-class>kodo.runtime.PersistenceManagerImpl</connection-impl-class>
    <transaction-support>XATransaction</transaction-support>
    <config-property>
    <description>A comma-separated list of query aggregate listeners
    to add to the default list of extensions. Each listener must implement
    the kodo.jdbc.query.JDBCAggregateListener interface.</description>
    <config-property-name>AggregateListeners</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The kodo.jdbc.meta.ClassIndicator to use by default
    for new mappings. The class indicator is responsible for tracking the
    concrete class or subclass implemented by the object stored in each row of
    a table.</description>
    <config-property-name>ClassIndicator</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>in-class-name</config-property-value>
    </config-property>
    <config-property>
    <description>The kodo.util.ClassResolver implementation that
    should be used for JDO class resolution. Defaults to a JDO spec-compliant
    resolver.</description>
    <config-property-name>ClassResolver</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>spec</config-property-value>
    </config-property>
    <config-property>
    <description>Details about various compatibiity levels for the
    current environment.</description>
    <config-property-name>Compatibility</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    <config-property>
    <description>The class name of either the JDBC java.sql.Driver, or
    an instance of a javax.sql.DataSource to use to connect to the non-XA data
    source.</description>
    <config-property-name>Connection2DriverName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The password for the user specified in
    Connection2UserName</description>
    <config-property-name>Connection2Password</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of properties to be passed to
    the non-XA JDBC Driver when obtaining a Connection. Properties are of the
    form "key=value". If the given JDBC Driver class is a DataSource, these
    properties will be used to configure the bean properties of the
    DataSource. </description>
    <config-property-name>Connection2Properties</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The URL for the non-XA data source.</description>
    <config-property-name>Connection2URL</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The username for the connection listed in
    Connection2URL.</description>
    <config-property-name>Connection2UserName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of
    com.solarmetric.jdbc.ConnectionDecorator implementations to install on all
    connection pools.</description>
    <config-property-name>ConnectionDecorators</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The class name of either the JDBC java.sql.Driver, or
    an instance of a javax.sql.DataSource to use to connect to the data
    source.</description>
    <config-property-name>ConnectionDriverName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The JNDI name of the connection factory to use for
    finding non-XA connections. If specified, this is the connection that
    will be used for obtaining sequence numbers.</description>
    <config-property-name>ConnectionFactory2Name</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
         <config-property-value>jdbc/VentourisNonXA</config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of properties used to
    configure the javax.sql.DataSource used as the non-XA ConnectionFactory.
    Each property should be of the form "key=value", where "key" is the name
    of some bean-like property of the data source.</description>
    <config-property-name>ConnectionFactory2Properties</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The JNDI name of the connection factory to use for
    obtaining connections.</description>
    <config-property-name>ConnectionFactoryName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
         <config-property-value>jdbc/Ventouris</config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of properties used to
    configure the javax.sql.DataSource used as the ConnectionFactory. Each
    property should be of the form "key=value", where "key" is the name of
    some bean-like property of the data source.</description>
    <config-property-name>ConnectionFactoryProperties</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The password for the user specified in
    ConnectionUserName</description>
    <config-property-name>ConnectionPassword</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of properties to be passed to
    the JDBC Driver when obtaining a Connection. Properties are of the form
    "key=value". If the given JDBC Driver class is a DataSource, these
    properties will be used to configure the bean properties of the
    DataSource. </description>
    <config-property-name>ConnectionProperties</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>This property dictates when PersistenceManagers will
    retain and release data store connections. Available options are
    "on-demand" for retaining a connection only during pessimistic
    transactions and data store operations, "transaction" for retaining a
    connection for the life of each transaction, or "persistence-manager" to
    indicate that a persistence manager should retain and reuse a single
    connection for its entire lifespan.</description>
    <config-property-name>ConnectionRetainMode</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>transaction</config-property-value>
    </config-property>
    <config-property>
    <description>The URL for the data source.</description>
    <config-property-name>ConnectionURL</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The username for the connection listed in
    ConnectionURL.</description>
    <config-property-name>ConnectionUserName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>Set to true if you''d like Kodo to copy all object
    ids before returning them to your code. If you do not plan on modifying
    identity objects, you can set this property to false to avoid the copying
    overhead.</description>
    <config-property-name>CopyObjectIds</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>false</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to cache data loaded from the data store.
    Must implement kodo.datacache.DataCache.</description>
    <config-property-name>DataCache</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The number of milliseconds that data in the data
    cache is valid for. A value of 0 or less means that by default, cached
    data does not time out.</description>
    <config-property-name>DataCacheTimeout</config-property-name>
    <config-property-type>java.lang.Integer</config-property-type>
    <config-property-value>-1</config-property-value>
    </config-property>
    <config-property>
    <description>The type of data source in use. Available options
    are "local" for a standard data source under Kodo''s control, or
    "enlisted" for a data source managed by an application server and
    automatically enlisted in global transactions.</description>
    <config-property-name>DataSourceMode</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>enlisted</config-property-value>
    </config-property>
    <config-property>
    <description>The kodo.jdbc.sql.DBDictionary to use for database
    interaction. This is auto-detected based on the setting of
    javax.jdo.option.ConnectionURL, so you need only set this to override the
    default with your own custom dictionary or if you are using an
    unrecognized driver.</description>
    <config-property-name>DBDictionary</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>Whether to dynamically create custom structs to hold
    and transfer persistent state in the Kodo data cache and remote
    persistence manager frameworks. Dynamic structs can reduce data cache
    memory consumption, reduce the amount of data serialized back and forth
    under remote persistence managers, and improve the overall performance of
    these systems. However, they increase application warm-up time while the
    custom classes are generated and loaded into the JVM. Set to true to
    enable dynamic data structs.</description>
    <config-property-name>DynamicDataStructs</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>false</config-property-value>
    </config-property>
    <config-property>
    <description>Specifies the default eager fetch mode to use.
    Either "none" to never eagerly-load relations, "join" for selecting 1-1
    relations along with the target object using inner or outer joins, or
    "parallel" for selecting 1-1 relations via joins, and collections
    (including to-many relations) along with the target object using separate
    select statements executed in parallel.</description>
    <config-property-name>EagerFetchMode</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>parallel</config-property-value>
    </config-property>
    <config-property>
    <description>The number of rows that will be pre-fetched when an
    element in a Query result is accessed. Use -1 to pre-fetch all
    results.</description>
    <config-property-name>FetchBatchSize</config-property-name>
    <config-property-type>java.lang.Integer</config-property-type>
    <config-property-value>-1</config-property-value>
    </config-property>
    <config-property>
    <description>The name of the JDBC fetch direction to use.
    Standard values are "forward", "reverse", and "unknown".</description>
    <config-property-name>FetchDirection</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>forward</config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of fetch group names that
    PersistenceManagers will load by default when loading data from the data
    store.</description>
    <config-property-name>FetchGroups</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of query filter listeners to
    add to the default list of extensions. Each listener must implement the
    kodo.jdbc.query.JDBCFilterListener interface.</description>
    <config-property-name>FilterListeners</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>Whether or not Kodo should automatically flush
    modifications to the data store before executing queries.</description>
    <config-property-name>FlushBeforeQueries</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>with-connection</config-property-value>
    </config-property>
    <config-property>
    <description>If true, Kodo will order all SQL inserts, updates,
    and deletes to meet your schema''s foreign key constraints. Defaults to
    false.</description>
    <config-property-name>ForeignKeyConstraints</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>false</config-property-value>
    </config-property>
    <config-property>
    <description>If false, then the JDO implementation must consider
    modifications, deletions, and additions in the PersistenceManager
    transaction cache when executing a query inside a transaction. Else, the
    implementation is free to ignore the cache and execute the query directly
    against the data store.</description>
    <config-property-name>IgnoreCache</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to manage inverse relations during flush.
    Set to true to use the default inverse manager. Custom inverse managers
    must extend kodo.runtime.InverseManager.</description>
    <config-property-name>InverseManager</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>false</config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of
    com.solarmetric.jdbc.JDBCListener implementations to install on all
    connection pools.</description>
    <config-property-name>JDBCListeners</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>The license key provided to you by SolarMetric. Keys
    are available at www.solarmetric.com</description>
    <config-property-name>LicenseKey</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value><KEY-REMOVED></config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to handle acquiring locks on persistent
    instances. Must implement kodo.runtime.LockManager.</description>
    <config-property-name>LockManager</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>pessimistic</config-property-value>
    </config-property>
    <config-property>
    <description>The number of milliseconds to wait for an object lock
    before throwing an exception, or -1 for no limit.</description>
    <config-property-name>LockTimeout</config-property-name>
    <config-property-type>java.lang.Integer</config-property-type>
    <config-property-value>-1</config-property-value>
    </config-property>
    <config-property>
    <description>LogFactory and configuration for Kodo''s logging
    needs.</description>
    <config-property-name>Log</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>kodo(DefaultLevel=WARN, Tool=WARN,
    Runtime=WARN, SQL=WARN)</config-property-value>
    </config-property>
    <config-property>
    <description>The mode to use for calculating the size of large
    result sets. Legal values are "unknown", "last", and "query".</description>
    <config-property-name>LRSSize</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>query</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to integrate with an external transaction
    manager. Must implement kodo.runtime.ManagedRuntime.</description>
    <config-property-name>ManagedRuntime</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>auto</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to configure management and profiling
    capabilities.</description>
    <config-property-name>ManagementConfiguration</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>none</config-property-value>
    </config-property>
    <config-property>
    <description>The kodo.jdbc.meta.MappingFactory that will provide
    the object-relational mapping information needed to map each persistent
    class to the database.</description>
    <config-property-name>MappingFactory</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>file</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to create metadata about persistent
    types. Must implement kodo.meta.MetaDataLoader</description>
    <config-property-name>MetaDataLoader</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>jdo</config-property-value>
    </config-property>
    <config-property>
    <description>If true, then the application plans to have multiple
    threads simultaneously accessing a single PersistenceManager, so measures
    must be taken to ensure that the implementation is thread-safe. Otherwise,
    the implementation need not address thread safety.</description>
    <config-property-name>Multithreaded</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    <config-property>
    <description>If true, then it is possible to read persistent data
    outside the context of a transaction. Otherwise, a transaction must be in
    progress in order read data.</description>
    <config-property-name>NontransactionalRead</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    <config-property>
    <description>If true, then it is possible to write to fields of a
    persistent-nontransactional object when a transaction is not in progress.
    If false, such a write will result in a JDOUserException.</description>
    <config-property-name>NontransactionalWrite</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>false</config-property-value>
    </config-property>
    <config-property>
    <description>Determines the persistence manager's behavior in
    calls to getObjectById with a validate parameter of false. Use "check" to
    check that a database record exists for the object and load its fetch
    group fields. Use "hollow" to return a hollow instance.</description>
    <config-property-name>ObjectLookupMode</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>check</config-property-value>
    </config-property>
    <config-property>
    <description>Selects between optimistic and pessimistic (data
    store) transactional modes.</description>
    <config-property-name>Optimistic</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    <config-property>
    <description>Action to take when Kodo discovers an orphaned key in
    the database. May be a custom action implementing
    kodo.event.OrphanedKeyAction.</description>
    <config-property-name>OrphanedKeyAction</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>log</config-property-value>
    </config-property>
    <config-property>
    <description>The name of the concrete implementation of
    javax.jdo.PersistenceManagerFactory that
    javax.jdo.JDOHelper.getPersistenceManagerFactory () should create. For
    Kodo JDO, this should be kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    or a custom extension of this type.</description>
    <config-property-name>PersistenceManagerFactoryClass</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>kodo.jdbc.runtime.JDBCPersistenceManagerFactory</config-property-value>
    </config-property>
    <config-property>
    <description>Persistence manager plugin and properties. If you
    use a custom class, it must extend
    kodo.runtime.PersistenceManagerImpl.</description>
    <config-property-name>PersistenceManagerImpl</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>default</config-property-value>
    </config-property>
    <config-property>
    <description>Configure this persistence manager factory to service
    remote persistence managers.</description>
    <config-property-name>PersistenceManagerServer</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>false</config-property-value>
    </config-property>
    <config-property>
    <description>A comma-separated list of the class names of all
    persistent classes to register whenever a persistence manager is
    obtained.</description>
    <config-property-name>PersistentClasses</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>com.ardatis.ventouris.domain.KwartaalVerhoging,
    com.ardatis.ventouris.domain.Land, com.ardatis.ventouris.domain.Gemeente,
    com.ardatis.ventouris.domain.Adres,
    com.ardatis.ventouris.domain.ContactGegeven,
    com.ardatis.ventouris.domain.AdresContactGegeven,
    com.ardatis.ventouris.common.type.AdresType,
    com.ardatis.ventouris.domain.OntvangstTransactie,
    com.ardatis.ventouris.domain.OntvangstReeks,
    com.ardatis.ventouris.domain.Ontvangst,
    com.ardatis.ventouris.domain.Inkomen,
    com.ardatis.ventouris.domain.loopbaan.LoopbaanPeriode,
    com.ardatis.ventouris.common.type.InkomenSoort,
    com.ardatis.ventouris.common.type.INSZ,
    com.ardatis.ventouris.domain.Aangeslotene,
    com.ardatis.ventouris.domain.NatuurlijkePersoon,
    com.ardatis.ventouris.domain.Persoon, com.ardatis.ventouris.domain.Rol,
    com.ardatis.ventouris.domain.Dossier,
    com.ardatis.ventouris.common.type.Geslacht,
    com.ardatis.ventouris.common.type.Taal,
    com.ardatis.ventouris.common.type.Nationaliteit,
    com.ardatis.ventouris.common.type.KostType,
    com.ardatis.ventouris.domain.Verhoging,
    com.ardatis.ventouris.domain.Aanvraag,
    com.ardatis.ventouris.domain.AanvraagAansluitingSS,
    com.ardatis.ventouris.domain.AanvraagToestand,
    com.ardatis.ventouris.common.type.AanvraagToestandType,
    com.ardatis.ventouris.domain.Factuur,
    com.ardatis.ventouris.domain.TaakType, com.ardatis.ventouris.domain.Taak,
    com.ardatis.ventouris.domain.BijdrageBerekening,
    com.ardatis.ventouris.domain.calculationparameters.HerwaarderingsIndex,
    com.ardatis.ventouris.domain.integration.asis.TempInterneOntvangst,
    com.ardatis.ventouris.domain.calculationparameters.InkomenGrens,
    com.ardatis.ventouris.domain.calculationparameters.BijdrageCategorie,
    com.ardatis.ventouris.domain.calculationparameters.BijdrageCategorieGroep,
    com.ardatis.ventouris.domain.integration.asis.TempOntvangstKinderbijslag,
    com.ardatis.ventouris.domain.calculationparameters.JaarVerhogingParameter,
    com.ardatis.ventouris.domain.calculationparameters.KwartaalVerhogingParameter,
    com.ardatis.ventouris.domain.UitgaveReeks,
    com.ardatis.ventouris.domain.Uitgave,
    com.ardatis.ventouris.domain.Terugbetaling,
    com.ardatis.ventouris.domain.BedragTerugbetaald,
    com.ardatis.ventouris.domain.BijdrageSS</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to proxy second class object fields of
    managed instances. Must implement kodo.util.ProxyManager.</description>
    <config-property-name>ProxyManager</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>default</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to cache query results loaded from the
    data store. Must implement kodo.datacache.QueryCache.</description>
    <config-property-name>QueryCache</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to cache query compilation data. Must
    implement java.util.Map. Does not need to be thread-safe -- it will be
    wrapped via the Collections.synchronizedMap() method if it does not extend
    kodo.util.CacheMap.</description>
    <config-property-name>QueryCompilationCache</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    <config-property>
    <description>The default lock level to use when loading objects
    within non-optimistic transactions. Set to none, read, write, or the
    numeric value of the desired lock level for your lock
    manager.</description>
    <config-property-name>ReadLockLevel</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>read</config-property-value>
    </config-property>
    <config-property>
    <description>Plugin used to communicate commit information among
    JVMs. Must implement kodo.event.RemoteCommitProvider.</description>
    <config-property-name>RemoteCommitProvider</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value></config-property-value>
    </config-property>
    <config-property>
    <description>Whether or not RemoteCommitEvents will include the
    object Ids of objects added during the transaction.</description>
    <config-property-name>RemoteCommitTransmitAddObjectIds</config-property-na

  • When importing numerical in order tracks some tracks are out of sequence

    When I import into iTunes my accompaniment CDs which have multiple tracks in numerical order, some tracks are out of sequence in the "Date Added" sort order.  This has been happening for quite sometimes with different versions and even on different computers.  This has got to be an iTune software glitch. I can click on sort Album and its ok.

    >> If syncing from iPhoto or Aperture on a Mac then they should sync across in the same order as in those programs.<<
    But they don't sync in the same order - All the photos in the album on iPhoto are automatically sorted in date/time order, ascending.
    When I sync the album to the iPad, POOF!, suddenly they're all mixed up in no apparent order.
    It does not make any sense to me at all.

  • ORA-01002: fetch out of sequence- error when accesing oracle sp from c#

    We have a stored procedure when we exceute it from Sql plus tool ot Toad works fine. But when we call it from C# .ne code gives us the following error.
    ORA-01002: fetch out of sequence ORA-02063: preceding line from SQA1
    Please help.

    with out these lines it works
    (fae_primary_agent_ind = 'X') or
    ((fae_primary_agent_ind is null) and (agn_agt_comp_st_cd = ‘65’)
    This is the stored proc. It works in oracle. It does not work only when we call it from C#.
    CREATE OR REPLACE
    PROCEDURE abc (
    p_report_date IN VARCHAR2,
    p_cur OUT Getadrdata.t_cursor,
    p_run_mode OUT NUMBER
    AS
    v_report_dt DATE;
    backed_out NUMBER := 0;
    previously_paid NUMBER := 0;
    BEGIN
    v_report_dt := TO_DATE (p_report_date, 'DDMMYYYY');
    SELECT COUNT (*)
    INTO backed_out
    FROM r2t_adr_payment a, DUAL
    WHERE a.fap_acctg_dt = v_report_dt
    AND a.fap_status_cd = 'B';
    IF backed_out = 0
    THEN
         SELECT COUNT (*)
    INTO previously_paid
    FROM r2t_adr_payment a, DUAL
    WHERE a.fap_acctg_dt = v_report_dt
    AND a.fap_status_cd = 'P';
    END IF;
    IF backed_out > 0 or previously_paid > 0
    THEN
    p_run_mode := 2;
    OPEN p_cur FOR
    SELECT fae_agent_nbr agent_nbr, fae_ssn_last_4digits ssn_nbr,
    fae_address_ln1 address_line1, fae_address_ln2 address_line2,
    fae_city_nm city, fae_state_cd state, fae_zip_cd zip,
    fae_bus_phone business_phone, fae_supv_region_cd region,
    fae_territory_cd territory, fae_market_cd market,
    -- FAE_AGT_COMP_ST_CD COMP_STAT_CD,
    agn_agt_comp_st_cd comp_stat_cd, fae_emplmt_dt emp_date,
    fae_agent_type_cd status_cd, fae_first_nm first_name,
    fae_last_nm last_name,
    rpt_agent_bonus_class_id p_agent_bonus_class_id
    FROM r2t_adr_epc_agent_info LEFT OUTER JOIN rgt_points
    ON fae_agent_nbr = rpt_agent_nbr
    LEFT OUTER JOIN p1t_tot_agent ON fae_agent_nbr =
    agn_agent_nbr
    INNER JOIN r2t_adr_payment
    ON fae_agent_nbr = fap_primary_agent_nbr
    WHERE FAE_AGENT_TYPE_CD = '41'
    AND rpt_acctg_dt = v_report_dt
    AND v_report_dt BETWEEN agn_start_eff_dt AND agn_end_eff_dt
    AND fap_acctg_dt = v_report_dt
    AND fap_status_cd = 'B'
    UNION ALL
    SELECT fae_agent_nbr agent_nbr, fae_ssn_last_4digits ssn_nbr,
    fae_address_ln1 address_line1, fae_address_ln2 address_line2,
    fae_city_nm city, fae_state_cd state, fae_zip_cd zip,
    fae_bus_phone business_phone, fae_supv_region_cd region,
    fae_territory_cd territory, fae_market_cd market,
    -- FAE_AGT_COMP_ST_CD COMP_STAT_CD,
    agn_agt_comp_st_cd comp_stat_cd, fae_emplmt_dt emp_date,
    fae_agent_type_cd status_cd, fae_first_nm first_name,
    fae_last_nm last_name,
    0 p_agent_bonus_class_id
    FROM r2t_adr_epc_agent_info
    LEFT OUTER JOIN p1t_tot_agent ON fae_agent_nbr =
    agn_agent_nbr
    INNER JOIN r2t_adr_payment
    ON fae_agent_nbr = fap_primary_agent_nbr
    WHERE fae_agent_type_cd = '13'
    AND v_report_dt BETWEEN agn_start_eff_dt AND agn_end_eff_dt
    AND fap_acctg_dt = v_report_dt
    AND fap_status_cd = 'B';
    ELSE
    p_run_mode := 1;
    OPEN p_cur FOR
    SELECT fae_agent_nbr agent_nbr, fae_ssn_last_4digits ssn_nbr,
    fae_address_ln1 address_line1, fae_address_ln2 address_line2,
    fae_city_nm city, fae_state_cd state, fae_zip_cd zip,
    fae_bus_phone business_phone, fae_supv_region_cd region,
    fae_territory_cd territory, fae_market_cd market,
    -- FAE_AGT_COMP_ST_CD COMP_STAT_CD,
    agn_agt_comp_st_cd comp_stat_cd, fae_emplmt_dt emp_date,
    fae_agent_type_cd status_cd, fae_first_nm first_name,
    fae_last_nm last_name,
    rpt_agent_bonus_class_id p_agent_bonus_class_id
    FROM r2t_adr_epc_agent_info LEFT OUTER JOIN rgt_points
    ON fae_agent_nbr = rpt_agent_nbr
    LEFT OUTER JOIN p1t_tot_agent ON fae_agent_nbr =
    agn_agent_nbr
    WHERE rpt_acctg_dt = v_report_dt
    -- Next line for testing of a subset of data - testing purposes only
    -- AND FAE_SUPV_REGION_CD ='002'
    AND FAE_AGENT_TYPE_CD = '41'
    AND (
    (RPT_AGENT_BONUS_CLASS_ID = '3' AND SUBSTR(FAE_EMPLMT_DT,1,2) <> '01' AND ADD_MONTHS(FAE_EMPLMT_DT, 7 ) <= v_report_dt) OR
    (RPT_AGENT_BONUS_CLASS_ID = '3' AND SUBSTR(FAE_EMPLMT_DT,1,2) = '01' AND ADD_MONTHS(FAE_EMPLMT_DT, 6 ) <= v_report_dt) OR
    (RPT_AGENT_BONUS_CLASS_ID = '1')
    AND (
    (fae_primary_agent_ind = 'X') or
    ((fae_primary_agent_ind is null) and (agn_agt_comp_st_cd = ‘65’)
    AND v_report_dt BETWEEN agn_start_eff_dt AND agn_end_eff_dt
    UNION ALL
    SELECT fae_agent_nbr agent_nbr, fae_ssn_last_4digits ssn_nbr,
    fae_address_ln1 address_line1, fae_address_ln2 address_line2,
    fae_city_nm city, fae_state_cd state, fae_zip_cd zip,
    fae_bus_phone business_phone, fae_supv_region_cd region,
    fae_territory_cd territory, fae_market_cd market,
    -- FAE_AGT_COMP_ST_CD COMP_STAT_CD,
    agn_agt_comp_st_cd comp_stat_cd, fae_emplmt_dt emp_date,
    fae_agent_type_cd status_cd, fae_first_nm first_name,
    fae_last_nm last_name, 0 p_agent_bonus_class_id
    FROM r2t_adr_epc_agent_info LEFT OUTER JOIN p1t_tot_agent
    ON fae_agent_nbr = agn_agent_nbr
    WHERE fae_agent_type_cd = '13'
    -- Next line for testing of a subset of data - testing purposes only
    -- AND FAE_SUPV_REGION_CD ='002'
    AND fae_primary_agent_ind = 'X'
    AND v_report_dt BETWEEN agn_start_eff_dt AND agn_end_eff_dt;
    END IF;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    --DBMS_OUTPUT.PUT_LINE ('no data ' || SQLERRM);
    NULL;
    WHEN OTHERS
    THEN
    --DBMS_OUTPUT.PUT_LINE ('error ' || SQLERRM);
    --OPEN p_cur FOR
    -- SELECT NULL
    -- FROM DUAL;
              RAISE;
    END abc;

  • ORA-1002 FETCH OUT OF SEQUENCE IN PRO*C

    제품 : PRECOMPILERS
    작성날짜 : 1996-07-19
    #### ORA-1002 : FETCH OUT OF SEQUENCE ####
    ORA-1002 error가 의미하는 것은 user가 더이상 유효하지 않은 cursor로부터
    fetch를 하려고 하기 때문이다.
    이러한 경우의 가장 흔한 경우를 다음 두가지로 설명하겠다.
    1) ORA-1403 등과 같이 NO DATA FOUND를 return하는 fetch작업을 수행할 때
    : 즉 fetch는 항상 현재의 row를 return하며, 마지막 row를 return한 후에 더
    retrieve할 data가 있는지 check하기 위해 한번 더 fetch를 수행하는데 이
    때 특정 exit구문으로 loop를 종료시키지 않으면 ORA-1002 error를 return
    한다.
    DECLARE
    EMP_NAME EMP.ENAME%TYPE;
    CURSOR C1 IS SELECT ENAME FROM EMP;
    BEGIN
    OPEN C1;
    LOOP
    FETCH C1 INTO EMP_NAME;
    END LOOP;
    CLOSE C1;
    END;
    2) SELECT FOR UPDATE를 가진 cursor 의 fetch 작업 내에 commit이 있는 경우.
    DECLARE
    EMP_NAME EMP.ENAME%TYPE;
    CURSOR C1 IS SELECT ENAME FROM EMP
    FOR UPDATE OF SAL;
    BEGIN
    OPEN C1;
    LOOP
    FETCH C1 INTO EMP_NAME;
    UPDATE EMP SET SAL = 50;
    -- cannot do this commit in version 6
    COMMIT;
    END LOOP;
    CLOSE C1;
    END;
    Database consistency를 유지하기 위해 user는 자신이 update/delete할
    row를 select 시점에서 lock을 걸어두는 경우가 있는데 commit이나
    roollback을 만나기 이전까지는 lock이 걸려있다.
    위 예에서 select for update 로 cursor가 open되는 시점에 lock을 걸어
    놓지만 fetch를 수행 중 commit을 만나 lock이 release된다.
    이 때 cursor는 더 이상 유효하지 않으며 fetch out of sequence를
    return한다.
    해결책은 commit을 fetch loop의 바깥 쪽으로 빼거나 select for update
    문을 사용하지 않아야 한다.

    Jonathan,
    If the queries execute fine in sqlplus then the issue is not with HS or the database. It has to do with the 3rd party app.

  • Fetch out of sequence ERROR - urgent

    Hi guys ..
    If i try to run the program i am getting an error message as
    java.sql.SQLException: ORA-01002: fetch out of sequence at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    will u pl help me how to solve this
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    import java.io.*;
    class LOBTest
         public static void main(String str[])
              try
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   Connection con = DriverManager.getConnection("jdbc:oracle:thin:spk/[email protected]:1521:spk");
                   Statement stmt = con.createStatement();
                   ResultSet rs = stmt.executeQuery("select temp from blobtest where no = 1 for update");
                   BLOB bl = null;
                   if(rs.next())
                        bl = ((OracleResultSet)rs).getBLOB(1);
                             FileInputStream ins = new FileInputStream("map.gif");
                             byte br[]= new byte[ins.available()];
                             ins.read(br);
                             bl.putBytes(0,br);
              }catch(Exception ept)
                   ept.printStackTrace();
                   System.out.println(ept);
    }

    from the Oracle docs:
    "ORA-01002: fetch out of sequence
    Cause: In a host language program, a FETCH call was issued out of sequence. A successful parse-and-execute call must be issued before a fetch. This can occur if an attempt was made to FETCH from an active set after all records have been fetched. This may be caused by fetching from a SELECT FOR UPDATE cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may also cause this error.
    Action: Parse and execute a SQL statement before attempting to fetch the data. "
    taken from:
    http://technet.oracle.com/doc/server.804/a58312/newch221.htm#16189
    Solution:
    when you use "for update" in your select statement you must set the connection's auto commit to false--> Connection.setAutoCommit(false);
    Jamie

  • ORA-01002: fetch out of sequence error

    Hello friends,
    I m facing a prob using a cursor for update.
    here is a piece of code:
    DECLARE
                   CURSOR c_tot_inv_qty (p_prd_id tr_periods.period_id%TYPE) IS
    SELECT total_inv_qty, item_id, period_id, dc_id
    FROM inv_dc_tmp
    WHERE period_id = p_prd_id + 1
    FOR UPDATE OF total_inv_qty;
    BEGIN
              FOR pd IN (     SELECT period_id
                             FROM tr_periods
                             WHERE status_flag = 1
                             AND period_id >= 46
    LOOP
                   FOR t_tot_inv_qty IN c_tot_inv_qty(pd.period_id) LOOP
                        BEGIN
    SELECT inv_forecast_qty
    INTO l_inv_fc_qty
    FROM inv_dc_tmp
    WHERE item_id = t_tot_inv_qty.item_id
    AND period_id = pd.period_id
    AND dc_id = t_tot_inv_qty.dc_id;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                                  l_inv_fc_qty := 0;
                        END;
    UPDATE inv_dc_tmp
    SET total_inv_qty = l_inv_fc_qty
    WHERE CURRENT OF c_tot_inv_qty;
                   END LOOP;
              END LOOP;
              COMMIT;
    END;
    i have written commit after the loop..but still it raise an error ORA-01002: fetch out of sequence
    i m unable to find out the soln
    i need ur help.
    Thanks
    RSD

    I'm not sure what your code is trying to accomplish, but give this a whirl. It might be better than all that looping and cursors. I don't have any sample data/tables so I'm largely guessing here.
    update inv_dc_tmp i
    set    i.total_inv_qty =
              (select sum(t.inv_forecast_qty)
               from   inv_dc_tmp t
                     ,tr_periods p
               where  t.period_id = p.period_id
               and    p.status_flag = 1
               and    p.period_id >= 46
               and    t.period_id     = i.period_id - 1
               and    t.item_id       = i.item_id
               and    t.dc_id         = i.dc_id
    where exists
              (select 1
               from   tr_periods p
               where  p.period_id = i.period_id - 1
               and    p.status_flag = 1
               and    p.period_id >= 46
    ;Extremely UNtested.

  • Difference between Regular Reversal and out-of-sequence reversal

    Can anyone help me understand the difference between Regular Reversal and out-of-sequence reversal? How does the system behave differently i these two reversals?
    Thanks
    Charlene

    Sorry for the long reply, as here's some information that I have on Voids and Out-of-Sequence reversals.
    On occasion, SAP payroll results can be created in error. In these cases, the payment never goes to the employee and the payroll result should never have been created. These cases are considered “reverse payments” in the off cycle workbench.
    There are two forms of “reverse payments”: voids and out of sequence reversals. Notes 160515, 159701 and 337626 should be reviewed carefully.
    An out of sequence reversal occurs when third party remittance has been run for the payroll result, or when the payroll result is not the most recent result in the cluster directory for the employee. Wage type /568 (total reversal amount) is created in the reversed result for posting purposes. Wage type /571 replaces any /559 wage types in the reversed result and the BT cluster is cleared.
    Wage type /568 is created for posting purposes and it will not appear in any retros over the reversed result.
    An out of sequence reversal should not occur when the employee receives the money unless the actual check is returned or the direct deposit is reversed by the bank.  Because of the tax when paid principle, even if an employee writes a check back to the company for the overpaid amount, this should be processed by retro master data changes and the employee check should be used to relieve any claims in the most recent period.  The claims processing guide gives details on how to relieve claims. Out of sequence reversals depend on third party remittance but not on posting to FI.
    /568 - Total reversal amount - If you cancel a payroll result that A. Has had payments made to third parties or B. is other than the last one.  This is considered an out of sequence reversal.  If these two conditions do not apply, a true void occurs.     Wage type /568 is the total reversal amount.  Should be the sum of /569, /570 and /571.
    /571 - Reversal of /559 - Wage type /571 is the reversal of /559 (bank transfer).  /571 will record the amount from wage types /559.  The /559 wage types will be deleted from the cluster that was reversed.  Wage type /571 will have the same sign as wage      type /559. 
    In payroll reporting, the reversal amounts are evaluated in the next payroll period. The same is true for posting to FI.
    The out of sequence reversal should have been accompanied by a master data change that forced a retro via infotype 0003.
    This retro will fix FI postings in the posting process that accompanies the retro run.For this reason, out of sequence reversals do not need an entry in table T52OCG for processing by the off cycle batch process.
    Regardless of if a ‘reverse payment’ is a void or an out of sequence reversal, there should be an associated master data change to perform this process properly. There had to be a reason that the payment should not have been made and this reason needs to be reflected in the employee’s master data. Both voids and out of sequence reversals can occur before or after the master data change, but the safest method is to perform the master data change first to ensure it occurs before the next payroll is processed.
    In payroll reporting, voids are bypassed in the period for which they were originally paid. This means that if a payroll report is run for a specific period containing a void, the voided result will not be picked up. In FI, voids are bypassed in the period in which they were voided. This is possible because the off cycle batch process already reconciled any incorrect posting that occurred before the payroll result was voided.
    A voided payroll result occurs when no money was given to the employee and no money was remitted through third party remittance.  A void is simply a check or direct deposit that was created in error.  The payroll control record was already exited and the check or direct deposit was already processed, therefore the payroll result can not be recalculated in the original period.
    A void can only occur if the payroll result is the most recent result for the employee.
    If the payroll result is not the most recent result, an out of sequence reversal occurs by default. It is irrelevant whether the transfer to FI has occurred or not with relation to voids.  Some OSS notes state that posting to FI does matter and these notes are in error.

  • Dialog programming, data being washed out in TAB Control

    Hi,
         i am working on dialog programming , in which i am using Table Control  for user input (data is not coming from database table) . everything is going well till assignment of data to internal table but when
    control goes to PBO by any means like pressing ENTER etc. then data being washed out.
    PROCESS BEFORE OUTPUT.
      MODULE TC_CONTROL.
      LOOP AT it_data
             INTO wa_data
             WITH CONTROL tc_control
             CURSOR tc_control-current_line.
        MODULE tc_control_get_lines.
      ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP AT IT_DATA.
        CHAIN.
          FIELD WA_DATA-FREPS_N.
          FIELD wa_data-TOEPS_N.
          FIELD wa_data-PRCH_A.
          FIELD wa_data-SRVC_AMT .
          FIELD wa_data-ACCNT_C.
          FIELD wa_data-AMT_D.
          FIELD wa_data-NARR_X.
          FIELD wa_data-CRPRD_N.
          MODULE tc_control_modify ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
    *Abap program
    MODULE TC_CONTROL OUTPUT.
    DESCRIBE TABLE it_data LINES tc_control-lines.
    ENDMODULE.                 " TC_CONTROL  OUTPUT
    CONTROLS: TC_CONTROL TYPE TABLEVIEW USING SCREEN 1000,
              TC_CONTROL1 TYPE TABLEVIEW USING SCREEN 1000.
    DATA:     G_TC_CONTROLS_LINES  LIKE SY-LOOPC,
              G_TC_CONTROLS_LINES1  LIKE SY-LOOPC.
    *&      Module  tc_control_get_lines  OUTPUT
          text
    MODULE tc_control_get_lines OUTPUT.
    g_tc_controls_lines = sy-loopc.
    move-corresponding it_data to wa_data.
    ENDMODULE.                 " tc_control_get_lines  OUTPUT
    MODULE tc_control_modify INPUT.
    move-corresponding wa_data to it_data.
    MODIFY it_data
        FROM wa_data
        INDEX tc_control-current_line.
    append it_data.
    clear it_data.
    ENDMODULE.                 " tc_control_modify  INPUT
    Please suggest me any clue.
    Thanks in advance
    vijay dwivedi

    Hi ,
    I have understood the problem.
    In your ABAP code replace all the occurrrences of wa_data  with the structurename.
    Use the TABLES keyword to declare the structure .That structure will be same as
    reference table of the table control .
    Here the structure is SPFLI.
    Check the bellow code , it will resolve the issue.
    ABAP code - -
    program  zsdn.
    tables spfli.  " Declare the structure
    data : it_data like table of spfli with header line,
    *wa_data TYPE spfli,  " commented
    w_i type i.
    *CONTROLS TC_CONTROL TYPE TABLEVIEW USING SCREEN 100.
    controls: tc_control type tableview using screen 1000,
    tc_control1 type tableview using screen 1000.
    data: g_tc_controls_lines like sy-loopc,
    g_tc_controls_lines1 like sy-loopc.
    module tc_control output.
      describe table it_data lines tc_control-lines.
    endmodule. " TC_CONTROL OUTPUT
    module tc_control_get_lines output.
      g_tc_controls_lines = sy-loopc.
      move-corresponding it_data to spfli.
    endmodule. " tc_control_get_lines OUTPUT
    module tc_control_modify input.
      move-corresponding spfli to it_data.
      modify it_data
      from spfli
      index tc_control-current_line.
      append it_data.
      clear it_data.
    endmodule. " tc_control_modify INPUT
    module status_0100 output.
      set pf-status 'STAT'.
    *  SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_0100  OUTPUT
    module user_command_0100 input.
      case sy-ucomm.
        when 'BACK' or 'EXIT' or 'CANCEL'.
          leave to screen 0.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Module  POPLATE_TABLE  OUTPUT
    *       text
    module poplate_table output.
      if it_data is initial.
        select * from spfli into table it_data.
      endif.
    endmodule.                 " POPLATE_TABLE  OUTPUT
    Screen code (Scr no 1000) - -
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE poplate_table.
      MODULE tc_control.
      LOOP AT it_data WITH CONTROL tc_control CURSOR w_i.
        MODULE tc_control_get_lines.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
      LOOP AT it_data.
        MODULE tc_control_modify ON CHAIN-REQUEST.
    *    ENDCHAIN.
      ENDLOOP.
    Regards
    Pinaki

Maybe you are looking for

  • I'm not able to sign into business catalyst

    I'm not able to sign into business catalyst with my Adobe ID and I have not recieved any other log in information.

  • Order of buttons

    I have imported an FCP project with chapter markers into iDVD. It looks great and the chapters work, but on the menu, when skipping from scene selection to scene selection with the remote, it jumps around instead of going from top left button to bott

  • How does the SecurityManager authorize with JAAS?

    Hello, I'm using java 1.3 and JAAS, trying to write my own Permission for authorization. How does the SecurityManager know to authorize a method for a Subject? Does the method that I want protected have to explicitly call checkPermission()? The examp

  • Windows stops working popup

    I had bitberry software-freefileviewer downloaded for some time,I uninstalled it to reinstall and insure I had latest version.Now,every time I click on nest to reinstall I get popup windows stopped working.What will fix this? thank you

  • CS5.5 XHTML vis HTML

    Why is CS5.5 assigning HTML extensions rather XHTML? Ken.