Urgent!!COUNT VALUES!!

Hi all,
Any one tell me ,How to do a Count values based on the Characteristic which is a header item Shopping cart...
I dont have a keyfigure,I think  I have to create a KF,there is restricted key figure NUMBER  OF RECORDS with selection Char. COUNTER..pls help me ASAP
Ex:
Header Shopping cart     line item            Count
              10000000           1                        1
                                       2                       0
                                       3                        0
Result                                                       1
So it is based on the header level,Pls revert me ASAP.
thnx
Raj

Hello ,
Check this PDF.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20get%20the%20document%20count%20in%20a%20query%20using%20formula%20variable%20with%20processing%20type%20replacement%20path.pdf
Regards,
SRIKANTH

Similar Messages

  • How to get counter value from Historian

    Hi Experts,
    We have got a scenario to keep the number (counter) to see how many time a value of tag have been changed.
    For Example:
    If the values change from 1 to 0 and  0 to 1 for 25 times in a minute. We would like to get this number (25) from Historian (Wonderware).
    Currently we are not using any Pco to fetch the value from Hisotrian since we are able to fetch the tag values from Historian database through SQLConnection.
    I would like to know if we introduce Pco, will that help us to get this counter value.
    We are working on MII 15.0 version.
    Any help of this very much appreciated.
    Thanks
    Shaji

    Hi Shaji,
    PCo OPC DA does not support  PCoQuery TagAggregateMode as it only has access to Current Values of OPC Tags, because OPC DA only provides Current Value access.
    I know it is possible to execute SQL queries against the Wonderware Historian to retrieve counts aggregates, but don't have the details handy. Recommend that you deploy the InSQLPCo Data Server in MII and try using the PCoQuery TagAggregateMode method to retrieve the Counts aggregate first.
    Regards, Steve

  • How to get counter values from pci 6221 card?

    Hii
     I am using PCI 6221 card .. In that i am using the ctr o .. In my application i am using Linear encoder to measure the Lift movement.. so from software how to access the counter values i.e how much mm it moves... 

    Measure Angular Position.vi in the LabVIEW examples will be a good starting point. Adapt it to Linear Encoder by clicking on the selector below DAQmx Create Channel.vi.
    You can also create a corresponding DAQmx Global Channel (or task) in MAX and then use it in your code.
    Feel free to post back if you need further help.
    Message Edité par JB le 10-31-2008 02:15 PM

  • Counter value jumps on occasion (PXI 6255)

    I am using a PXI 8108 controller (Windows) with a PXI 6255 AI card. A pulse generator (1 KHz) is incrementing the hardware counter of that AI card in order to have an external reference clock, i. e. having a timestamp for each AI sample value.
    I am reading 1000 AI values from several channels  (together with 1000 counter values) via DAQmx blocks with a higher frequency than the external clock's 1 KHz (e.g. AI Rate 5 KHz-> reading every counter value approx. 5 times). Every now an then I am losing counter values, e. g. counter value 6789 is followed by 6823.
    Shouldn't be the PXI card's counter buffer independant of Window's CPU load? Getting 1000 values from the card buffer, the jumps are even located in the middle of the 1000 values. Maybe there's a problem with atomicity while reading from the buffer, so that I get 500 values from the buffer, (pause), and 500 more values from a later point in time. Is this possible?
    I am sure, I can not blame the digital pulse generator (from Hameg Instruments) for dropping pulses.
    Attachments:
    counter-daq.png ‏20 KB

    Hello,
    If the first scan only places 4 samples in the AI FIFO (2 less than the number of channels requested), then I would expect this loop to run forever in aiex1.cpp (I added some debugging prints to make it easier to see the channels that should be getting returned).
           while ( m < numberOfChannels )
            if(!board->AI_Status_1.readAI_FIFO_Empty_St())
                value = board->AI_FIFO_Data.readRegister ();
                aiPolynomialScaler (&value, &scaled, &scale);
                printf ("Channel %d: %e,\n", m, scaled);
                m++;
        printf("\tEnd of Sample %d\n", n);
    How is the example able to proceed past this loop?
    I have checked the code for FIFO flushes and resets between aiStartOnDemand (board); and when the FIFO gets read.  I have also run the example with 6 channels, this time on Windows.
    To proceed we would need these items:
    1) We would need the exact output (with my added debug prints).
    2) A complete dump of all registers accessed during the example.
    Steven T.

  • How to get seeburger work bench counter value

    hi all,
    i want to get the current counter value in the seeburger workbech counter.
    i used the following function suggested in one of the threads in forum, but its giving the below error
    func used:
    try {
    VariableBean be=VariableFactory.getVariableInstance("");
    return be.getStringVariable(variableName);
    } catch (Exception e) {
    throw new RuntimeException(e);
    error:
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.RuntimeException: java.lang.RuntimeException: VariableBeanServlet: Could not call getVariable() method of the Servlet. Cause=java.lang.ClassCastException]
    i guess this above function is to get variable value and not counter value. can any body give me code to get counter value.
    Thanks a lot in addvance
    Regards,
    Rashmi
    Edited by: Rashmi H S on Aug 12, 2009 2:30 PM

    use getCounter
       //write your code here
    try {
    CounterBean be=CounterFactory.getCounterInstance();
    return ""be.getCounter("counterName_"b"_"a );
    } catch (Exception e) { 
        throw new RuntimeException(e.getMessage()); 
    will return the same counter what you have ,I also had same scenario what you are facing recently
    HTH
    Rajesh
    Edited by: Rajesh on Aug 13, 2009 7:49 PM

  • Idoc to file scenario which involves accessing a persistant counter value

    Hi,
    Presently Iam dealing with an idoc to file scenario in which I need to map the idoc info and also a persistant counter value to a flat file. So in how many ways can we maintain a persistant counter value(either by variable/file/database)? Please can any one help me in overcoming this scenario by providing any implemented example.

    Hi,
    Please see the following links , you can use database is best.
    /people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
    /people/michal.krawczyk2/blog/2005/09/15/xi-rfc-mapping-lookups-from-bc-to-xi
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/alexander.schuchman/blog/2005/09/29/ipc-customization--add-additional-subtotals-and-include-rebate-conditions
    Regards
    Chilla..

  • XI Adapter Illegal count value 0

    Hi all,
    When configuring the PI Adapter to connect for outbound messaging from MDM, we are receiving the following error:
    Illegal Count Value 0
    This error is in the Component Monitoring.
    Looking in the logs, this seems to be occuring because of the error here:
    Catching java.lang.Exception: Illegal count value 0.
    at com.sap.mdm.xiadapter.util.MdmUtil.getPortProperties(MdmUtil.java:98)
    at com.sap.mdm.xiadapter.AbstractMdmAdapter.start(AbstractMdmAdapter.java:214)
    at com.sap.mdm.xiadapter.MdmSender.start(MdmSender.java:46)
    at com.sap.mdm.xiadapter.jca.XIConfiguration.channelAdded(XIConfiguration.java:160)
    at com.sap.aii.af.service.administration.impl.AdminManagerImpl.notifyChannelActivationStateChanged(AdminManagerImpl.java:796)
    at com.sap.aii.af.service.administration.impl.cluster.ClusterManager.eventReceivedSync(ClusterManager.java:426)
    at com.sap.aii.af.service.event.impl.worker.sync.SyncLocalWorker.work(SyncLocalWorker.java:52)
    at com.sap.aii.af.service.event.impl.worker.sync.AbstractSyncWorker.startWork(AbstractSyncWorker.java:40)
    at com.sap.aii.af.service.event.impl.EventManagerImpl.sendEventAndWaitForAnswer(EventManagerImpl.java:484)
    Could anyone provide any advice on this?  The error occurs even if the Port is deliberately configured incorrectly, but only occurs when the Remote System is correctly configured.  Changing the user seemed to make no difference.
    We are using 7.1 SP05
    Thanks in advance,
    David
    Edited by: David Apthorpe on Jul 21, 2010 3:54 PM

    Hi David,
    The error "Configuration Error:illegel count 0" will be fixed MDM 7.1 SP05 Patch06 (bulid 7.1.05.87) which is planned to be released by beginning CW 32 2010.
    This issue only  occured for only Prior to created Communcation Channel SPO5.
    If you create Communcation Channel After Upgarde SP05 ,The messages successfully processed t
    o MDM server(Ready folder).
    Regards,
    Ramesh

  • DB adapter retry count value

    Hi gurus,
    I am using a db adapter for polling options. The option used is 'Delete the row(s) that were read' .
    Here the retry count by default is set to unlimited. Is this the recommended one? In normal db adapter options i see the retry count as '4'
    the property value seen in composite.xml is shown below
    <property name="jca.retry.count" type="xs:int" many="false" override="may">2147483647</property>
    Will this lead to any performance issues? Or what could be the correct retry count value?
    Please let us know.

    Hi,
    We have used the polling options using Logical delete vastly in our project and never faced any performance issues with respect to this property value being set to 'unlimited'.
    I believe there should not be any performance issues with respect to the 'Delete the row(s) that were read' option as well.
    According Oracle documentation:
    In the Auto-Retries section, specify the value for auto-retry incase of time out. In case of a connection related fault, the Invoke activity can be automatically retried a limited number of times. You can specify the following values in the fields in this section:
    To retry indefinitely, type unlimited in the Attempts field.
    Interval is the delay between retries.
    Backoff Factor: x allows you to wait for increasing periods of time between retries. 9 attempts with a starting interval of 1 and a back off of 2 leads to retries after 1, 2, 4, 8, 16, 32, 64, 128, and 256 (28) seconds.
    Thanks,
    Deepak.

  • How to dynamically set Min count and Max Count values in Adobe Print Form?

    How to set the Min Count and Max Count values dynamically in a Print Form?
    The values when set should over ride the values set in Binding Tab.
    This is all needed to print multiple Material Number labels on a single page - and the number of labels to be printed needs to be under user control - something like an Avery Address labels
    Please advise.
    Thanks,

    Here is a work around that works for me and may not be an intelligent solution .
    I kept the Min Count to 1 on the subform binding properties.
    Per the number of labels required, I appended the same item to the internal table so many times and passed it to the label.
    it works fine for my requirement.
    However - leaving out the post for a while to see if this can be done at the form level via scripting.
    Thanks,

  • How to get record count value in variable

    Hi,
    i wanted to capture record count value in the variable?
    Please let me know how to do this?
    Thanks,
    jag

    To determine count of records, use: count(field_name) -- replace field_name with your appropriate field.
    You don't have to save the record count value in a variable. You can directly use the condition <?if: count(field_name) > 0?> display table <?end if?>
    If you want to store it in a variable: use <?variable:record_cnt;count(field_name)?>
    Take a look at this post that uses a record count: https://blogs.oracle.com/xmlpublisher/entry/no_data_found
    Thanks,
    Bipuser

  • Accessing counter value on STARTTRIG/ACQ line for Dio-6533

    Hello,
    Using LabVIEW 6.1 for MacOS (on a laptop), NI-DAQ 6.9.
    I was wondering if there's any way to access the counter value assosicated with each control group for the dio-6533. Basically, I want to use triggered i/o; however, I don't want it to generate/acquire on each trigger, but wait for a set number of triggers. DIO boards don't seem to have a feature like certain E-series boards where you can specify that the board wait for a certain number of trigger pulses; I thought to circumvent this by accessing the counter and arming the trigger just before the pulse that I want it triggered off of.
    Thanks for any insight you can offer.
    Regards,
    jdk

    Hello;
    The only way to accomplish that is to use another board together with the 6533. You can even get a low cost E-series board, and use the available general purpose counters to create the necessary delay, and then enable the external pulse train to start clocking data in/out on the 6533.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Connect by Level using count value from record collection

    Hello:
    PROBLEM:
    ) y,(select rownum MonthNo from dual connect by level <= Cnt)
    Causes ORA-00904 Invalid identifier. Why can’t I use “Cnt” from my main query as using a constant works?
    The count value is determined for each date range in How can I return the records I need?
    Thanks, Sidney
    BACKGROUND:
    I need to be able to display a list of tax returns to my users and the status of those returns. Physical returns do not exist so it is necessary to create the data records dynamically using appropriate selects. This is not difficult and I thought I could then just use a connect by level to give me the date information so I could calculate and display the individual returns. However oracle is giving me an ORA-00904 when I try to send the “Cnt” value to connect by level. Everything works fine when I provide a constant instead of “CNT”. The “CNT” value is determined by a complex process that computes the start and stop dates for multiple return types, etc. as well as the number of periods and filing frequency. The data has to be dynamically generated using a master record which then yields the coding history from which my basic record collection is selected. Here is the result of that process:
    TaxpayerNo,TaxClass,TaxCode,FilingFequency,StartDate,StopDate,Cnt,Frequency
    10 S 1 M 6/1/2007 11/30/2008 18 12
    10 S 2 M 11/30/2008 9/30/2009 10 12
    10 S 2 Q 11/30/2010 8/18/2011 3 4
    10 L 8 A 6/1/2007 9/30/2009 3 1
    10 L 8 A 11/30/2010 8/18/2011 1 1
    From this data, I need a record for each individual month,quarter,etc. ie:
    10 S 1 M 6/1/2007 11/30/2008 18 12 6/1/2007
    10 S 1 M 6/1/2007 11/30/2008 18 12 7/1/2007
    10 S 1 M 6/1/2007 11/30/2008 18 12 8/1/2007
    10 S 1 M 6/1/2007 11/30/2008 18 12 9/1/2007
    10 S 2 M 11/30/2008 9/30/2009 10 12 11/30/2008
    10 S 2 M 11/30/2008 9/30/2009 10 12 12/30/2008
    etc.
    DOES NOT WORK
    select y.*,MonthNo,Add_Months(StartDate,MonthNo*Frequency) from (
    select x.*,
    (case when FilingFrequency = 'M' then Ceil(Months_Between(StopDate,StartDate))
    when FilingFrequency = 'Q' then Ceil(Months_Between(StopDate,StartDate)/3)
    when FilingFrequency = 'A' then Ceil(Months_Between(StopDate,StartDate)/12)
    else 0
    end) Cnt,
    (case when FilingFrequency = 'M' then 1
    when FilingFrequency = 'Q' then 3
    when FilingFrequency = 'A' then 12
    end) Frequency
    from (
    ... complex code to calculate the values of the start and stop dates needed above...
    ) x
    ) y,(select rownum MonthNo from dual connect by level <= Cnt)
    ERROR MESSAGE
    This returns ORA-00904: "CNT": Invalid Identifier. I don't get an error if I use a constant:
    WORKS USING A CONSTANT BUT MUST HAVE THE ACTUAL CNT VALUE
    ... Same code to generate data ...
    ) y,(select rownum MonthNo from dual connect by level <= 3)
    How can I get this to work using the "CNT" value instead of a constant?

    A technique like this should fix your problem.
    TUBBY_TUBBZ?with data (col1, cnt) as
      2  (
      3    select 1, 3 from dual
      4      union all
      5    select 2, 2 from dual
      6  )
      7  select
      8    d.col1,
      9    t.column_value
    10  from
    11    data  d,
    12    table(cast(multiset(select level from dual connect by level <= d.cnt) as sys.OdciNumberList)) t;
                  COL1       COLUMN_VALUE
                     1                  1
                     1                  2
                     1                  3
                     2                  1
                     2                  2
    5 rows selected.
    Elapsed: 00:00:00.00
    TUBBY_TUBBZ?As opposed to what you have now, which is basically this
    TUBBY_TUBBZ?with data (col1, cnt) as
      2  (
      3    select 1, 3 from dual
      4      union all
      5    select 2, 2 from dual
      6  )
      7  select
      8    d.col1,
      9    level
    10  from
    11    data  d
    12  connect by level <= d.cnt;
                  COL1              LEVEL
                     1                  1
                     1                  2
                     1                  3
                     2                  2
                     1                  3
                     2                  1
                     1                  2
                     1                  3
                     2                  2
                     1                  3
    10 rows selected.
    Elapsed: 00:00:00.00
    TUBBY_TUBBZ?

  • Calculating the Count value

    Hi friends,
    I have personnel planning cube,i need to calculate the no.of Personal Id's for each cost center..and retreive the Count value and save it to a keyfigure with type Number.
    I know that we can do this in FOX,Can anyone please provide me with the sample code for the above requirement.
    Thanks In Advance.
    Regards,
    Ravi.
    Edited by: ravi kanth on Sep 15, 2009 12:34 PM

    Hi Ravi,
    Counter type I.
    FOREEACH PERSONAL ID.
    COUNTER = COUNTER +1.
    {KF, Personal id} = {KF, Personalid}.
    ENDFOR.
    (Count,personalid} = counter.
    Hope this gives you an Idea but let me know you need more information.
    Regards,
    Raj

  • Perturbation of counter value with NI 9401

    Hello,
    I send this message because I have a problem with a counter on an NI 9401on cDAQ-9178.
    I measure an angular position with two pulse signals (increment on channel A and decrement  on channel B). There is one signal and it is a relay that directs the signal to channel A or B.
    You can see details on the attached file.
    I purchased a sample of the counter every 10ms.
    Everything works fine except when an AC motor of the machine starts or stops.
    When the AC motor starts or stops the counter value change by an offset (see attached file). If the counter is counting, I observe a negative offset. If the counter is counting down, I see a positive offset.
    If they are electrical noises, why will not offset in the direction of signal?
    How to fix the problem?
    Thank you for your help.
    Bonjour,
    J'envoi ce message car j'ai un problème sur un compteur avec une carte NI 9401 sur un cDAQ 9178.
    Je mesure une position angulaire avec deux signaux impulsionnels (Incrémentation sur la voie A et décrémentation sur la voie B). Il y a un seul signal et c'est un relai qui oriente le signal vers la voie A ou B.
    Vous pouvez voir les détails sur la photo jointe.
    Je fais une l'acquisition d'un échantillon du compteur toutes les 10ms.
    Tout fonctionne très bien sauf quand un moteur asynchrone de la machine démarre ou s'arrête.
    Au démarrage ou à l'arrêt du moteur assynchrone le compteur prend un offset (voir fichier joint). Si compteur est en comptage, j'observe un offset négatif. Si le compteur est en décomptage, j'observe un offset positif.
    Si ce sont des parasites, pourquoi l'offset ne va pas dans le sens du signal?
    Comment corriger le problème?
    Merci pour votre aide.

    Bonjour,
    le sujet est en cours de résolution à l'adresse suivante :
    http://forums.ni.com/t5/Discussions-de-produit-de-NI/Perturbation-de-la-valeur-du-compteur-avec-NI-9...
    Bonne programmation à tous !
    MathieuT
    NIF AE
    Mathieu_T
    Certified LabVIEW Developer
    Certified TestStand Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    LabVIEW Tour
    Journées Techniques dans 10 villes en France, du 4 au 20 novembre 2014

  • Disturbance of counter value with NI 9401

    Hello,
    I send this message because I have a problem with a counter on an NI 9401on cDAQ-9178.
    I measure an angular position with two pulse signals (increment on channel A and decrement  on channel B). There is one signal and it is a relay that directs the signal to channel A or B.
    You can see details on the attached file.
    I purchased a sample of the counter every 10ms.
    Everything works fine except when an AC motor of the machine starts or stops.
    When the AC motor starts or stops the counter value change by an offset (see attached file). If the counter is counting, I observe a negative offset. If the counter is counting down, I see a positive offset.
    If they are electrical noises, why will not offset in the direction of signal?
    How to fix the problem?
    Thank you for your help.
    Bonjour,
    J'envoi ce message car j'ai un problème sur un compteur avec une carte NI 9401 sur un cDAQ 9178.
    Je mesure une position angulaire avec deux signaux impulsionnels (Incrémentation sur la voie A et décrémentation sur la voie B). Il y a un seul signal et c'est un relai qui oriente le signal vers la voie A ou B.
    Vous pouvez voir les détails sur la photo jointe.
    Je fais une l'acquisition d'un échantillon du compteur toutes les 10ms.
    Tout fonctionne très bien sauf quand un moteur asynchrone de la machine démarre ou s'arrête.
    Au démarrage ou à l'arrêt du moteur assynchrone le compteur prend un offset (voir fichier joint). Si compteur est en comptage, j'observe un offset négatif. Si le compteur est en décomptage, j'observe un offset positif.
    Si ce sont des parasites, pourquoi l'offset ne va pas dans le sens du signal?
    Comment corriger le problème?

    Think you John,
    After some modifications, the problem has evolved. Now the offset signal (noise) is only on the signal connected.
    I'm downloading the NI-DAQmx version 9.40 to apply digital filtering on counting.
    The filter should be set in MAX or in LabVIEW? (my program uses Labview tasks set in Max).
    Could you give me more details on the configuration of the filter on the counter. (on image, the configuration of my task with DAQmx 9.2.3
    Best Regards
    Après quelques modifications, le problème a évolué. Maintenant l'offset de signal (le bruit) est seulement sur le signal connecté.
    Je télécharge la version Ni-DAQmx 9.40 pour pouvoir appliquer un filtrage numérique sur le comptage.
    Le filtrage doit-il être paramétré dans MAX ou dans Labview ? (mon programme Labview utilise des taches configurées dans Max).
    Pouvez-vous me donner plus de détails sur la configuration du filtrage sur le comptage. (en image, la configuration de ma tache avec DAQmx 9.2.3

Maybe you are looking for

  • My ipod nano wont let me download video i downloaded off of my computer

    my ipod nano wont let me sync my videos on my computer

  • FBL5N & Word processing functionality

    Hi All, It's my first time in this forum and I need some information about FBL5N functionality. My issue is related to "word processing" coming from LIST button (in the toolbar). Let's say. I execute FBL5N in order to display all open items for a cus

  • URGENT:upgrade to 3.0.8 issue Call to WPG_SESSION API Failed.Error-Code:6550

    I ran upgrade scripts to 3.0.8 from 3.0.6 and completed with no errors. csh diag.csh reports no errors. sqlplus to connect string works fine DAD connect string is correct. err text: Call to WPG_SESSION API Failed. Error-Code:6550 Error TimeStamp:Tue,

  • How do I stop images flickering when zooming in?

    I've imported a 32bit jpeg into Director MX. I'm trying to slowly zoom into the image, to create a slow Ken Burns style zoom effect. When I play my movie, the image is flickering and the zoom does not appear smooth. Does anybody know a way around thi

  • Gen 1, Update 2.2 and Gmail

    I have a Gen 1 ipod that i updated to 2.2 (where my iPod got wiped, No biggie). Gmail was working fine as my Mail account before the upgrade to 2.2 (from 1.1.4) but now with the same settings (supplied by Gmail) it has the error message that says som