Real counter in PI 7.0

Hi all...& Happy New Year
In fact my goal is to add a real counter at the end of the file name.
I work with SAP Netweaver 7.0 SP 16. I Know that PI offers this possibility, but the native counter always start again as soon as SAP PI starts again. Do you Know  a method or a function java which could help me.
Thanks by advance
Ng

1) Method 1
You can have a text file which will always have the latest counter value.
Read the counter value using java functions.
http://www.exampledepot.com/egs/java.io/ReadLinesFromFile.html
Then increement it.
Write the incremented value in the file again.
http://www.exampledepot.com/egs/java.io/WriteToFile.html?l=rel
2) Method 2
CReate a ZTABLE as other specified(On the ABAP stack of the XI system).
Create an RFC to read the ZTABLE.
Create another RFC to update the ZTABLE.
Call the RFC 1 from your UDFs to read the counter
increment the counter.
Call the RFC 2 from your UDFs to update the counter.
Regards,
Ravi Kanth Talagana

Similar Messages

  • Help Counting high frequency voltage spikes

    Equipment:  NI USB-6229     (250 kS/sec Analog In., 16 bit DAC, 32 bit Counters and internal clocks <= 80 Mhz)
                          LabView 14
    Problem:
    I have an experimental application where I need to count voltage spikes (integer #) caused by electrons hitting a sensor. These spikes can be as frequent as 500,000 Counts/sec. The spikes are not going to be the same voltage everytime, but they will be visible above the noise so I need to allow the user to select a Threshold Voltage that triggers a real count rather than noise spikes.
    Attempts:
    To count such a high frequency, I deduce that I need to use a Counter Input to read fast enough, HOWEVER, I wasn't able to find a way to set a threshold voltage for a Counter Input because I believe they expect a TTL signal anyways, which I won't have. To set the threshold, I realize that Analog Input reads can be triggered at a selected level which is great but the Analog Input Sampling Rate is only 250kS/sec which won't catch every count in my project.
    I have a program that uses the Count Edges channel and it is accurate within 3% of the expected # of counts. I was just testing it with a function generator and the program doesn't count unless the signal's voltage is above 2-3 V which won't work for my application. I will post what I have. Does anybody know of a way to trigger off only at selected Voltage levels using counters, or know of a way to filter through the noise to get real spikes?
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    ElectronCountsTest.vi ‏29 KB

    Thanks for the reply johnsold. I didn't think to use a comparator but that is good to know that I have that option. I was and still am hoping for some kind of trick to do this programmatically.   One other idea that I was playing with is offsetting two or three different Reads on the same signal to read the signal at different times. If this is a possibility, it may be able to double or triple my sample rate to 500k or 750kS / sec. Anyone else have any ideas on this solution?

  • Enter Inventory Count Help

    When entering an inventory count in MI04, I have a few hundred items that need to be entered as zero under quantity.  This is because we're running the AFS version of SAP, and have multiple grid numbers for a single material, therefore resulting in many values to be entered for one material.  Is there any way that I can enter them ALL as zero without going in and entering a value for each one individually?

    i have a big button in the middle above the inventory lines in MI04 called Set zero count.
    You first enter all your real counts. and when you are done. the you click this button and all items without a count get the zero count flag.

  • Excluding count/distinccount when item is in multiple groups

    Hello reader,
    Currently These are my groups from a single  table (column left = CustomerID, column right = Status)
    Group A contains:
    A_Cust_12      1
    A_Cust_13      6
    A_Cust_14      3
    A_Cust_15      1
    Group B contains:
    B_Cust_75      3
    B_Cust_76      5
    B_Cust_77      3
    B_Cust_78      1
    Group Special contains:
    A_Cust_12      2
    So far the columns from a table.
    I grouped them as you can see. I want to know the distinctcount of CustomerID in each group, having state 1.
    But...
    Look at A_Cust_12. This CustomerID is also to be found within group Special. And in group Special it has Status 2. therefore, the A_Cust 12 in group A is not to be counted.
    State 1 means "paid". But when the customer is in Group Special with State 2 (and 2 only) then something went wrong with the payment. Anyone in Group A or B can only have the same CustomerID in group Special only. A can not occur within group B for example. So if it's in group "Special" with a certain state, then don't count it.
    So the real count of CustomerID's in group A = 3. Number 12 doesn't count.
    How do I do this?
    I've worked on this for a full day but I can't get it for the life of me.
    Please do mind that more groups can (and will) exist, but there is only one group "Special".

    I've solved it. Took me a bit. Do this:
    Step 1. Create:
    Group 1: group by "Group A" & "Group B" by ascending order (important!)
    Group 2: group by CustomerID, ascending order (important!)
    Step 3. Create the groupname you'd like to summarize on using a formula (trick) then place it in the group footer 1.
    @MyGroupName
    WhilePrintingRecords;
    global stringvar GroupName;
    @CustomGroupNameTrick
    If {SomeTable.SomeColumn} <> "Group Special" then
    GroupName:= {SomeTable.SomeColumn} else
    GroupName;
    Step 4: create a formula to count the states 1 (paid). Later we'll create a formula to correct this final sum with states 2. Place in detai section
    @State_Paid
    if Not({SomeTable.State} In [1]) and {SomeTable..OBCampaign_ID} <> "Group Special" then 1 else 0;
    Create a sum on this formula (manual running total by making a new formula, using the SUM() function.
    Create formula to count the states 2 (something went wrong with payment).
    Create  a manual running total on this formula.
    Then substract: @State_Paid - @State_PaymentWentWrong
    So the formula part is fairly straight forward. However, the tricks are twofold:
    1) Create 1st group on the column that you want to group on (don't bother why, because you'll surpress the g. header)
    2) Create 2nd group on CustomerID, ASCENDING order. (important to use tricks by knowing Crystal Reports behaviour). Supress this too.
    3) Use the groupname workaround formula ( @CustomGroupNameTrick ). Place in groupfooter 1.
    From there, you have a very nice setup to report on2  loosely related tables.

  • Mail unread count

    I have installed the latest Lion upgrade - 10.7.3 (11D50d).
    I know have a problem with my mail inbox constantly showing 6 unread mails against my Exchange mail account when the real count is 0.  iPhone and the hosted eExchange web mail portal displays the correct number.
    Anybody had the same problem and/or knows how to resolve it?
    Thanks
    D

    If only messages in one or two mailboxes have this condition, then with each mailbox click on Mailbox in the menubar and choose Rebuild. Be aware that during Rebuild all messages will briefly disappear -- don't panic, but let it finish.
    You can also select all messages in each mailbox, click on Message in the menubar and choose Mark as Read.
    This is an indexing problem, and there is a way to force Mail to reindex all mailboxes. If that were needed, I would want to point you to instructions that can differ if you only have POP accounts, versus IMAP.
    Ernie

  • Custom UITableViewCell from Interface Builder with retain count 2

    Hi!
    I am creating a customViewCell in my UITableViewController (which I was creating in IB) - the wired thing: it has a retain count of 2! Any hints why?
    UIViewController *c = [[UIViewController alloc] initWithNibName:CellIdentifier bundle:nil];
    GroupCell *cell;// = [[[GroupCell alloc] init] autorelease];
    cell = (GroupCell *) c.view;
    [c release];
    NSDictionary *groupDict;
    NSLog(@"retain count of groupCell: %d, ", [cell retainCount] );
    retain count of groupCell = 2!!
    my cell has no init method, no "retain" nor do I send anywhere a retain to it..

    Hey Alex!
    sommeralex wrote:
    I am creating a customViewCell in my UITableViewController (which I was creating in IB) - the weird thing: it has a retain count of 2! Any hints why?
    Your code is obtaining the retain count by sending the [retainCount|http://developer.apple.com/library/ios/documentation/Cocoa/Referen ce/Foundation/Protocols/NSObjectProtocol/Reference/NSObject.html#//appleref/doc/uid/20000052-BBCDAAJI] message, so this warning in the doc applies:
    Important: This method is typically of no value in debugging memory management issues. Because any number of framework objects may have retained an object in order to hold references to it, while at the same time autorelease pools may be holding any number of deferred releases on an object, it is very unlikely that you can get useful information from this method.
    I think the above is telling us that retainCount returns an accurate number, but that number is useless because we don't know how many releases are pending. E.g., suppose your code has released an object prematurely, so your logical count should be zero. However, if the runtime system has retained the object 5 times at that stage, retainCount will return 5. The point is that all 5 of those retains will be released at some future time not of our choosing.
    You can override retain and release to keep your own count, but I don't know if that count is any more useful than what you get from retainCount.
    I think the only retain count that's any of our business is the number of retains and releases we see in our code. In other words, I think the logical count is much more useful than the real count:
    UIViewController *c = [[UIViewController alloc]
    initWithNibName:CellIdentifier bundle:nil]; // Line A: +1
    GroupCell *cell;
    cell = (GroupCell *) c.view; // Line B
    [c release]; // Line C: -1
    NSLog(@"retain count of groupCell: %d, ", [cell retainCount] );
    Based on the doc for the ['view' property of UIViewController|http://developer.apple.com/library/ios/documentation/UIKit/Ref erence/UIViewControllerClass/Reference/Reference.html#//appleref/doc/uid/TP40006926-CH3-SW2], the view object should be created and retained once when the nib is loaded in Line A (except if no view object is included in the nib, in which case the view would be created and retained once in Line B). The view would then be released once when the view controller is released in Line C.
    So using my arithmetic, the view's retain count is zero after Line C. If that's correct, the only thing saving you from a crash might be one of those system retains we don't know about. You could test my analysis by not giving the view to a table view, then checking to see if it still exists at some point after the end of the current event cycle. You could implement dealloc with a NSLog statement in your custom view to see if and when the view is actually freed.
    Absent any further analysis, I would advise retaining and autoreleasing the view before releasing the controller (or just autoreleasing the controller), to make sure the view lasts until retained by your table view.
    - Ray

  • Count number of Contacts

    How to count the number of contacts that you have in your phone?

    Its kinda annoying how your contacts is all over the place when your email, local contact and FB as well as twitter is automatically placed on your contact page.
    Its a headache having to "link" their profile.
    This kinda throws off the real count on our number of contacts....

  • Report about Counter Strike FAKE app

        There is an app that cost 1.99$ and the sceenshot wasn't like the app that I download. The information that they gave you was about the real counter strike. However,I write this report because I want to ban this company.
    Check out this link. look at the description.
    http://itunes.apple.com/th/app/counter-strike/id505522871?mt=8

    If it's something that you've purchased then you should be able to use the 'report a problem' link via your purchase history : http://support.apple.com/kb/HT1933

  • How to determine total clicks in a EOS 5D

    How do you determine total clicks in a EOS 5D ??

    The Canon EOS-1D X comes with an actuation counter but other than that, I do not know of an accurate way of getting a 'real' count but you can read my Blog post on this topic and download a third party software to estimate your camera's actuation count.
    http://blog.michaeldanielho.com/2012/08/canon-dslr-camera-shutter-actuation.html
    http://MichaelDanielHo.com

  • Modeling Question... need a quick response.

    Hi All,
    I have developed a dash board recport to count the no of orders with in a work center. there are many metrics. Here is how it is being done.
    1. load data source to Ware House layer.
    2. Warehouse layer to Appl layer, where I count the operations. (an order could have many operations)
    3. Appl layer to Appl layer 2 - where I count Orders - and all key figures are set to overwrite. So between two loads I will retain only the latest count for the same keys.
    4. Appl layer to Cube where I count the same orders again, just to make sure it is all 1 if conditions satisfy.
    All looks good when the first load goes to  the cube. Now wehn the delta comes in some of the orders come again and they get counted again and I see 2 records in the cube added on two different dates.
    now if I remove my time dimension I wil have the counts become added together for same orders ( count > 1)
    How can I avaoid this doubling in this model or any changes where the count should be counted once or show the real count on my dash board.
    thank you.
    Alex.

    Thank Nareen.
    Yeah the behavious of the cube will hurt the process when i do Delta. If that is changed to Delta with delete overlapping I can get this done. I am thinking about the volume in the future would substantially delay the SLA.
    Also master data will not solve this problem since I need trend and history of process on each order. Unless I change that to time-dependent and again that will add more issues.
    Thanks for your reply.

  • Validating UNB and UNH segment in EDIFACT using Seeburger BIC

    Hi Experts,
    Just a small thing if someone can help with. What's happening is if an interchange comes with wrong interchange number in UNB vs UNZ segment BIC is actually rectifying that automatically and it makes the UNZ same as UNB. However I don't want BIC to do this.
    Any suggestions on how can i stop this from happening please?
    regards

    Hi Prateek,
    Thank you for a quick help I will try that in the morning and I am positive that should settle it.
    Hi Rajesh,
    That was my understanding too. However for UNH segment the trailer is UNT so if UNH had 100 and UNT had 101 BIC is not throwing an error but it is not correcting it either. But I think I can handle it in messag mapping and itsn't a big deal I was meant to do that anyway.
    However for UNB the trailer is UNZ and if I had UNB = 500 and UNZ = 499 BIC will automatically correct and I am positive the reason for that is what Prateek mentioned. And hence by the time I get it in Integration Engine I have no way of knowing it was incorrect. This odd behaviour it is almost like it is set to auto correct.
    For UNT it is not doing the right thing either, e.g. if I had UNT = 36 but the real count should have been 38 it will actually autocorrect it to 38 and actually let it pass to message mapping, however the Control it is generating it is rejecting the message based on UNT was not correct.
    But for the first two it even creates a control with status 'accepted'.
    Thank you guys I will close the thread in the morning if things are working
    regards

  • ITunes crashes upon syncing music to iPhone 3GS iOS4

    I recently bought an iPhone 3GS and upgraded it to 4.1. Whenever I try and sync my music, iTunes will crash - I get the "iTunes has encountered an unexpected error and has to close" message, with the Windows report screen popping up and all that. This is only when I sync my music - applications and contacts sync fine (I do not sync videos/photos/voicemails so I have those all unchecked). I only sync one selected playlist (not my whole library).
    I am using iTunes 10, running on Windows XP. I have uninstalled and reinstalled numerous times (including downgrading to 9.2 at one point) but I continue to get the same result - iTunes crashes upon syncing music. I just did a fresh restore, and this has not fixed the problem.
    I have tried splitting up my 550 song playlist that I normally sync to my iPhone, but when I did this (it was only about 250 songs) iTunes crashed again towards the end. It has been crashing whether or not I have the "Convert to 128 kbps AAC" checked or not. It crashes somewhere in the middle of "Copying X out of X."
    Note As of typing this, I successfully synced a separate 58-song playlist WITH "Convert to 128 kbps AAC checked." However, I then tried to sync a different 61-song playlist WITHOUT that checked and iTunes proceeded to crash. After this, I tried syncing the 58-song playlist again WITHOUT the Convert checked and it synced perfectly without crashing.
    Recap:
    Playlist #1 (550 songs) - Crashes WITH OR WITHOUT convert checked
    Playlist #2 (58 songs) - Syncs perfectly with or without convert checked
    Playlist #3 (61 songs) - Crashes without "Convert..." checked (have not tested with "Convert..." checked, it's late and I have to head to bed soon and I want to get this post up).
    Considering this information, would it be reasonable for me to assume that it's some of the songs in my library that are making iTunes crash? If so, how the heck am I supposed to figure which songs are causing this? I really hope I do not have to sit here as iTunes syncs and watch our for every song it crashes on...
    Does anyone have any suggestions? I've scoured these boards but I haven't found anyone with the same situation as me, and thus no answers.
    So frustrated. Even my old iPhone 2G on OS 3.0 syncs my music perfectly!!

    I am back to attempting to sync my music. iTunes continues to crash on certain songs, however I have also noticed another problem - each time I attempt to sync my main playlist (after deleting the song it crashed on last time), it will say Copying X out of like, 96 or some number that is nowhere near the real count of songs on the playlist.

  • Total records = "-1"

    Hi there,
    windows xp, dw cs, asb.vb, sql2005 express, iis6
    Using server behavior "Record Set" and try to display "total
    records". But i am getting not the real count i am getting "-1".
    What is the problem? thx n regards
    See Line 329 in the source:
    Source Code
    Screenshot
    thx for the support
    Sebastian

    I do not know how CS3 implements its own record count.
    Look at the code; if yourRecordset.RecordCount is used, then
    file a bug
    report. If some variable (like yourRecordset__totalRecords)
    is used, then
    there's some other problem.
    "eFscl" <[email protected]> wrote in message
    news:f58kjc$hjg$[email protected]..
    >
    quote:
    Originally posted by:
    Newsgroup User
    > DW uses a firehose
    > cursor, which does not support that property.
    >
    > Thank you very much for your feedback.
    > I am not using my own or special ASP code for getting
    the record count. I
    > am
    > using the dw cs3 record count feature. See the
    screenshot in my posting
    > and
    >
    http://www.fanclub.ch/screenshot4.jpg
    >
    > or do i have to modify the cursor type which was added
    by dw cs3 himself?
    >
    > any other help around
    >

  • Aggregate query on global cache group table

    Hi,
    I set up two global cache nodes. As we know, global cache group is dynamic.
    The cache group can be dynamically loaded by primary key or foreign key as my understanding.
    There are three records in oracle cache table, and one record is loaded in node A, and the other two records in node B.
    Oracle:
    1 Java
    2 C
    3 Python
    Node A:
    1 Java
    Node B:
    2 C
    3 Python
    If I select count(*) in Node A or Node B, the result respectively is 1 and 2.
    The questions are:
    how I can get the real count 3?
    Is it reasonable to do this query on global cache group table?
    I have one idea that create another read-only node for aggregation query, but it seems weird.
    Thanks very much.
    Regards,
    Nesta
    Edited by: user12240056 on Dec 2, 2009 12:54 AM

    Do you mean something like
    UPDATE sometable SET somecol = somevalue;
    where you are updating all rows (or where you may use a WHERE clause that matches many rows and is not an equality)?
    This is not something you can do in one step with a GLOBAL DYNAMIC cache group. If the number of rows that would be affected is small and you know the keys or every row that must be updated then you could simply execute multiple individual updates. If the number of rows is large or you do not know all the ketys in advance then maybe you would adopt the approach of ensuring that all relevant rows are in the local cache grid node already via LOAD CACHE GROUP ... WHERE ... Alternatively, if you do not need Grid functionality you could consider using a single cache with a non-dynamic (explicitly loaded) cache group and just pre-load all the data.
    I would not try and use JTA to update rows in multiple grid nodes in one transaction; it will be slow and you would have to know which rows are located in which nodes...
    Chris

  • Strange number from pxi 6608

    We are using the PXI 6608 card with a six channel system
    involving counters. When we run the program we get a very large count,
    somewhere around 40million, and it the same number every time. The problem is
    that there is no way that can be a real count. We do get other counts that seem
    to be actual data but every couple of cycles this large number occurs .Our
    counters our connected to a kill switch, programmed in LabVIEW that will cut
    the power to the counters if they reach the maximum number of counts we have
    set. We know the kill switch is working because we have measured counts that
    cut the power. However, when this large number comes up nothing happens and the
    counters remain on and our limit is set far below 40million. Has anyone seen
    this or other instances like it?
    Thanks

    Hi,
    At the moment I am not sure why your problem is occuring but am happy to look into the matter for you when I have a bit more information.
    What version of LabVIEW are you using?
    How is the PXI system set up?  For example are you connecting remotely from a host PC using LabVIEW realtime or are you booting the system into windows?
    Would you be able to provide an example VI and any project files that demonstrate the problem?
    Tom Clark
    Message Edited by ThomasC on 08-06-2008 11:01 AM
    Applications Engineer
    National Instruments UK & Ireland

Maybe you are looking for

  • Uverse problems on my macbook pro?

    ever since we switched from comcast to att uverse my internet is pretty intermittent. it was fine for a while it seemed. now the past few days ive been having to turn off/on my airport on the computer. it still shows full bars when it cant connect. a

  • Legacy data transfer for new depreciation area for already existing assets

    Hi all, I am doing legacy data transfer for New deprecaition area for already existing assets through AS92. I like to give Ordinay depreciation posted amount  for the current FY for these assets in AS92, but i find this field is not editable inAS92.

  • Unable to open the padlock in the account sistem

    hi everyone I'm new n the forum and italian (so apologized my bad english :)) I have a problem, during an attemp to install a programm (guitar pro demo) I was unable to finish the intallation process (it wouldn't go on, and also it doesn't answer me

  • How to sync with Aperture instead of iphoto

    Hi, I have an iphone 3gs and when I connect the iphone it shows up in iphoto so I can import the images it has taken, but I would prefer it to show up in Aperture as I prefer to use that, I cannot find any settings to make it default to Aperture inst

  • Rename and sort pics in photos

    Is there a way to (batch-)rename and sort pics by name within an album in photos (Mac)?