Equipment count incorrect in query

Hello BI Gurus,
We are facing the following problem. I have a report requirement in the following format.
                     Sep-07     Oct-07     Nov-07     Dec-07
Total No of Machines      11     11     12     12
Machines relate to Equipment here. I am extracting this data from 0equipment_attr. This report is for a given Region, Plant and for a particular type of machine.
The problem here is as follows.
Let us suppose that equipment moves from plant X  to another plant Y in September and later to plant Z.
Equipment should reflect the changes in Total number of machines.
Currently, Equipment has "From" and "To" date. Based on this, I am getting this value in calmonth,
let us say for example for
Equipment                 From date                 To Date                  Calmonth     Plant
400000          17.07.2008     01.01.1000     
400000          24.12.2008     18.07.2008     07.2008     1101
400000          31.12.9999     25.12.2008     12.2008     1103
Though, I am getting Calmonth correctly to indicate the status of the equipment present for that month..
I have 2 problems, first of all, at query level, it just shows 1 record with the latest month that is in this case , Dec 2008. but incase of equipment master i do see both the records..
In my reporting requirement, It needs to have history data over 12 months, so a given equipment will not indicate the status correctly..
As we see in the above example, equipment 400000 is moved from plant 1101 to 1103, when i look at query, it just shows me one record which is the latest..
I believe the problem here is with time dependency. calmonth is time dependent attribute in 0equipment, if i turn it time independent, all the values in calmonth will be same, i.e 12.2008 which should not be the case..
So in short there are 2 problems, how do i get the correct status of equipment at monthly level with the current scenario and second one will be for the months where there is no movement of equipment, it should show the correct count of equipment.,.
Please advice..
Thanks in advance,

Hi Vipul,
             Check this url.....
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a
Thanks,
Vijay.

Similar Messages

  • Special Field- Record Number count incorrect

    Hi,
    Looks like the record number special field is displaying the record count incorrectly. There are no records returned by the query nor there are any records in the detail section of the report. But the record number in the report footer shows 1. Is there any way to fix this?
    Thanks in advance,
    Sirisha

    One way to "fix" it would be to do a count on a field in the details section and then compare that count to NULL or zero and if so then display zero otherwise display the recordnumber.
    1.  Create a running total on a field in the details section that doesnt reset.
    2.  Create a formula with:
    if isnull({#RTotal0}) or {#RTotal0} = 0 then 0 else recordnumber
    3.  Display the formula instead of the recordnumber in the report footer.

  • Returning a count from a query using Union

    Hi. I'm attempting to select a count from this query and then display the total in a message, but I'm getting a 'Too many rows returned' (ORA-01422). Can anyone tell me how I can achieve a total for this query?
             SELECT nvl(count(*),0)
           INTO conflict_cnt
           FROM dropper_assign
           WHERE dropper_id = :dropper_vacations.dropper_id AND
                trunc(sched_date) between :begin_dt and :end_dt
              union                          
       SELECT nvl(count(*),0)
        FROM exfc.bundle a, splits b
        WHERE a.bundle = b.bundle AND
             b.dropper_id = :dropper_vacations.dropper_id AND
             trunc(a.actual_dt) between :begin_dt and :end_dt;
              call_alert.the_error('test: '||to_char(conflict_cnt));Any help would be greatly appreciated.

    Thanks Christian, I can know return to my favourite present occupation named HOLIDAYS ;)
    btw with count function as the first message
    WITH
      data AS
        SELECT
          COUNT(*) cnt
        FROM
          dual
          CONNECT BY level <= 10
        UNION
        SELECT
          COUNT(*) cnt
        FROM
          dual
          CONNECT BY level <= 20
    SELECT
      SUM(cnt)
    FROM
      data
    SUM(CNT)              
    30        
    /* and */
    WITH
      data AS
        SELECT
          COUNT(*) cnt
        FROM
          dual
          CONNECT BY level <= 10
        UNION ALL /****** returns me also 30 *****/
        SELECT
          COUNT(*) cnt
        FROM
          dual
          CONNECT BY level <= 20
    SELECT
      SUM(cnt)
    FROM
      data
    SUM(CNT)              
    30       result will defer only if both count return exactly the same value so definitely UNION ALL for that case or the simple solution I have provided before ...
    but leave it. that's enough messages for this thread ;)
    Jean-Yves
    Edited by: JeanYves Bernier on 9 août 2011 17:42

  • How can I evaluate the count of a query I'd like to execute with a map...

    Hi. I have a problem with a query...
    I hava created a query which a execute with a Map (I use the
    executeWithMap(Map) method). The problem is that sometimes this query
    returns a large resultset. So, I would like to execute an other query
    (called query_count) before executing ther final query with the Map. If
    the query_count returns a count < 200, I execute the final query. How can
    I do ? There is an example I have read this in the documentation :
    Query query = pm.newQuery (Magazine.class, "price < 5");
    query.setResult ("count(this)");
    Long count = (Long) query.execute ();
    The problem in this example is that the query is not execute with a Map.
    So my question is : "How can we do the evalute the count of a query we
    would like to execute with a map ?". Thank you for any response.

    Hi John,
    You should be able to executeWithMap that query, too. Is that giving you
    problems?
    Note that there may be an easier solution. What do you do if there are more
    than 200 results? If, e.g., you just get the first N, then one option is to
    set the FetchBatchSize on the query to N (thus activating large result set
    support), and then call size () on the resulting Collection. This will
    issue a SELECT COUNT(*) to the database to determine the size automatically.
    Thanks,
    Greg
    "John" <[email protected]> wrote in message
    news:ctq9a8$4gr$[email protected]..
    >
    Hi. I have a problem with a query...
    I hava created a query which a execute with a Map (I use the
    executeWithMap(Map) method). The problem is that sometimes this query
    returns a large resultset. So, I would like to execute an other query
    (called query_count) before executing ther final query with the Map. If
    the query_count returns a count < 200, I execute the final query. How can
    I do ? There is an example I have read this in the documentation :
    Query query = pm.newQuery (Magazine.class, "price < 5");
    query.setResult ("count(this)");
    Long count = (Long) query.execute ();
    The problem in this example is that the query is not execute with a Map.
    So my question is : "How can we do the evalute the count of a query we
    would like to execute with a map ?". Thank you for any response.

  • Count(*) with nested query

    Hi,
    I have a question about the count(*) with nested query.
    I have a table T1 with these columns:
    C1 number
    C2 number
    C3 number
    C4 number
    C5 number
    (The type of each column is not relevant for the example.)
    This query:
    select C1, C2, C3, C4
    from T1
    group by C1, C2
    it's not correct becausa C3 and C4 are not columns specified in the GROUP BY expression.
    If if run this query:
    select count(*)
    from (select C1, C2, C3, C4
    from T1
    group by C1, C2)
    I haven't an error message (the result is correctly the number of records).
    Why?
    Thanks.
    Best regards,
    Luca

    Because you are just selecting count(*) and none of the columns from the subquery, Oracle is optimising it by ignoring the selected columns and just running the sub query with the group by columns. I know it seems odd, but if you take a basic example:
    SQL> ed
    Wrote file afiedt.buf
      1  select count(*)
      2  from (select empno, sal, mgr, deptno
      3  from emp
      4* group by deptno)
    SQL> /
      COUNT(*)
             3... all columns but deptno are ignored
    ... but if you include one of the other columns, even if you group by that column...
    SQL> ed
    Wrote file afiedt.buf
      1  select count(*), empno
      2  from (select empno, sal, mgr, deptno
      3  from emp
      4  group by deptno)
      5* group by empno
    SQL> /
    group by empno
    ERROR at line 5:
    ORA-00979: not a GROUP BY expression
    SQL>... the error returns, because you're forcing oracle to include the column in the subquery.

  • Column count of dynamic query

    how can ı find column count of dynamic query
    is there a simple way
    thanks

    You can use DBMS_SQL to facilitate this:
    CREATE OR REPLACE FUNCTION count_sql( p_sql IN CLOB )
    RETURN INTEGER
    AS
            lv_cursor_id    INTEGER;
            lv_columns      DBMS_SQL.DESC_TAB;
            lv_column_count INTEGER;
    BEGIN
            -- Open Cursor
            lv_cursor_id := DBMS_SQL.OPEN_CURSOR;
            -- Parse Cursor
            DBMS_SQL.PARSE
            ( c             => lv_cursor_id
            , statement     => p_sql
            , language_flag => DBMS_SQL.NATIVE
            -- Describe Columns
            DBMS_SQL.DESCRIBE_COLUMNS
            ( c       => lv_cursor_id   
            , col_cnt => lv_column_count
            , desc_t  => lv_columns
            -- Close Cursor
            DBMS_SQL.CLOSE_CURSOR(lv_cursor_id);
            RETURN lv_column_count;
    END count_sql;
    /Example:
    SQL > SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL > SELECT count_sql('SELECT dummy, dummy, CASE WHEN dummy = ''X'' THEN 1 ELSE 0 END AS col FROM DUAL') FROM DUAL;
    COUNT_SQL('SELECTDUMMY,DUMMY,CASEWHENDUMMY=''X''THEN1ELSE0ENDASCOLFROMDUAL')
                                                                               3
    SQL > SELECT count_sql('SELECT dummy, dummy, dummy, ''Y'' FROM DUAL') FROM DUAL;
    COUNT_SQL('SELECTDUMMY,DUMMY,DUMMY,''Y''FROMDUAL')
                                                     4Hope this helps!

  • How to return the record count of a query to a number variable

    How would I get the record count from a query without using a cursor to step through the query and count the records individually?
    query: select * from table1 where column1 = column2
    How would I get the record count of the query above?
    thanks,
    michelle

    I figured it out
    select count(*) into theCount
    from ( select * from table1 where column1=column2 );
    thanks,
    michelle

  • Getting a record count in a query using UNIQUE

    I need to know how to grab a record count for a query so I can pass it back into the recordset.
    This select query uses UNIQUE to rollup the 555 records to 125 unique rows.
    But how would I do a record count.
    Do I pass the query to a cursor and then count the records in the cursor?
    Please detail your help please.
    Thank you in advance.

    SELECT unique
         CE.DATE_OF_SERVICE AS DOS_FROM
         ,CE.SERVICE_END_DATE AS DOS_TO
         ,CE.EVENT_SERVICE AS SERVICE_TYPE
         ,CN.CREATE_DATE_TIME
         ,CN.CASE_NOTE_ID
         ,CN.CASE_ID
         ,CN.EVENT_ID
         ,CN.REASON
         ,CN.CREATOR_USER_ID AS CREATOR_ID_USED
         ,CN.ROWID AS ROW_ID
         ,(SELECT Retrieve_Note2(CN.CASE_ID,CN.CASE_NOTE_ID) from DUAL) AS NOTE
    FROM
         MEMBER_TO_PATIENT MTA,
         CARE_EVENT CE,
         CASE_NOTES CN
    WHERE
         MTA.SUBSCRIBER_LID = '1260016473015' AND
         MTA.CASE_ID = CN.CASE_ID AND
         CN.EVENT_ID = CE.EVENT_ID
    ORDER BY
         CN.CASE_NOTE_ID DESC

  • Create a counter(in a query) by how many unique items are in a document num

    Hi,
    Is there a way for me to create a counter(in a query) by how many unique items are in a document number?
    If you look at the bold amounts below they have two unique item numbers 3 & 11. Because of that data is being duplicated in the InfoSet. The Subtotal needs to be 13500 instead of 27000. The two subtotals above are correct. I was thinking if I can create a create a counter(in a query) by how many unique items are in a document number (in this case it would be 2). And then if i divide Quantity by that counter, i shall get the correct value of 13500.
    How can i do this?
    Thanks
    Doc Num                  Item #       Quantity
    5900001759     11     2,700
    5900001759     11     5,400
    5900001759     11     2,700
    5900001759     11     2,700
    5900001759          13,500
    5900001890     7     2,700
    5900001890     7     5,400
    5900001890     7     2,700
    5900001890     7     2,700
    5900001890          13,500
    5900002176     3     2,700
    5900002176     11     2,700
    5900002176     3     5,400
    5900002176     11     5,400
    5900002176     3     2,700
    5900002176     11     2,700
    5900002176     3     2,700
    5900002176     11     2,700
    5900002176          27,000          
                             54,000

    Create a New Calculated Key Figure
    From the context menu for the Formula Variable, choose New Variable
    Choose the Processing type as Replacement Path
    In the next screen, select the Characteristic Info Object based on which the number of documents is to be displayed in the report (For example: Document Number / Order Number).
    Choose Next.
    In the Replace Variable with drop down box, choose Attribute Value.
    In the Attribute drop down, select Characteristic Reference (Constant 1).
    Choose Next.
    On the Save Variable page, an overview of the settings made for the variable will be displayed.
    Confirm the entries and Choose Finish.
    Open the formula variables directory and use Drag & Drop to transfer the formula variable
    To avoid the warning message, the formula variable is multiplied by 1
    The most important step here is to set the Time of Calculation to After Aggregation in the KF properties.
    (by Default the Time of Calculation is set to After Aggregation)
    The new calculated key figure is available under Calculated Key Figure in the Key Figure directory, and can be included in the query definition using Drag & Drop.
    Hope this help
    Rgds

  • Deployment - RemoteException: Incorrect QL query ...

    Hi everybody,
    I am currently trying to migrate from WLS 8.1 to SAP WEB AS 6.40 SP11. I have built my application EAR and already
    resolved some typical migration issues in my deployment descriptors. The EAR contains multiple component jars with
    their according deployment descriptors My current problem is a tough one though. Neither the exception nor the stack
    reveals where the exact problem lies. I checked my persistent.xml and ejb-jar.xml for well-formedness and
    validity ... everything's fine.
    here is the stack:
    [code]<i>Starting Deployment of myApp
    Aborted: development component 'myApp'/'mycompany.com'/'localhost'/'2005.10.28.10.14.19':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application mycompany.com/myApp.. Reason: Incorrect QL query: , errors: line 1: expecting "select", found '<end-of-query>'line 1: expecting "from", found '<end-of-query>'.; nested exception is:      com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect QL query: , errors: line 1: expecting "select", found '<end-of-query>'line 1: expecting "from", found '<end-of-query>'.
         at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.prepareQLContext(QLTranslator.java:191)
         at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.translateQuery(QLTranslator.java:103)
         at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.translateAllQueries(QLTranslator.java:171)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.translateQL(DeployAdmin.java:1398)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2118)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:594)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:296)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3033)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:463)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1555)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    ', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect QL query: , errors: line 1: expecting "select", found '<end-of-query>'line 1: expecting "from", found '<end-of-query>'.
         at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.prepareQLContext(QLTranslator.java:191)
         at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.translateQuery(QLTranslator.java:103)
         at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.translateAllQueries(QLTranslator.java:171)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.translateQL(DeployAdmin.java:1398)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2118)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:594)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:296)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3033)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:463)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1555)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)</i>[/code]
    I tried the deployment via SDM, Visual Administrator, SWDS and deploytool, but without success.
    Using the Visual Administrator I get a totally different exception. I thought that the deployment can be done by
    any of the above mentioned tools with the same outcome. There is no storage.xml included in the jar, the
    persistent.xml and ejb-jar.xml are parsable, thus they are wellformed and valid:
    [code]<i>com.sap.engine.deploy.exceptions.BaseIOException: Cannot parse persistent.xml or storage.xml for JAR C:\usr\sap\J2E\JC00\j2ee\admin\.\temp\deploying\deploy_temp\reader1131614442531\comp.jar.
    Reason: com.sap.engine.deploy.exceptions.BaseIOException: Cannot parse ejb-jar.xml for JAR C:\usr\sap\J2E\JC00\j2ee\admin\.\temp\deploying\deploy_temp\reader1131614442531\comp.jar.
    Reason: java.lang.ArrayIndexOutOfBoundsException: 2..
         at com.sap.engine.deploy.ejb.descriptors.jar.ReadEjbJar.getEjbJarDescriptor(ReadEjbJar.java:130)
         at com.sap.engine.deploy.ejb.descriptors.jar.ReadEjbJar.getEjbJarDescriptor(ReadEjbJar.java:150)
         at com.sap.engine.deploy.tool.deployer.ExtendedEarReader.loadDescriptorFromFile(ExtendedEarReader.java:230)
         at com.sap.engine.deploy.tool.deployer.ExtendedEarReader.getFullEarDescriptor(ExtendedEarReader.java:102)
         at com.sap.engine.services.deploy.gui.runtime.EarLoader.loadEar(EarLoader.java:137)
         at com.sap.engine.services.deploy.gui.runtime.MainDeployPanelLogical.loadEarAction(MainDeployPanelLogical.java:169)
         at com.sap.engine.services.deploy.gui.runtime.EarDialog.setEar(EarDialog.java:79)
         at com.sap.engine.services.deploy.gui.DeployDialogLogical.okButtonAction(DeployDialogLogical.java:294)
         at com.sap.engine.services.deploy.gui.DeployDialogLogical.actionPerformed(DeployDialogLogical.java:71)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
         at java.awt.Dialog$1.run(Dialog.java:540)
         at java.awt.Dialog.show(Dialog.java:561)
         at java.awt.Component.show(Component.java:1133)
         at java.awt.Component.setVisible(Component.java:1088)
         at com.sap.engine.services.deploy.gui.DeployDialogLogical.showDialog(DeployDialogLogical.java:378)
         at com.sap.engine.services.deploy.gui.ApplicationsPanel.deployAction(ApplicationsPanel.java:409)
         at com.sap.engine.services.deploy.gui.ApplicationsPanel.actionPerformed(ApplicationsPanel.java:351)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)</i>[/code]
    Any help is highly appreciated.
    thanks and best regards
    Marcel

    Hi Marcel,
    Actually what this error means is that you have a method in your EJB QL that has incorrect syntax.  If you look at the ejb-jar.xml file for your project you should see a section like this:
                <query>
                    <query-method>
                        <method-name>findByNameAndID</method-name>
                        <method-params>
                            <method-param>java.lang.String</method-param>
                            <method-param>java.lang.Long</method-param>
                        </method-params>
                    </query-method>
                    <ejb-ql>select Object(inv) from InventoryBean inv where
                        inv.manufacturer = ?1 and inv.productID = ?2</ejb-ql>
                </query>
    This should correspond to the finder methods that you have defined for your entity bean.  If it doesn't (i.e. variables don't match up) or if the syntax is incorrect you will get the error you mention.  Note that it is also case sensitive. 
    Cheers,
    Steve
    If you find a post useful, please help keep the community going by setting a good example and rewarding the poster with points.

  • Ipad air email, unread message count incorrect

    ipad air email, unread message count incorrect.
    Exchange email account via activesync.
    All messages are sync'd to the device.

    Contact your exchange account administrator, they should be able to fix this for you.

  • IPad music app: album count incorrect/too large in artist view

    Hello,
    My problem isn't critical, but it is really annoying. My third generation iPad is showing incorrect album counts for artists under artist view in the Apple music app.
    For example, I have just one Coldplay album (Viva La Vida) uploaded to my iPad, but the music app reads the following under the album/artwork in artist view: "10 songs, 15 albums".
    I have turned the iPad on and off. I have done a hard reset (by holding home and power button down until iPad shuts off and then tirns on again). I have restored the iPad from a back up through iTunes. I have restored it to factory settings through iTunes and set it up as a new iPad. I have erased the iPad using the iPad "settings/general/reset/erase all contents and settings" option. I have synced the iPad with iTunes and utilized the music tab to replace the music on the iPad. I have uploaded the albums through the iTunes store. I have synced them from my computer.
    NONE of these options have worked. They all result in incorrect album counts.
    This seems to be a problem which surfaced after I upgraded to iOS6, but I am not sure if that is what caused the issue.
    Thanks in advance for any help.
    Cubulous

    This is some sort of issue with iOS6. There are several threads (and theories) as to why this is happening. But the bottom line is, Apple needs to correct the problem.
    One person indicated that the actual number of albums (by a particular artist) in his iTunes Library was the number of albums indicated on the iPad, regardless of the number of albums he chose to sync. In other words, if I have 10 albums by artist "ABC" in my iTunes Library, but chose to sync only 5 of them, the iPad would still indicate 10 albums by "ABC" (because it's looking to the iTunes Library for the album count instead of the number of actual albums that were synched to the iPad). While that theory makes sense, I found it to be somewhat untrue, at least in my case.
    What I discovered is, if you rename or make a change to any of the metadata associated with a track from a particular album, then that album is duplicated when you sync, displaying the original album tracks (sans the one or two you changed) under the album name and a second version is created (using the exact same album name) but displaying only the track or tracks you modified. This in turn, increases your album count by one. So instead of showing the entry as just one album, the count now reads two for the same title. To make things even more confusing, if you go back and modify both versions of the album, successully combining the two back into one, so to speak (this can be done by renaming the artist to some other name, synching, then renaming it back to the correct artist), the album will then display correctly (just one "vesrion" showing on the iPad), but the album count remains unchanged (still indicating two). Basically, the count isn't reset, but remains incorrect.
    Hopefully, I didn't confuse everyone. But it's difficult to explain. From everything I've read, it appears to be a combination of things; Album count and display, as well as creating additional album "instances" if any tracks are modified.
    In any event, I hope they fix it soon. Because if you have a large music library like mine, it takes no time to really screw things up!

  • Showing column value as counter in sql query - report

    I created a classic report with search bar based on an sql query. I would like to show the "notes" column in this query using some sort of counter and as a hyperlink to another section on the page (same idea as footnotes in a book). So if I have 10 rows and 5 have "notes". I should show 1,2,3,4,5 in the notes column for those rows and the number gets displayed as a link to another section listing the notes 1 through 5.
    I was thinking of creating a hidden page item as the counter with value of 0 and then in my query doing counter+1 but i'm not sure how to do this or if i can do that...
    If anyone can help or have any other ideas I would really appreciate it!!
    Thanks,
    Hindy

    Well, I'm doing this in VB and the subquery is dynamic. I'm passing an ADO recordset to a routine that sets up a listview to display the results. The number of columns selected can vary. My idea was to size the columns appropriately based on the size of the data. Within the display routine I could:
    sql = "SELECT "
    for i = 0 to oRS.Fields.Count - 1
    sql = sql & "MAX(LENGTH(" & i & ")), "
    next 'i
    sql = sql & "FROM (" & oRS.Source & ")"

  • Count of a query in Unix environment and use sysdate

    hi,
    i have a code below and i want this to be used in Unix env and i need to use sysdate where i hard coded the date but the time should remain as it is.
    select count(type),type from ebizp.bchistevent
    where (type = 'com.avolent.apps.event.LoginEvent' or type = 'com.avolent.apps.event.LogoutEvent')
    and(to_char(createdt, 'dd/mm/yy hh24:mi s') between '28/01/13 08:00:00' and '28/01/13 09:00:00')
    AND ( bucket = to_char(sysdate-1, 'YYYYMM') OR bucket = to_char(sysdate, 'YYYYMM') OR bucket = 0)
    group by type
    like it should be between 'sysdate 08:00:00' and 'sysdate 09:00:00')
    please suggest.

    Dates should be compared with dates values. Don't use to_char to compare date values.
    And dont use "TYPE" as a column name - it is a reserved key word..
    select count(type), type
    from ebizp.bchistevent
    where (
        type = 'com.avolent.apps.event.LoginEvent'
        or type     = 'com.avolent.apps.event.LogoutEvent'
    AND createdt BETWEEN trunc(sysdate)+(8/24) AND trunc(sysdate)+(9/24)
    and (
      bucket = to_char(sysdate-1, 'YYYYMM')
      or bucket    = to_char(sysdate, 'YYYYMM')
      or bucket    = 0
    GROUP BY type;And you can simplify the query
    select count(type), type
    from ebizp.bchistevent
    where type in
        ('com.avolent.apps.event.LoginEvent','com.avolent.apps.event.LogoutEvent')
    AND createdt BETWEEN trunc(sysdate)+(8/24) AND trunc(sysdate)+(9/24)
    and bucket in
         (to_char(sysdate-1, 'YYYYMM'),to_char(sysdate, 'YYYYMM'),'0')
    GROUP BY type;Edited by: jeneesh on Feb 19, 2013 2:42 PM

  • How to get count(*) in ABAP Query...

    Hi All,
    Can someone of you tell me, how to do the following in the ABAP Query. I want to get the count of records retreived during the query execution and display it in the output.
    example:::   Select count(*) from VBRK.
    Thanks a lot.
    Thanks!
    Puneet.

    From help doc:
    Note
    The SELECT COUNT( * ) FROM ... statement returns a result table containing a single line with the result 0 if there are no records in the database table that meet the selection criteria. In an exception to the above rule, SY-SUBRC is set to 4 in this case, and SY-DBCNT to zero.
    You can just run SELECT COUNT (*) FROM TABLE
    Number of rows is returned in SY-DBCNT
    Edited by: Kevin Lin on Jul 2, 2008 10:55 PM

Maybe you are looking for

  • Function Module to open a new session displaying a method of a class

    Hello All, I have a method A of class B. Now, in my current session, I have a button. When the user clicks on this button, what I expect is that a new session be opened and in the new session method A of class B be displayed. This is similar to the d

  • Clicking a link will not open a new tab

    On a Win7 computer, Firefox 34.0.5 works fine for the administrator account. For the user account however, a new tab will not open when clicking on a link in a web page. The settings under options / tabs are all checked properly. I have uninstalled F

  • ? about front audio connections

    How do I connect my front panel to my board ? Front I/O ports (audio) 4 - Line Out FR (RED) right channel audio signal to front panel 5 - Line Out RR (blue) right channel audio signal return from front panel 6 - Line Out FL (white) Left channel audio

  • Licensing with a volume license while offline

    I have installed Photoshop on my target computers with no internet access and now need to license them, I have a volume license but this does not provide the key needed to add to the request code to generate a response code, therefore HOW DO I LICENS

  • 2007 iMac Blurred Screen of Death

    Hi, I'm running an intel based iMac with 4GB of ram, and am running OS X 10.10.1. I have recently encountered a rather large problem. I have been attempting to boot, however nothing will respond. I have reset the NVRAM and the PRAM, and it will no lo