UDF issue about record counter

Hi gurus,
i want to create the auto-increasing counter for the records in my message mapping.But during my testing,the sequence number always pops up "1" which means it don't calculate based on the cache value. The code as below:
=========================================================================================
public String Counter(Container container){
GlobalContainer gcontainer =  container.getGlobalContainer();
     Object o = gcontainer.getParameter("counter");
      Integer iSeq ;
      if(o == null)
           iSeq = new Integer(1);
      }else
           iSeq = (Integer)o;
           iSeq = new Integer(iSeq.intValue() + 1);
           gcontainer.setParameter("counter",iSeq);
      return iSeq.toString();
==========================================================================================
can anyone shed light on this?
Thanks in advance.

Hi rajesh
anothr smart option.
in meesage mapping editor under function tab
add the below code
Under Attributes and Methods  Integer iSeq ;
Under init   iSeq = new Integer(0);
Then UDF:
public String Counter(Container container){
iSeq = iSeq+1;
return iSeq.toString();
Edited by: Debashish on Jul 15, 2011 9:09 AM

Similar Messages

  • Planning for Macbook (pro?) Questions about recording audio + multitasking

    Hi Everyone
    I am seriously contemplating switching to a Mac book (Pro?) in the next few months, and I want to clarify issues about recording audio.
    I record music and other stuff at our local church using a mixer and feed stereo straight into a pc which records using the excellent Adobe Audition (... well it works for me  :-)
    To start with I expect I'll be using GarageBand and later look at other solutions such as ProTools I used to use on the PC.
    QUESTION
    I would welcome experienced users to comment on how well GrageBand or similar can multi task while recording is taking place. In other words what can I do - Not do, while recording.
    Be honest please.
    I worry I might get an exagerated reply from an Apple evangelist and I'm not seeking perfection, just knowledge of practical experiences.
    I'd like an idea of what limits present users have found running recording apps like Garageband or similar.
    As an example :  what experiences running large wordprocessing application or Internet (e.g. FTP or Safari) while recording?
    Replies appreciated
    Pete

    If it's an important recording or a once-only opportunity to record something then I would seriously advise against multi-tasking on any computer, PC or Mac, whilst recording.  Dedicate all processing power to capturing the recording, and if you want to browse the web/update your resumé whilst recording then use another computer!

  • Record Count Issue in Search page ?

    Hi Friends
    I am trying to display record count on Search page and I have the following code in
    The table has total of 62 Rows
    AM : for testing purpose, i am printing in log
    public void getISAGRecordCount()
    OAViewObject vo = (OAViewObject)getXXG2_ELIM_ISAGSView1(); //getXXG2ISAGSearchVO1();
    int fetchedRowCount = 0;
    vo.setMaxFetchSize(-1);
    vo.executeQuery();
    fetchedRowCount = vo.getRowCount();
    System.out.println("RowCount: "+ fetchedRowCount);
    IN PFR of CO: I am calling by this way
    am.invokeMethod("getISAGRecordCount");
    the Issue is
    for the first time, when i search  Based on search criteria, I know it should dispaly 10 records  but in the Log file i see the total Record Count of the Table     Ex; 62
    When i do the serach for the second time, based on search criteria, I know it should display 20 records, but the log file has 10 records ( previous search results)
    If I do the search for 3rd time, I see 2nd search results in log
    Any help in this issue, how to fix this?
    Thanks
    Ravi

    Hi,
    Please donot use getRowCount(), use getFetchedRowCount() and remove setMaxFetchSize(-1).
    Hope it will resolve your issue.
    Just for understanding of the concept:
    getFetchedRowCount() returns the number of rows cached in the view object -- including programmatically inserted rows.
    The getRowCount() implicitly execute a query against the database (if a query has not been executed yet)
    Regards,
    Reetesh Sharma

  • Wrong Record count in Monitor maybe datasource issue

    Hi Gurus,
    I have an interesting problem; I am not sure if these are related problems.  First, I am loading data from a flat file to an DSO (using BI 7.0)  I created a transaction datasource.  Does it technically matter if I create a master data attribute datasource vs a transaction datasource when loading to a particular InfoProvider?  Can I specify that my datasource is a master data attribute datasource when loading into a DSO.  Will the system behave differently during a dataload based on the datasource type?
    Here is why I am asking my question:  I created an InfoPackage for the new datasource and when I execute it; it is reading the wrong record count based on my file.  I only have 20 records (using a test file); but yet it is saying 98 in the monitor?  I double checked and my file only has 20 records and on the "Extractor" tab, the system is pointing to the correct file.  Can the datasource have any connection to this problem?
    Thank you

    Hi,
    Technically it is possible to fill a DSO from e.g. a Master Data InfoSource but obviously before creating a new DataSource you must decide whether it concerns Master vs. Transactional data (depending on the nature of it).
    In some rare cases Transactional data from e.g. R/3 is treated as Master data in BW, for example PM orders.
    About your recourd count problem, do you have 98 records in the PSA as well? (because that should be the 'bold' representation of your file).
    If PSA gives 20 recs than the problem lies elsewhere (upstream): is there any abap-code in Startroutine or elsewhere doing some sort of redistribution of the data before it is loaded into the DSO?
    Hope this helps!
    Grtx
    Marco

  • Please help! Invalid node structure and invalid record count

    My MacBook Pro is about 6.5 years old. I upgraded to Snow Leopard 2 years ago and added RAM at the same time. My first problem ever occurred three days ago when my computer got super sluggish, I restarted and got the gray screen with apple and spinning wheel...no boot up. I ran disk utility from the snow leopard install disk and found "invalid node structure" and "invalid record count". After reading on here what to do...try to repair the disk and so on with no success I went out and bought Disk Warrior. Got home expecting to fix everything and Disc Warrior won't boot...I just get a file with a question mark and the disc is ejected. I tried erasing the hard drive but was only able to use the "don't erase data" option. Then I tried to reinstall Snow Leopard with no luck. Now I am stuck. Any ideas? 
    One thing to note is I am to the point of not caring about the files on the hard drive, I was a dummy and never backed them up...lesson learned!  I just want my computer back without having to spend $1000+ for a new one. Then again I am always willing to do that too as a last resort.
    PLEASE HELP!

    When you contact Alsoft, make sure you let them know that you are using Snow Leopard (10.6.8).
    Try the following in the meantime -
    Disconnect all peripherals from your computer.
    Boot from your install disc & run Repair Disk from the utility menu. To use the Install Mac OS X disc, insert the disc, and restart your computer while holding down the C key as it starts up.
    Select your language.
    Once on the desktop, select Utility in the menu bar.
    Select Disk Utility.
    Select the disk or volume in the list of disks and volumes, and then click First Aid.
    Click Repair Disk.
    Restart your computer when done.
    Repair permissions after you reach the desktop-http://support.apple.com/kb/HT2963 and restart your computer.
    Try DiskWarrarior again if it's combatible with the os system.
    YOu cannot reformat until you get your issue corrected.

  • Data Load : Number of records count

    Hi Experts,
              I want to document number of records transferred to BW during an infopackage execution.
              I want to automate the process by running a report in background which will fetch a data from SAP tables about number of records been transfered by all my InfoPackage .
    I would like to know how should I proceed with.
             I want to know some System tables which contains same data as that of RSMO transaction displays to us.
    Kindly help with valuable replies.

    HI,
    inorder to get the record counts report you need to create a report based on below tables
    rsseldone, rsreqdone, rsldpiot, rsmonfact
    Check the below link which explain in detail with the report code as well.
    [Data load Quick Stats|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90215bba-9a46-2a10-07a7-c14e97bdb764]
    This doc also explains how to trigger a mail with the details to all.
    Regards
    KP

  • Invalid record count - grey screen- Target Mode Cures

    Hi there,
    I have a common problem: I was doing nothing particular that I remember: No fancy file uploads, doanloads, creation, erasing - nothing special:
    Anyway after a customary week, or few days of leaving the macbook permanently on, I think "let's give it a rest".
    Then switch back on:
    - Grey screen, spinning grey progress wheel fine.
    - Takes a while. Strange. After say a minute - it just switches off wordlessly.
    - Reset PRAM: No solution. Take a look with single-user startup in console: Files are all there, OK. Disk not dead.
    - Start up from OS X 10.5 disk:
    Permissions repair fine. Good.
    Verify disk: FAIL! +*Invalid Record Count.Volume check failed.*+
    Next: *Try target disk mode to back up essentials* - that works fine: I now have Time Machine AND a smaller important essentials backup.
    But finally, here's the surprise: Just for kicks, I *shut the macbook down, try a reboot - and it works!*
    But I note that root system files are unchanged since the problem occurred: ".hotfiles.btree" for example (I don't know what that is but suspect it's relevant).
    Then: I tried restarting again - and back to square one, it won't boot.
    Do the "Target disk" firewire mode trick again, and browse a few folders: And it boots (slowly).
    If I just leave the Macbook on permanently - everything seems fine. Not even sluggish.
    So:
    - Why can connecting a disk with an incorrect file system in target disk make the system forget about these problems when booting?
    - Why does the problem return on a successive reboot?
    - Is it related to some system files being ignored if booting straight after a target mode session?
    - What is ".hotfiles.btree", and should it not exist ?
    And the big one:
    - +Can extended Applecare, wot cost me loads of money, help me?+

    Hi Cornelius:
    Having been a faithful Apple-groupie for a while, and despite some problems over the years (hard drive failing, screen going, etc.) this is the first time I'm disappointed with them, because theor Micromat Applecare deal is a ripoff:
    You fork out for Applecare extension: All you get is something that say "Yep, you've got a problem. Now go and buy techtoolpro".
    That is, the TechTool Deluxe is practically useless. Argh.
    Worse: They keep that rather quiet. If you run TechTool deluxe, and it fails: It points you to the Techtool site to
    "download the TechTool Deluxe software with diagnostic and repair capabilities".
    You think "Aha, right, I need an update, or a DMG rather than just the executable".
    Download another 1.25Gb.
    So you try again: Same thing.
    The chiselling little crooks, to quote Ken Livingstone, won't even come out and say "Buy TechTool Pro to fix it". The website as reported above is wrong.
    Result: I'm not happy with them. And I'll never buy anything off Micromat.
    In the meantime, I've got a bootable backup thanks to CC-Cloner (excellent, I'll send him some money), and I'm waiting until I don't have any critical deadlines to allow myself time to restore a daily bootable backup.
    The dodgy files seem to be the Sun Developper Java suite according to CC Cloner.

  • Oracle 10g - Insert in to Temporary Table - Record count mismatch between s

    We are trying insert records from a select query in to temporary table, some of the records is missing in the temporary table. The select statement is having multiple joins and union all which it little complex query. In simple terms the script contains 2 part 1st Part Insert in to temporary table 2nd part Select query with multiple joins, inline sub queries, unions and group by classes and conditions
    Eg. If we execute select statement alone it returns some count for example => 60000 After inserting into the temp table, in temp table the count is around 42000 why is the difference?
    It is simple bulk inserts... insert in to temp table select from xxx. also, there is no commit in between. The problem is all the records populated by the select statement are not inserted in to temp table. some records are not inserted.*
    Also, we had some other observation. It only happens in its 2nd execution and not its first run. Hope there might be some cache problem
    Even, we also did not believe that. We are wondering. In TOAD, we tested however at times it happens. In application jar file, after "insert in to temp select * from xxx" we take the i. record count of temp table and ii. record count of "select * from xxx" separately but both doesn't match. Match only at 1st time.
    Thank you in advance for your efforts and help.
    Shiva.

    The code looks like
    sql = "insert in to temptable select x,y,z,.... from xxx,abc,pqr..where...."; (logial but not real is very complex around 700 lines with multiple joins, inline sub queries, group by etc. )
    stmt = conn.createStatement();
    rCount= stmt.executeUpdate(sql);
    Actual issue is
    rCount = xxxx = Count(temptable) < count(select x,y,z,.... from xxx,abc,pqr..where....)
    why this diffference ? some records populated in the select but not inserted in to temp table
    Anyone can explain?

  • Record Count validation - BPM v.s. Message Mapping

    Greetings,
      I've got a file of sales orders coming in from File -> RFC -> File.
    In my incoming file, the final record contains my record count.
    In my outbound file are, of course, the messages from my RFC to create orders.
    In my BPM I receive the inbound file, then use a transformation  to count the number of orders and split them into separate messages so I can loop through them in a block & call the RFC.
    I want to validate my order count against the number of orders listed in my trailer record.  Should I use a switch step in my BPM... or should I use a UDF in my message split? All I want to do... I think... is supress everything coming in and pass a message stating the error... in my outbound file.
    Please advise...
    Doug -

    Hi Doug,
    As pointed by Prabhu, u need to validate it within Mapping...
    However , I am of the opinion that the source system should ensure to send correct record count before passing on to XI....
    Thanks,
    Himadri

  • Record Count + Resultset

    Hi All,
    I am executing a query in back and returning ref cursor to front end. Before returning recordset, I am doing record count. If record count is more then max record count defined, then I do not return any recordset.
    Now the problem is that I have to execute this query twice, once for counting and another for fetching. This increases my response time. I tried to get Cursor%ROWCOUNT after fetching, so that I can get total time during fetch itself, but it shows 1 as it always fetch single record at time.
    Is there any way through which I can execute query once and get records as well as its count.
    Thanks,
    Danish

    When you OPEN a cursor the SQL statement associated with it is executed. i.e. Oracle allocates the required resources for that statement and also identifies the rows that needs to be processes.
    Thats all happens when you issue OPEN. The records are not fetched.
    ROWCOUNT is a pseudocolumn that only indicates how many rows are fetched currently. So initially it will be zero. So it will give the total count only when you finish fetching all the rows.
    So as far now i dont see any other option other than querying the table for COUNT to get the count of rows.

  • MINUS operator fetches invalid record count

    Hi,
    One of the application team complained that oracle MINUS operator fetches an invalid record count after data load.
    Here are the details of the data load:
    They are using source as PROD and target as UAT.
    They are replicating the data on UAT environment in schema A from fetching the data in PROD from the same schema.
    After load when we query the count of records in UAT it shows more records in target, that is in UAT, than PROD.
    When they use MINUS operator to fetch the extra records in UAT, it shows no rows selected.
    SQL> select 'A' count(1) from A.UAT union all select 'A' count(1) from A.PROD@BISLSPD1;
    A COUNT(1)
    A.UAT 19105022
    A.PROD 19104995
    SQL> select distinct count(*) from (select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.UAT minus select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.PROD@BISLSPD1);
    COUNT(*)
    0
    SQL> select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.UAT minus select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.PROD@BISLSPD1
    no rows selected
    Please note that both are partitioned tables and they are using Informatica Data Replication 9.5 tool to populate the data from source to target.
    Not sure if this could be a bug or an issue.
    PROD DB Version: 10.2.0.5
    UAT DB Version: 10.2.0.5
    Both are in Linux 2.6
    Please throw some light on this.

    974065 wrote:
    SQL> select 'A' count(1) from A.UAT union all select 'A' count(1) from A.PROD@BISLSPD1;
    A                  COUNT(1)
    A.UAT                     19105022
    A.PROD                   19104995
    SQL> select distinct count(*) from (select distinct  DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.UAT minus select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.PROD@BISLSPD1);
    COUNT(*)
    0
    SQL> select distinct  DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.UAT minus select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.PROD@BISLSPD1
    no rows selected
    Given that you've go "distinct" in your query, you're eliminating duplicates from each table (and MINUS implicitly means distinct anyway). Check for duplicates (of dw_discount_key, dw_discount_modifier_key) in both tables.
    If the combination is actually unique, I would check that you actually had the raw results the right way round - MINUS is not symmetrical, and for a complete picture you need to look at (select from uat minus select from prod) union all (select from prod minus select from uat)
    Regards
    Jonathan Lewis

  • UDF for Total records

    Hi
    I have a scenario where sender is file. In file there is a field Total records.
    I need to validate Total records field with the total records in the file using UDF..
    Can any suggest me the how to write the cod efor this..
    venkat

    Hi Venkatesh,
    In your source structure should Detail Records count  equal to Total Record Count?
    if yes,just create <b>Context</b> UDF and pass the following 2 inputs
    1. <b>DetailRecord</b> -> RemoveContext
      2. <b>TotalRecord</b>
    and inside UDF write java code for validation
    suppose if your inputs are a[](DetailRecord) and b[](TotalRecord)
      int scnt = a.length;
      int tcnt = Integer.parseInt(b[0]);
      if( scnt != tcnt)
           //write code to trigger an alert(from the following weblog)
    To Trigger alert from UDF just go through the following weblog
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Cheers,
    Jag

  • Sequence - Record count is double

    Hi Experts,
    I have requirement to move the data from from one table to another in Oracle.
    I have created a sequence for autonumber and the same attribute has been defined as primary key as well and using IKM sql Control append.
    When the data is being transfered to target table actually count is double or 3 times of origianl count.
    Please suggest me how to resove this.
    Regards,
    Preet

    Hi ,
    Can you please check the operator log :- number of inserts for I$ table and main table.
    And find which step is giving issue.
    please copy that query here.
    Other details needed :-
    Source record count.
    Target record count before execution
    Target record count after execution
    I$ record count
    Any joins ?
    Regards,
    Rathish A M

  • Disk utility gets "invaild record count"

    Hello, Using Macbook pro running OSX 10.9.2
    Yesterday, i was using my computer searching internet, plugged it in and walked away for about 5 mins. Came back and tried to open iTunes. I 1st choose iTunes using the button w/ the 6 squares on it on the top row of keyboard. Nothing happen and iTunes did not open. 2nd I tried to open iTunes using the dashboard. Again nothing happen. I used the power button to shut down the computer. Then restarted, it came up with a window asking which language I would like to use. I choose English and then a new window opens with 4 choices; "Restore using Time machine", "Reinstall OSX", "Get online help" (which is how I am here now), and "use disk utility". I picked disk utlity and verified the disk which popped up a window say it "stopped and needed to be repaired. I hit the "repair buttom" and got a "Invaild record count" in red. It then stopped and said it could not be repaired.
    Tried to restore using the back-up/restore with Time machine. It found time machine, but on about the 4th screen it asks which volume I would like torestore to. Nothing comes up and just says "searching for disks" None ever come up. I quit disk utility and then choose "Start up disk" under the apple menu. It doesn't find anything. I tried the "command + option + P + R" nothing is different.
    So here I am. each new screen that comes up flickers a lot before clearing.
    Dead hard drive?
    Just can't find it?
    What's next?
    Thank you for being here to help
    Jody

    Thank you dominic23.
    I tried the instructions listed by Chris Watts1 and after running the /sbin/fsck_hfs -yprd /dev/disk0s2
    it never asked for a password just said "starting". After waiting a couple mintues it came back with the following: (which I have no idea what any of it means)
    journal_reply (/dev/disk0s2) returned 22
            using cacheBlockSize = 32K  cacheTotalBlock = 16384  cacheSize = 524288K.
    Executing fsck_hfs (version hfs-226.1.1).
    **Checking journaled HFS Plus volume.
    hfs_swap_BTNode: invalid forward link (0xA9812964)
    hfs_swap_BTNode: invalid backward link (0x0B69B6DB)
    hfs_swap_BTNode: invalid node kind (-124)
    hfs_swap_BTNode: invalid node height (42)
    hfs_swap_BTNode: invalid record count (0x3E6B)
    Invalid record count
    (3, 3)
    **The volume could not be verified completely.
    volume check failed with error 2
    volume type is pure HFS+
    Primary MDB is at Block 0 0x00
    Alternate MDB is at Block 0 0x00
    Primary VHB is at Block 2 0x02
    Alternate VHB is at Block 975093950 0x3a1ec0be
    Sector size = 512 0x200
    VolumeObject flags = 0x07
    total sectors for volume = 975093952 0x3a1ec0c0
    total sectors for embedded volume = 0x00
    CheckHFS returned -1317 , fsmodified = 0
    Does any of this mean anything to you?
    thank you again,
    Jody

  • 3 issues about material determination

    Hello Gurus,
          there are 3 issues about material determination , I don't know how and wher to configure them .
       (1)  I want to choose whether or not you want to re-run material determination when the delivery is
    created.
      (2)  I want use the some attributes in the material and customer master records to exclude a
    particular material from product selection. This means, for example, that all the materials that have
    been rejected in the customer master will not be included by the system when it determines a
    substitution material.
    (3) I want to deal with shortfall cases (in which only the available quantity is confirmed, and it is less than the order quantity) by passing the shortfall quantity on to materials planning. In this case, an additional sub-item is generated with a specifically defined material.
    thanks very much!

    (1) I want to choose whether or not you want to re-run material determination when the delivery is
    created.
    hi no need to re run the material determination
    (2) I want use the some attributes in the material and customer master records to exclude a
    particular material from product selection. This means, for example, that all the materials that have
    been rejected in the customer master will not be included by the system when it determines a
    substitution material.
    hi in this case i thing this is related to listing and exclusin (for more info in search of sdn type listing and exclusion)
    (3) I want to deal with shortfall cases (in which only the available quantity is confirmed, and it is less than the order quantity) by passing the shortfall quantity on to materials planning. In this case, an additional sub-item is generated with a specifically defined material.
    this is possible by activating availability check and TOR transfer of requirement (for more info in search of sdn type availability check and TOR )

Maybe you are looking for

  • Steps to upgrade RMAN catalog schema from 10.2.0.4  to  11.1.0.7

    I am looking for steps to upgrade our catalog database schema from 10.2.0.4 to 11.1.0.7. We want to register our prod 11g target database into our EM Repository 10.2 catalog database. Can you please refer to doc / metalink note to upgrade 10.2 databa

  • Virus protection for my macbook pro

    Does anybody know of a good Virus protection for my macbook pro? Some people say i dont need one is that true? I was hoping to get a cheap/reasonable priced protection for a lil extra help. Im worried about my laptop getting a virus.

  • The problem of starting the tlisten

    When I execute the command :tlisten -l 135.10.200.3:6001, I always get the message: CMDTUX_CAT:1319:INFO:Terminating tlisten process. even if I reboot the windows2000. What's the cause?

  • Undisplayed Physical query SQL Server 208

    Hi, I am querrig an SQL Server 2008 database with OBIEE. But the physical query syntax isn't dispalayed in the nqQuery. I got a message seems to History unfound. Is there any way to get the physical query on database different from oracle like SQL se

  • Ipod Classic 160 Gb refuses to play several songs.

    Hi i´m long time reader , first time "complainer". I had an Ipod 4G then 5.5 Video 80 Gig and had no problems with them. All songs in my library were played without any glitches. Ipod classic simply refuses to play some of them. Those songs are very