TRIP QUERY

Dear Freinds,
Based on the SAP Best Practices documentation I have done all the basic configurations pertaining to Travel Management and was successfull in mapping infotype  0017 to employee code.
After that when I have entered all the details in TRIP and after clicking on 'Approve' button it is giving error as 'TRIP Schema PL is not allowed'
If you have any solution to this please revert back.
Have a nice time!
Regards,
Raghavendra

Check the TRFVD feature once.
Regards,
Rao

Similar Messages

  • Cf10 how do I pass the selected value in cfselect to another .cfm page

    I am new with CF. I am using CF 10 on WIN XP. I am pulling a distinct list of data and want the user to select one to open a new page (detail.cfm) and pass that value to the next page to be used for other queries.
    can it be done?
    Here is my code for cfselect .
    What am I missing
    <cfform name = "Form" action="detail.cfm"
             <cfselect name="trip"
                        query="gettri"
                     value="district_name"
                     required="yes"
                     multiple="yes"
                    size="1">
        </cfselect>
    <br> <input type="Submit" value="Submit">
    </cfform>
    Thank you for your time
    Rob

    I missed it when I typed it in my original question
    The > bracket is in my code.
    I justed checked.
    It should read  ~ "detail.cfm">
    The list works when I excute the page.
    How do I pass the value after I have selected it on the page?
    Thank you

  • Query Trip Data with Zero Amount

    Dear all,
    I have requirement to retrieve every trip record which has zero amount in its total cost. It didn't work when I use TCode S_AHR_PH0_61016401 (General Data Trip) for this query purpose.
    I also took effort to make my own query definition using logical database PTRVP. This custom query used table PTRV_HEAD, PTRV_SHDR, PTRV_SREC. Later, I realized that table PTRV_SHDR, which save data for trip total cost, never store any trip record that has zero amount in its total cost.
    Is there any configuration to make PTRV_SHDR able store the zero-trip?
    I really do appreciate every help here. Thanks a ton!
    Regards,
    Erwin

    Hi Erwin,
    Yes i have tested and then suggested..
    Please note that on my side, system doest NOT display if you simply click on set filter (on Total Cost) and insert 0.00 amount on lower and upper then execute.
    You need to select multple selection button and then place 0.00 in Select Single Value  and then execute..
    Regards,
    Muhammad Umer

  • Using join and batch reading in the same query

    Hi,
    I wonder if it is possible to use "Joining" and "batch reading" in the same query.
    For example I Have
    A -> 1-1 B
    A -> 1-1 B
    B -> 1-M C
    This is the case where I have two separate 1-1 relationships to the same class B from A. Toplink 10.0.3 can manage it nicely through joining.
    Now, I would like to read a set of As (with its 2 Bs) and all Cs for each B.
    It seems that the following configuration does not work:
    A -> 1-1 B (use joining)
    A -> 1-1 B (use joining)
    B -> 1-M C (Batch read)
    Any help would be greatly appreciated
    Tony.

    James,
    Would you be so kind to look at the following code?
    Am I formulating it correctly to achieve my desired behavior?
    Trip.class -> 1-1 PickupStop
    Trip.class -> 1-1 DropoffStop
    PickupStop and DropoffStop extend Stop and use same table (STOP)
    Stop -> 1-M StopEvents
    I would like to fetch all Trips, with their Stops and all StopEvents in 2 queries:
    1. Trip joined with Stop
    2. Batchread StopEvents
    Code:
    ReadAllQuery raq = new ReadAllQuery(Trip.class);
    Expression qexp1 = new ExpressionBuilder();
    Expression qexp2 = new ExpressionBuilder();
    raq.addJoinedAttribute("pickupStop");
    raq.addJoinedAttribute("dropoffStop");
    raq.addBatchReadAttribute(qexp1.get("pickupStop").get("vStopEvents"));
    raq.addBatchReadAttribute(qexp2.get("dropoffStop").get("vStopEvents"));

  • Adding data to array from an empty query

    I am trying to add data to an array from a database query, however some queries will return no data (empty set). In that case I would like to add fake data so that the index size matches my other array (assetsid).
    Thank you for your time.
         int f2a=0;
         String[] exportedtime;
         String[] exportedtime_formated;
         ArrayList exportedtime_ar = new ArrayList(f2a);
         ArrayList exportedtime_formated_ar = new ArrayList(f2a);
         for (int jj=0; jj<assetsid_ar.size(); jj++)
              String eng_id_out = (String) eng_id_h2a_ar.get(jj);
              String fuel2a = "select engineserialnumber, TO_CHAR(exportedtime, 'MM/DD/YYYY HH24:MI:SS') exportedtime, TO_CHAR(exportedtime, 'DD/MON/YY') as exportedtime_formated from tblexportedjobs where exportid = (select max(exportid) from tblexportedjobs where engineserialnumber = "+eng_id_out+") and engineserialnumber = "+eng_id_out+"";
              ResultSet fuel2a_myResultSet = stmt.executeQuery(fuel2a);
                  while (fuel2a_myResultSet.next()) {
                   f2a=f2a+1;
                   exportedtime = new String[f2a+1];
                   exportedtime_formated = new String[f2a+1];
                   exportedtime[f2a]=fuel2a_myResultSet.getString("exportedtime");
                   exportedtime_formated[f2a]=fuel2a_myResultSet.getString("exportedtime_formated");
         if (exportedtime[f2a].equals("")) {
        exportedtime[f2a] = "01/01/2004 00:01:01";
         } else {
         exportedtime[f2a] = exportedtime[f2a];
                   exportedtime_ar.add(exportedtime[f2a]);
         if (exportedtime_formated[f2a].equals("")) {
        exportedtime_formated[f2a] = "01/JAN/04";
         } else {
         exportedtime_formated[f2a] = exportedtime_formated[f2a];
                   exportedtime_formated_ar.add(exportedtime_formated[f2a]);
         }

    I'd be curious to know if it would be possible to rewrite your query using a JOIN so you could get all the data in one query. The way you've written it will require N network round trips, where N is the number of engine serial numbers. I wonder if clever application of a JOIN with a GROUP BY would do the trick in one?
    I don't care for the formatting stuff you're doing, either. There's no need to ask the database for that. Bring the dates over and handle the formatting in Java using java.text.SimpleDateFormat. Less work for the database AND it won't be so tied to Oracle, since you won't need that TO_CHAR function anymore.
    I'd give clients the raw java.sql.Date and let them worry about formatting it the way they wish. That's not a persistence concern.
    I always prefer data structures like List and Map when I'm working with database result sets. They grow to fit the # of records that I get back. If I want arrays, I can always use the toArray() method to generate them.

  • Use of current time for polling Database Adapter query

    I am writing a simple BPEL process with a Polling Database Adapter and a Recieve. The idea is that we are polling an XE database for any entries in a TRIP table which have an expiration date/time field that has passed.
    The Adapter was build using JDeveloper 10.1.3.2 (with Oracle Application Server patched to 10.1.3.3.0) as a "Poll for New Changed Records in a Table" Operation type with a STATUS field (0 for live, 1 for expired) as the Logical Delete Field.
    I was unable to find a way to generate a SELECT query expression with the wizard that would allow me to use current/system time as an attribute, so I finished the wizard and edited the Toplink Descriptor to use a custom SQL expression for the query. This resulted in the following code in the toplink_mappings.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)"
    xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>ExpiredTripPoller</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>ExpiredTripPoller.Trip</opm:class>
    <opm:alias>Trip</opm:alias>
    <opm:primary-key>
    <opm:field table="TRIP" name="ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="ExpiredTripPoller" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:call xsi:type="toplink:sql-call">
    <toplink:sql>SELECT ID, LPN, START_TIME, EXPIRY_TIME, STATUS FROM TRIP WHERE ((STATUS = '0') AND (EXPIRY_TIME < SYSDATE)) ORDER BY EXPIRY_TIME ASC</toplink:sql>
    </toplink:call>
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    <opm:query name="findAllTrip" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    <toplink:does-exist-query xsi:type="toplink:does-exist-query">
    <toplink:existence-check>check-database</toplink:existence-check>
    </toplink:does-exist-query>
    <toplink:read-all-query xsi:type="toplink:read-all-query">
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </toplink:read-all-query>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TRIP" name="ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.math.BigDecimal</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>lpn</opm:attribute-name>
    <opm:field table="TRIP" name="LPN" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>startTime</opm:attribute-name>
    <opm:field table="TRIP" name="START_TIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>expiryTime</opm:attribute-name>
    <opm:field table="TRIP" name="EXPIRY_TIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>status</opm:attribute-name>
    <opm:field table="TRIP" name="STATUS" xsi:type="opm:column"/>
    <opm:attribute-classification>java.math.BigDecimal</opm:attribute-classification>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
    <toplink:tables>
    <toplink:table name="TRIP"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    </opm:class-mapping-descriptors>
    </toplink:object-persistence>
    To test I used the above custom SQL at the command line and it filtered the records by EXPIRY_TIME as expected.
    When deployed, the polling process updates the STATUS file dof table entries, but all entries with status 0 regardless of EXPIRY_DATE. My modification appears to be being ignored. I was unsure as to whether the QUERY was being determined in some other way so I modified the descriptor (with the toplink expression editor) to compare against a literal time value, producing the following modified toplink_mappings.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)"
    xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>ExpiredTripPoller</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>ExpiredTripPoller.Trip</opm:class>
    <opm:alias>Trip</opm:alias>
    <opm:primary-key>
    <opm:field table="TRIP" name="ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="ExpiredTripPoller" xsi:type="toplink:read-all-query">
    <opm:criteria operator="lessThan" xsi:type="toplink:relation-expression">
    <toplink:left name="expiryTime" xsi:type="toplink:query-key-expression">
    <toplink:base xsi:type="toplink:base-expression"/>
    </toplink:left>
    <toplink:right xsi:type="toplink:constant-expression">
    <toplink:value xsi:type="xsd:date">2007-07-30</toplink:value>
    </toplink:right>
    </opm:criteria>
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    <opm:query name="findAllTrip" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    <toplink:does-exist-query xsi:type="toplink:does-exist-query">
    <toplink:existence-check>check-database</toplink:existence-check>
    </toplink:does-exist-query>
    <toplink:read-all-query xsi:type="toplink:read-all-query">
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </toplink:read-all-query>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TRIP" name="ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.math.BigDecimal</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>lpn</opm:attribute-name>
    <opm:field table="TRIP" name="LPN" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>startTime</opm:attribute-name>
    <opm:field table="TRIP" name="START_TIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>expiryTime</opm:attribute-name>
    <opm:field table="TRIP" name="EXPIRY_TIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>status</opm:attribute-name>
    <opm:field table="TRIP" name="STATUS" xsi:type="opm:column"/>
    <opm:attribute-classification>java.math.BigDecimal</opm:attribute-classification>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
    <toplink:tables>
    <toplink:table name="TRIP"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    </opm:class-mapping-descriptors>
    </toplink:object-persistence>
    On deployment, this version of the BPEL process behaved as expected - only modifying the records with EXPIRY_TIME less thatn the literal time specified. (Also, I can't really pass in the time as a parameter as this is a polling model).
    Can anyone shed any light on what is happening or suggest how I might go about polling in the desired way?
    Cheers

    Please take a look at this article which states SYSDATE is not supported in a
    where clause.
    http://www.oracle.com/technology/pub/articles/bpel_cookbook/qualcomm-bpel.html
    Excerpt from the article:
    Here are three important things you should do in implementing the above design:
    Have the status of the record being processed stored in the database. The status includes the process state, next process attempt time, and processing attempt count.
    Create an updatable view that exposes only records that are ready to be processed. A view is needed because the database adapter cannot handle a where clause that compares against SYSDATE.
    Design logic that determines if a process instance that has faulted should be retried and when the retry should occur. This information will be updated in the database by use of a stored procedure. This can also be done with an update partner link and additional logic in BPEL.
    mahalo,
    a iii

  • Is there a way to force a View Object to query the database always?

    Dear All,
    Is there a way to force a view object to always scan the database table to read the latest data?
    Here's my use case.
    I have a page that loads data then I have a button which executes the following code.
    viewObject.setApplyViewCriteriaName("SampleCriteria");
    viewObject.setNamedWhereClauseParam("arg1", "test");
    viewObject.executeQuery();
    RowSetIterator it = viewObject.createRowSetIterator(null); 
    while(it.hasNext()) {
         /* More Code */
    }Suppose after page load, I edited some row in the table and then I clicked the button. I notice that my edited row
    was not reflected in the query.
    I am not sure but is there some configuration to check so that when the viewobject executes it will always query the data
    from the table?
    I am thinking that there is some level of caching and I want to disable it. If I restart my application, I notice that it is able to read the latest data.
    JDEV 11.1.1.5

    By default a view object performs its query against the database to retrieve the rows in its resulting row set. However, you can also use view objects to perform in-memory searches and sorting to avoid unnecessary trips to the database.
    The view object's query mode controls the source used to retrieve rows to populate its row set. For more details please refer: http://docs.oracle.com/cd/B31017_01/web.1013/b25947/bcadvvo005.htm
    Also, see if this helps: setQueryMode for secondary rowSet not working

  • SQL Query Tuning issue

    A query run by the 'tom' user who searches on (xyz crieteria) takes less than 5 seconds.
    However, when the user 'greg' ruuns the same query, it take > 14 minutes to execute for same xyz crieteria.
    Note:both are application users and internally use DOCD database user.Both are using same SQL Explain plan but diffrence is disk read in case of long running query.
    my question is if both queries are same and using same explain plan and returning same rows why there is disk read???? and such huge diffrence in execution time...Below is the tkprof output for both the queries.
    QUICK QUERY
    ===========
    SELECT E_NAME, E_CURVER_NUM, E_CURVER_CKO, E_PROTECTED, E_INA01, E_INA26,
    E_INA47, V_FILE_NAME, E_ICON_TITLE, E_INA41, E_INA11, E_INA16, E_INA40,
    E_INA15, E_INA35, E_ORG_FILENAME, E_COMMENT, E_INA28, E_INA27,
    E_CREATE_DATE, E_OWNER, E_LAST_DATE, V_CHECKED_OUT, V_CHECKIN_USER, V_NAME,
    V_E_NAME, V_AVAIL_STAT, V_RECLAIM, V_PERMANENT, V_CSI_STATUS, V_CD, E_INA01,
    V_INA03, V_INA02, V_INA04, E_INA02, V_INA01, V_CREATE_DATE, E_INA03
    FROM
    ELEMENT, VERSION WHERE (NLS_UPPER(E_INA01) LIKE NLS_UPPER(:V001) AND
    NLS_UPPER(E_INA26) = NLS_UPPER(:V002) AND E_INA02 IS NULL AND (E_INA03 IS
    NULL OR E_INA03 = :V003) AND V_BRANCH_CURVER = :V004) AND ELEMENT.E_NAME =
    VERSION.V_E_NAME ORDER BY 12, 10 DESC, 1, 26, 25
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 167 0.18 0.18 0 29466 0 1002
    total 169 0.20 0.19 0 29466 0 1002
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer goal: CHOOSE
    Parsing user id: 41
    Rows Row Source Operation
    1002 SORT ORDER BY (cr=29466 r=0 w=0 time=179192 us)
    8847 NESTED LOOPS (cr=29466 r=0 w=0 time=146638 us)
    14191 TABLE ACCESS FULL VERSION (cr=1082 r=0 w=0 time=25337 us)
    8847 TABLE ACCESS BY INDEX ROWID ELEMENT (cr=28384 r=0 w=0 time=97209 us)
    14191 INDEX UNIQUE SCAN UI256 (cr=14193 r=0 w=0 time=30388 us)(object id 29956)
    SLOW QUERY
    ==========
    SELECT E_NAME, E_CURVER_NUM, E_CURVER_CKO, E_PROTECTED, E_INA01, E_INA26,
    E_INA47, V_FILE_NAME, E_ICON_TITLE, E_INA41, E_INA11, E_INA16, E_INA40,
    E_INA15, E_INA35, E_ORG_FILENAME, E_COMMENT, E_INA28, E_INA27,
    E_CREATE_DATE, E_OWNER, E_LAST_DATE, V_CHECKED_OUT, V_CHECKIN_USER, V_NAME,
    V_E_NAME, V_AVAIL_STAT, V_RECLAIM, V_PERMANENT, V_CSI_STATUS, V_CD, E_INA01,
    V_INA03, V_INA02, V_INA04, E_INA02, V_INA01, V_CREATE_DATE, E_INA03
    FROM
    ELEMENT, VERSION WHERE (NLS_UPPER(E_INA01) LIKE NLS_UPPER(:V001) AND
    NLS_UPPER(E_INA26) = NLS_UPPER(:V002) AND E_INA02 IS NULL AND (E_INA03 IS
    NULL OR E_INA03 = :V003) AND V_BRANCH_CURVER = :V004) AND ELEMENT.E_NAME =
    VERSION.V_E_NAME ORDER BY 12, 10 DESC, 1, 26, 25
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.02 2 2 0 0
    Execute 1 0.01 0.00 0 0 0 0
    Fetch 167 0.29 1.18 2389 29466 0 1002
    total 169 0.32 1.21 2391 29468 0 1002
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer goal: CHOOSE
    Parsing user id: 41
    Rows Row Source Operation
    1002 SORT ORDER BY (cr=29466 r=2389 w=0 time=1180072 us)
    8847 NESTED LOOPS (cr=29466 r=2389 w=0 time=1144811 us)
    14191 TABLE ACCESS FULL VERSION (cr=1082 r=1078 w=0 time=134164 us)
    8847 TABLE ACCESS BY INDEX ROWID ELEMENT (cr=28384 r=1311 w=0 time=984455 us)
    14191 INDEX UNIQUE SCAN UI256 (cr=14193 r=137 w=0 time=127843 us)(object id 29956)

    Anuj,
    In the future, when posting items to the forum where spacing is critical to proper understanding, please use the { code } tags (without spaces) to retain the spacing.
    It appears that there is more to the story than what has been reported. It is good that you used tkprof, as it shows that there is more to the story. Taking a look at the two executions, the tkprof output shows that the first (quick) execution completed in 0.19 seconds, while the second (slow) execution completed in 1.21 seconds, even with th 2,391 blocks read from disk. My first question, if I were in the same situation, would be what would cause the first execution time to jump from 0.19 seconds to 5 seconds, and the second execution to jump from 1.21 seconds to 840 seconds (14 minutes)?
    In both cases, there is a library cache miss on both the parse and the execute calls - there may be some significance to this.
    In both cases, there were 167 fetch calls to return 1,002 rows, meaning that on average 6 rows were returned on each fetch.
    Let's assume that 'tom', whose query executed quickly, was connected to the database over a T1 connection with a 20ms (0.02 second) ping time. For siimplicity in calculation, assume that there were 170 round trips between the server and the client. The network communication between the client and the server would require at least 3.4 seconds, for a total time to send the query and retrieve the results of about 3.6 seconds. This is a little short of 5 seconds which you reported.
    Let's assume that 'greg', whose query executed slowly, was connected to the database over a satellite connection with a 2000ms (2 second) ping time. With the same number of round trips, the network communication would require about 340 seconds, for a total time to send the query and retrieve the results of about 341.21 seconds (5.7 minutes), about 8 minutes short of the target 14 minutes.
    Was this the only query executed by the clients, or were there multiple queries?
    Were the client computers on the same network segment?
    Did you gather a 10046 trace at level 8 or 12 for the sessions? If so, manually review the wait events in the trace files to see if it is possible to determine what was happening during the 14 minutes. Guessing can be fun, but sometimes you come up 8 minutes short by guessing alone.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • How to get the name of an executing ABAP query in run time

    Hi ABAP Gurus,
    I need to get the ABAP query name when it's running. For example we can get the current executing ABAP program name from SY-REPID.
    My tried logic - every query generates an ABAP program like AQZZUGQUERY. 'UG' stands for user-group name and the length specified for it is 12, if the length of the user-group name is less than 12, then the rest will be filled by '='. Next 'QUERY' stands for ABAP query name and the length specified for it is 14, if less, then the rest will be filled in with '=' in the right. I've tried to extract the query name by using cut and trip (offset) operations.
    But somehow this logic is not working - always it's picking up the function name as checked in debug mode.
    Guys - Can you please provide me the solution on this.
    Thanks & regards,
    Jayanta Bej.

    Guys,
    I've cracked the issue. Instead of retrieving the query name from sy-repid, I've retrieved it from sy-cprog and the problem is resolved.
    Thanks guys for your quick responses.
    Thanks and regards,
    Jayanta Bej.

  • Problem with this query

    Hi
    We are using this query
    SELECT ...........
    FROM TRIP JOIN TRIPEXTENSION ON TRIPEXTENSION.TRIPID = TRIP.TRIPID JOIN FOREIGNRECLOC ON FOREIGNRECLOC.TRIPID = TRIP.TRIPID JOIN CUSTSEGCONTROL ON CUSTSEGCONTROL.TRIPID = TRIP.TRIPID JOIN CUSTOMERCONTROL ON CUSTOMERCONTROL.CUSTOMERID = CUSTSEGCONTROL.CUSTOMERID JOIN CUSTOMER ON CUSTOMER.CUSTOMERID = CUSTSEGCONTROL.CUSTOMERID LEFT JOIN TRIPSEGMENT ON TRIPSEGMENT.TRIPSEGMENTID = CUSTSEGCONTROL.TRIPSEGMENTID LEFT JOIN TRIPSEGMENTEXTENSION ON (TRIPSEGMENTEXTENSION.TRIPSEGMENTID = TRIPSEGMENT.TRIPSEGMENTID AND TRIPSEGMENTEXTENSION.TRIPID = TRIP.TRIPID) LEFT JOIN TICKET ON CUSTOMERCONTROL.TICKETID = TICKET.TICKETID WHERE FOREIGNRECLOC.TRIPID IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) AND ((TRIP.STATUS <> ? AND (CUSTSEGCONTROL.DELETEDITEM = 0 OR CUSTSEGCONTROL.DELETEDITEM is null )) OR (TRIP.STATUS = ?)) AND TRIPEXTENSION.EOTTIME = CUSTSEGCONTROL.EOTTIME AND TRIPEXTENSION.EOTTIME = CUSTOMERCONTROL.EOTTIME AND TRIPEXTENSION.EOTTIME = TRIP.EOTTIME
    It is taking long time to execute and causing timeout. The columns used in where clause are as follows
    FOREIGNRECLOC.TRIPID - PRIMARY KEY
    TRIP.STATUS - NO INDEX/CONTAINS LOW CARDINALITY DATA
    CUSTSEGCONTROL.DELETEDITEM - NO INDEX/CONTAINS LOW CARDINALITY DATA
    TRIPEXTENSION.EOTTIME/CUSTSEGCONTROL.EOTTIME/CUSTOMERCONTROL.EOTTIME/TRIPEXTENSION.EOTTIME - NO INDEX/CONTAINS HIGH CARDINALITY DATA
    Our 'experts' said something 'seriously' wrong with this query. Can anyone provide any suggestion/observation on this?
    thanks and regards,
    SUMIT

    Hi Devid
    Thans for your response. The result of explain plan is
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation                        | Name                      | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                 |                           |     1 |   592 |    51   (8)|
    |   1 |  TABLE ACCESS BY INDEX ROWID     | FOREIGNRECLOC             |     1 |    16 |     1   (0)|
    |   2 |   NESTED LOOPS                   |                           |     1 |   592 |    51   (8)|
    |   3 |    NESTED LOOPS                  |                           |     1 |   576 |    50   (8)|
    |   4 |     NESTED LOOPS                 |                           |     1 |   569 |    50   (8)|
    |   5 |      NESTED LOOPS                |                           |     1 |   511 |    49   (9)|
    |   6 |       HASH JOIN                  |                           |     1 |   397 |    42  (10)|
    |   7 |        HASH JOIN                 |                           |    11 |  3443 |    36   (9)|
    |   8 |         HASH JOIN                |                           |    13 |  3588 |    29   (7)|
    |   9 |          HASH JOIN               |                           |   327 | 51339 |    10  (10)|
    |  10 |           TABLE ACCESS FULL      | TRIP                      |   270 | 17820 |     3   (0)|
    |  11 |           HASH JOIN              |                           |   327 | 29757 |     7  (15)|
    |  12 |            TABLE ACCESS FULL     | TRIPSEGMENT               |   123 |  9225 |     3   (0)|
    |  13 |            TABLE ACCESS FULL     | TRIPSEGMENTEXTENSION      |   327 |  5232 |     3   (0)|
    |  14 |          TABLE ACCESS FULL       | CUSTSEGCONTROL            |  3180 |   369K|    19   (6)|
    |  15 |         TABLE ACCESS FULL        | CUSTOMERCONTROL           |  2658 | 98346 |     6   (0)|
    |  16 |        TABLE ACCESS FULL         | CUSTOMER                  |   464 | 38976 |     5   (0)|
    |  17 |       TABLE ACCESS BY INDEX ROWID| TRIPEXTENSION             |     1 |   114 |     7   (0)|
    |  18 |        INDEX RANGE SCAN          | EXTENSION_TRIPID_FK_INDEX |     7 |       |     1   (0)|
    |  19 |      TABLE ACCESS BY INDEX ROWID | TICKET                    |     1 |    58 |     1   (0)|
    |  20 |       INDEX UNIQUE SCAN          | SYS_C0011530              |     1 |       |     0   (0)|
    |  21 |     INDEX UNIQUE SCAN            | SYS_C0011533              |     1 |     7 |     0   (0)|
    |  22 |    INDEX RANGE SCAN              | TRIPSEGEXT_TRIPID_INDEX   |     1 |       |     0   (0)|
    Note
       - 'PLAN_TABLE' is old version
    32 rows selected.thanks and regars,
    SUMIT

  • Errors executing bulk query when updating a Sharepoint Linked List from Access

    Hi all,
    I have a Sharepoint list that is a Linked List with MS Access. It has just under 5,000 items (4,864), thus meaning it avoids the reduction in functionality lists of greater than 5,000 items have.
    Among the list are five calculated columns. These take the information from another column (different employee numbers), and by using a formula produce a clickable link to my company's Directory page, where that particular employee's info is displayed. I'm
    not sure if these five columns are relevant to my query, but I'm mentioning them in case.
    My problem is this: Frequently when I run any query on the list that updates the list, I get this error: "There were errors executing the bulk query or sending the data to the server. Reconnect the tables to resolve the
    conflicts or discard the pending changes".
    When I review the errors, it says they conflict with errors a previous user made (with that previous user being me). It frequently highlights several columns, despite the info in them being identical, and the calculated columns (with the original showing
    the value they contained and the new showing #VALUE! (as Access can't display the formulas).
    However, if I click Retry All Changes, all the update stick and everything seems fine. Why is this happening? It's proving very annoying and is really stopping the automation of my large number of queries. A list of 5000 items isn't particular big (and they've
    got roughly 100 columns, although I didn't think that was too large either, given Excel's 200+ column limit).
    Is this due to poor query design and SQL? Is this due to connectivity issues (which I doubt, as my line seems perfect)? Is this due to Access tripping over itself and not executing the update on each row in the table, but rather executing them concurrently
    and locking itself up? I'm at wit's end about it and really need to get this sorted.
    Thanks in advance for any suggestions.

    Hi amartin903,
    According to your description, my understanding is that you got an error when you used a linked list from Access.
    The table that you are updating is a linked table that does not have a primary key or a unique index. Or, the query or the form is based on a linked table that does not have a primary key or a unique index. Please add the primary key or a unique index.
    Here is a similar post, please take a look at:
    http://social.technet.microsoft.com/Forums/en-US/545601e9-a703-4a02-8ed9-199f1ce9dac8/updating-sharepoint-list-from-access?forum=sharepointdevelopmentlegacy
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Regarding Performance pbl in SQL query.

    hey guys,
    Could somebody help me over this posting.
    I have created TAX report. which retrieved records from BSIS and BSAS table to calculate consumption tax.
    From SE30 and SQL trace i found that loop at BSIS and BSAS takes round trip
    for each Input Period value.
    could you please give me best coding alternate to my below coding part.
    *Main code--
    loop at itab_t001.(itab_t001-bukrs is company code list,for each company code)
    WK_MONAT = '01'.
      DO.
        IF WK_MONAT = P_MONAT. "p_monat is parameter input for period
          FLG_CUR_PERIOD = CNS_TRUE.
        ENDIF.
        PERFORM FRM_READ_DATA.         " RETRIEVE DATA FROM BSIS AND BSAS
        WK_MONAT = WK_MONAT + 1.
        IF WK_MONAT > P_MONAT.
          EXIT.
        ENDIF.
      ENDDO.
    END of Main code----
          Read FI documents from table BSIS/BSAS
    FORM  FRM_READ_DATA.
    Select data from table BSIS
      SELECT BELNR BUZEI BLART MWSKZ HKONT SHKZG DMBTR
        INTO CORRESPONDING FIELDS OF TABLE ITAB_BSIS
        FROM BSIS WHERE BUKRS = itab_t001-BUKRS AND  GJAHR = P_GJAHR AND  MONAT = WK_MONAT AND
        ( MWSKZ <> ' ' AND MWSKZ <> '**' ).
    Select data from table BSAS
      SELECT BELNR BUZEI BLART MWSKZ HKONT SHKZG DMBTR
        APPENDING CORRESPONDING FIELDS OF TABLE ITAB_BSIS
        FROM BSAS  WHERE BUKRS = itab_t001-BUKRS AND  GJAHR = P_GJAHR AND MONAT = WK_MONAT AND
             ( MWSKZ <> ' ' AND MWSKZ <> '**' ).
    Select data from table BSIS that includes non-consumption tax accounts
      SELECT BELNR
       INTO TABLE ITAB_NO_TAX_DOC
        FROM BSIS WHERE BUKRS = itab_t001-BUKRS AND GJAHR = P_GJAHR AND
             MONAT = WK_MONAT AND HKONT IN S_NT_ACC.
    Select data from table BSAS that includes non-consumption tax accounts
      SELECT BELNR  APPENDING TABLE ITAB_NO_TAX_DOC
        FROM BSAS WHERE BUKRS = itab_t001-BUKRS AND  GJAHR = P_GJAHR AND
             MONAT = WK_MONAT AND HKONT IN S_NT_ACC.
    ...Proceeded with ABOVE fetched internal tables.
    ENDFORM.
    Note:
    I found that BSIS and BSAS table have 10000s of records it takes 3hrs time to run this report(if i give 12months period). (for each month(ie 01month report takes 15minutes to execute.)
    so i think instead calling BSiS twice, calling BSIS ones is wise.
    could you pls help me how can i modify the code and should i have
    to created any index here(if so mention how and which field)
    pls feel free to ask if any addition code is required.
    could you pls confirm.
    ambichan.
    Message was edited by: ambi chan

    Hi Ambichan,
    Few things that can be done to the below code.
    1. Dont put select queries inside the "loop at itab_t001....endloop" statement.
    Instead use <b>FOR ALL ENTRIES</b> IN itab_t001 for the queries. Then you can use READ stmt to get the values.
    NOTE: Make sure that you select all <b>key fields</b> from the databse when using FOR all Entries.
    <i>This will avoid hitting of the DB table multiple time.</i>
    2. Avoid "INTO CORRESPONDING FIELDS OF TABLE" in select queries. Modify the internal table to suit the strucutre of the databse table.
    <i>This will make the query faster</i>
    3. Make sure that the fields in the select query are in the same order as that in DB table.
    <i>This will also make the query faster</i>
    Try these changes and performance should increase.
    Regards,
    Saji.

  • Error in TRIP T.Code

    Hi Exports,
    I am facing one problem in TRIP T.code. While executing this transaction code system is saying that "Infotype P0017 could not be read". But I maintained IT 0017 with active validity period.
    Please guide/advise me to resolve it.
    Thanks & Regards
    Rajesh

    Hi Rajesh,
                  I just read your question i just wanted to check uponHave you maintained the correct user group for the infotype you created.
    I do agree with chilly.
    in addition to it  please do check about it.
    The time constraint may also be a factor.
    As there are few constarint available while configuration.
    In the query generator please do check that whether the infotype contains field if any table/View or joins are used.It may be possible that even if everything is right.We dont have the field in the query.
    Hoping it might be a help.I will get back to check if you resolved your query or not.
    Have a best day.

  • Trip list fails in portal  - "user not found" - powl_act_query is corrupt

    Hi group,
    For one user, the trip list in portal dumps.  It dumps only for the tab/query with all trips.
    The message is "User not found" in the dump.  When we debug, we find that the table powl_act_query is corrupt. 
    For the query id in question, the key fields application and user are empty.
    We corrected the error via POWL_D01.  But can anyone explain how this could happen?
    Best regards
    Kirsten

    Hi Kirsten
    I did some checking on this error and found that it has happened on occasion that sometimes when users have their personalized queries saved in table POWL_ACT_QUERY, the names for these queries in table POWL_QUERY_T may be overwritten and subsequently the GUID is displayed on the tabstrips instead of the names.
    The solution as you found to delete the personalized queries with POWL_D01 is unfortunately the only one I couild find  to fix these queries and again show the delivered standard queries.
    Unfortunately this is more of a MC-MUS-POW issue relating to personalisation rather than travel management but you could check in SCU3 if perhaps there were any authorization errors maybe?
    This wiki link may also help
    http://wiki.sdn.sap.com/wiki/display/WDABAP/POWL
    Cheers
    Sally
    Edited by: Sally Redmond on Nov 5, 2011 10:02 AM

  • Query of query or database

    I'm creating an image gallery. My database has about 1000
    records with 10 column.
    Now I'm realising there's a lot of trips to the database.
    Would it be better that when I init my app I store the "get all"
    query and query that from that point? Or is the difference in
    performance of querying a query as a oppose to a database not worth
    it?
    If you say I should query the query, how many records would
    be too much to hold in memory.
    Thanks

    quote:
    Originally posted by:
    dandev
    I'm creating an image gallery. My database has about 1000
    records with 10 column.
    Now I'm realising there's a lot of trips to the database.
    Would it be better that when I init my app I store the "get all"
    query and query that from that point? Or is the difference in
    performance of querying a query as a oppose to a database not worth
    it?
    If you say I should query the query, how many records would
    be too much to hold in memory.
    Thanks
    It would be better to just select the records you need.

Maybe you are looking for

  • Message mapping changes

    Hi All. I created a message mapping from a custom message type towards MATMAS_BAPI01. I disabled the EDI_DC40 field and in the idoc communication channel I disabled "Apply control record values from payload". When I check the final idoc message creat

  • IPhoto - problem sending photos by email

    Hello, I now encounter a problem when I want to transfer photos to friends, something quite new !!! I get the following advertisement "The mail server did not recognize the association of your usere name and password" Can you help me solve this probl

  • Why does the Video looks Pixelated after Burning DVD

    In IDVD when I preview the video it looks great, when I burn the DVD it comes out very very pixelated. I've changed the preferences from Best Performance to Best Quality, and the project properties as well I've done the same. Does anyone know why thi

  • I2C Write.vi

    Labview 8.0 and Windows 2000. I am using NI-8451 USB to I2C Converter and the I2C Write.vi and I2C Read.vi. My question is how do you tell these vi's what address to start at? The vi's have no inputs for address. They have inputs for number of bytes

  • I have an IPod touch 4 gen. And I'm having problems with the audio when I use other than Apple brand earphones

    I have an Ipod Touch 4 gen. and I'm having problems with audio when I use other than Apple brand earphones. I'm talking about music only so far, when I use apple earphones all is fine, but if I use other type of phones ( sony for exemple ) I can only