GetFetchedRowCount() in CO returns always 1 .. please help !!!!!

Hi ,
I am trying get the number of rows fetched in my CO.But it always returns value 1 .But in the oaf page i am getting 4 rows.but in the controller it is always returing 1 for the first time i click on go button but when i click the second time it is giving me correct number of rows. please find the code below.... let me know how to resolve this.
Code in my Controller PFR :
if (pageContext.getParameter("Go") != null) {
partyId =(String)pageContext.getParameter("partyId");
acctNum=(String)pageContext.getParameter("AccountNumber");
Serializable[] parameters = {partyId,acctNum};
am.invokeMethod("initAccount", parameters);
OAViewObject vo = (OAViewObject)am.findViewObject("AccountMappingVO1");
vo.executeQuery();
System.out.println("vo.getQuery()"+vo.getQuery());
int fetchedRowCount = vo.getFetchedRowCount();
System.out.println(" fetchedRowCount -- >"+ fetchedRowCount);
code in AM:
public void initAccount(String partyId) {
AccountMappingVOImpl vo = getAccountMappingVO1();
vo.initActVal(partyId,acctNum);
code in VO:
public void initActVal(String partyId,String actNum){
Number partyIdNo = null;
try{
partyIdNo = new Number(partyId);
acctIdNo = new Number(actNum);
catch(Exception e){
String error= e.toString();
throw new OAException(error,OAException.ERROR);
setWhereClauseParams(null); // Always reset
setWhereClauseParam(0, partyIdNo);
setWhereClauseParam(1, acctIdNo);
executeQuery();
thanks
ramya

Y are u re-executing the VO query in CO after you are already doing it in AM? Instead of fect row count try to print, rowcount and see.
--Mukul                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Excise (sales return) scenario PLEASE HELP

    Hi All
    We have a scenario, form our factory (exciseable) plant we have transfered the goods to our shop ( non Excise). And sold the material at VAT.
    Under sales replacement Policy we have taken the sales return at shop.
    Now we have to transfer the material to factory and take the CENVAT credit.
    How can we do the excise entry at the time of goods recipt the factory
    PLEASE HELP
    With Reagrds
    Niti Narayan

    Use J1IEX transaction and use the EWPO transaction type to capture the transaction. Also please remember that EWPO accepts only Goods receipt via MM process and not SD process in the Standard scenario so please ensure that it is allowed for other types as well. Any ABApper should be able to help you on this. There is a SAP note on this so please check it out as well.
    regards
    Jude

  • Brand new macbook pro 2.3 2x2gb/320 is way slower than my old pc when on the web?why? I want to love this mac but am think of returning it please help. Is my ram maxed it appears i have 4gb?

    I just bought this macbook pro, if im watching a sport event and doing something else on the net it is so slow moving back and forth between sites with constant freezes and shutdowns. my old sony viao was much much faster.
    It appears I have 4 gb of ram my receipt says 2 x 2gb. and when I check using the apple icon in upper left corner it says 4 gb. is this my max? is there anyway to speed this up? I will buy more memory if needed, if not Im returning this comp as Im very unhappy with it.
    ps. Im ****** that my pc is better, i so want to be a mac.
    please advise

    It's possible the DNS setting your ISP is using are interfering. Although your PC works OK Macs can be sensitive to DNS settings. Here is a MacWorld DNS Troubleshooting article that explains the issue and below is how to fix it.
    1. System preferences
    2. Network
    3. Click Advanced
    4. Click DNS tab
    5. Click + sign
    6. Add 208.67.222.222
    7. Click + sign
    8. Add 208.67.220.220
    9. Click OK.
    10. Exit System Preferences
    11. Try out your MBP and report what happened.
    Roger

  • Missing Return Statement - Please Help

    I get the "missing return statement" in line 47 in the getNumber method when I try to compile. Any suggestions?
    import java.util.Scanner; //imports scanner
    import java.util.Random;  //imports class Random
    public class Guess {
        Random randomNumbers = new Random();
        int answer;
        int userGuess;
        public void newGame()
            int answer = getNumber();
        public void play()
           Scanner input = new Scanner( System.in ); //creates scanner input
           System.out.println("\n\n Guess a number between 1 and 1000 or just" +
                   "press 0 to exit:" );
           userGuess = input.nextInt();
           while (userGuess != 0);
               checkUserGuess();
               System.out.println("Please enter another guess:");
               userGuess = input.nextInt();
        public int getNumber()
           int answer = 1 + randomNumbers.nextInt( 1000 );
        }  //ERROR IS DISPLAYED HERE
        /** Creates a new instance of Guess */
        public void checkUserGuess()
            if ( userGuess >= answer)
                System.out.println("Your guess is too high, try again");
            else
                if ( userGuess <= answer)
                    System.out.println("Your guess is too low, try again");
                else
                    System.out.println("Congratulation, you guessed correctly");
    }

    The error message says it all.
    You declared your getNumber method as returning integer.
    However you didnt return any number.
    add the reutrn statement to the method
    return answerJust to add, you have declared answer as global
    variable and agian answer as local variable.
    You are messing up a little there.
    Message was edited by:
    lupansansei

  • I got crash plugin always please help!

    i got adobe flash plugin crash when i play pool live tour on facebook
    Crash ID: bp-93085b3f-9e68-4b92-bcb5-01f1b2130419

    I have followed all the different "solutions" for getting the adobe flashplayer to work on webpages I want to view a video on. It doesn't say anything about crashes, just tells me I need to have this installed for it to work.
    I have Adobe Flashplayer installed and I see Adobe Acrobat in my plug ins...but not the flashplayer. I cannot find the browser plug in for this adobe flashplayer anywhere.
    Why is this a problem? It worked fine yesterday.

  • Prb in using finally block......please help.

    hi currently i am facing this problem when i tried using finally block. after recompile, it gave me a warning message or should i said is an error message. My error statement is as below,
    C:\EKP\web\WEB-INF\classes\com\tms\report\model\ReportModule.java:393: warning: finally clause cannot complete normally
    ^
    Note: C:\EKP\web\WEB-INF\classes\com\tms\report\model\ReportModule.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    1 warning
    my code is as below,
    try
    service.deleteJobTask( task );
    service.scheduleJob( task, schedule );
    success = true;
    catch( SchedulingException e )
    Log.getLog( getClass() ).error( e.getMessage(), e );
    finally
    return success;
    Please help me. Thank you very much
    Regards.

    Ditch the return statement in your finally clause and move it to the end of the try block in stead. The whole idea behind finally is that it is always executed even after you return from the method, you don't add a return statement to your finally.
    In your case you don't need a finally clause, you only add calls to it that MUST be executed, such as freeing up resources.

  • Please help regarding method/function sign up validation with mysql jdbc.

    HI guys,
    I am have been fixing this problem for days, hope that someone could help me find the bug on my code.
    I have 3 files:
    1.WithAuth.java - for database jdbc mysql connection
    2.WithAuthMet.java - method that will read any variables that will be passed to it. this method is waiting for two variables, a and b. a for userName and b for userPassword.
    3.WithAuthTest.java - the testing class, this is where i declare my sample control data to test the database connection and query.
    here's the actual codes:
    WithAuth.java
    package com.Auth;
    public class WithAuth {
        static String userName = "root";
        static String userPassword = "";
        static String databaseUrl = "jdbc:mysql://localhost:3306/javatowebservice";
        static String userQuery = "select * from userlogin";
    }WithAuthMet.java
    - this is where the error is and where I messed up.
    package com.Auth;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class WithAuthMet extends WithAuth {
        public void connect(String a, String b)throws Exception{       
            //try {
                Class.forName ("com.mysql.jdbc.Driver").newInstance ();               
                Connection conn = DriverManager.getConnection (databaseUrl, userName, userPassword);
                Statement stat = conn.createStatement();   
                String query = userQuery;
                ResultSet result = stat.executeQuery(query);
                System.out.println("Result(s): ");
                  while (result.next ()){
                      int i = result.getInt("userId");
                      String name=result.getString("userName");
                      String password=result.getString("userPassword");
                          //System.out.println("test data:"+a);
                      if(a.equals(name.equals("userName"))&& b.equals(password.equals("userPassword"))){
                                System.out.println("User is Valid");
                            else{
                                System.out.println("You are not a Valid User");
                                System.out.println("test data:"+name);
                                System.out.println("test data:"+password);
                                System.out.println("test data:"+a);
                                System.out.println("test data:"+b);
                      //conn.close();
                   // }catch(Exception e){
                    //System.out.println("Exception is ;"+e);
                    //System.out.println("Exception is ;");
    //                if(a.equals(name.("userName"))
    //                    && password.equals(password.equals("userPassword"))){
    //                    System.out.println("User is Valid");
    //                else{
    //                    System.out.println("You are not a Valid User");
    } WithAuthTest.java
    package com.Auth;
    public class WithAuthTest extends WithAuthMet{
        public static void main(String[] args) throws Exception{
            WithAuthMet CTD = new WithAuthMet();   
            String a = "dan";
            String b = "password";
            //CTD.connect(String name,String password);
            CTD.connect(a, b);
            //return connect;
    }please help.

    yakultyakultyakult wrote:
    WithAuthMet.java
    - this is where the error is and where I messed up.
    package com.Auth;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class WithAuthMet extends WithAuth {
    public void connect(String a, String b)throws Exception{       
    //try {
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();               
    Connection conn = DriverManager.getConnection (databaseUrl, userName, userPassword);
    Statement stat = conn.createStatement();   
    String query = userQuery;
    ResultSet result = stat.executeQuery(query);
    System.out.println("Result(s): ");
    while (result.next ()){
    int i = result.getInt("userId");
    String name=result.getString("userName");
    String password=result.getString("userPassword");
    //System.out.println("test data:"+a);
    if(a.equals(name.equals("userName"))&& b.equals(password.equals("userPassword"))){
    System.out.println("User is Valid");
    else{
    System.out.println("You are not a Valid User");
    System.out.println("test data:"+name);
    System.out.println("test data:"+password);
    System.out.println("test data:"+a);
    System.out.println("test data:"+b);
    //conn.close();
    // }catch(Exception e){
    //System.out.println("Exception is ;"+e);
    //System.out.println("Exception is ;");
    //                if(a.equals(name.("userName"))
    //                    && password.equals(password.equals("userPassword"))){
    //                    System.out.println("User is Valid");
    //                else{
    //                    System.out.println("You are not a Valid User");
    This is one line that is wrong
                       if(a.equals(name.equals("userName"))&& b.equals(password.equals("userPassword"))){You have 'a' and 'b which are Strings
    and you are comparing them [using equals()] with the boolean return from another set of equals() invocations.
    String equals boolean will always be false (well, maybe not if the String is "TRUE" or "FALSE" - and you would need some more boilerplate to make that work).

  • XPath - how to get non exist nodes? please help!

    Hi!
    There is a so xml structure:
    main_node
    node_a
    node_a_1
    node_a_2
    node_a_3
    the 'node_a' node repeats 3times in the XML. The 'node_a_2' node is not in the first recurrence of 'node_a' node.
    When I want to get the 'node_a_2' nodes by XPath, I get a List, which consists of 2 element.
    But I want to get a so list, which consists of 3 elements, the first is null and the others are the elements of 'node_a_2' node!
    This is the code:
    List getElementByXPath(String Path) throws org.jaxen.JaxenException {
    org.jaxen.XPath P = new org.jaxen.jdom.JDOMXPath("/"+Path.replace(".","/"));
    List Back = P.selectNodes(ArrivedXML.getRootElement());
    return Back;
    Please help, how can i do it!
    Thank You very much!
    rflair

    the structure again...:
    main_node
    ....node_a
    ........node_a_1
    ........node_a_2
    ........node_a_3

  • Please help advise me, About OID

    Hi
    I see OID javadoc ,Subscribe class will have getUsers method return User[] and I try to use this method but result of user array is not have data return.
    Please help advise me, how I get user list from OID?
    This is my code
    import oracle.ldap.util.*;
    import oracle.ldap.util.jndi.*;
    import javax.naming.NamingException;
    import javax.naming.directory.*;
    import java.io.*;
    import java.util.*;
    public class ListGroups
         /* Constant Value For Get User From OID */
         final static String ldapServerName = "test20";
    final static String ldapServerPort = "420";
    final static String rootdn = "cn=orcladmin";
    final static String rootpass = "iamverysmart";
    final static String subscriberDN = "dc=test,dc=com";
    final static String userDN = "cn=uglyboy,cn=users," + subscriberDN;
    public getListUsers()
    // Create the subscriber object using the default subscriber
    Subscriber mysub = null;
    String [] mystr = null;
              try
                   InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx(ldapServerName,
    ldapServerPort,
    rootdn,
    rootpass);
    RootOracleContext roc = new RootOracleContext(ctx);
    mysub = roc.getSubscriber(ctx, Util.IDTYPE_DN, subscriberDN, mystr);
                   User [] myuser = null;
                   String [] attrs = new String[2];
                   attrs[0] = null;
                   myuser = mysub.getUsers(ctx
                                                 ,Util.IDTYPE_FILTER
                                                 ,subscriberDN
                                                 ,null
                                                 ,attrs);
                   /*After I try to get users, length of array is equal 0 */
                   for(int i = 0; i < myuser.length; i++ )
                        System.out.println(myuser.getDN()) ;
              catch(Exception e)
                   e.printStackTrace();
    After I tried to debug, I see array is result of getUsers method have length = 0
    Please advise me .
    Thanks

    Hi,
    since this is primarily a JDeveloper and ADF forum, i suggest to post yur question to the OID and J2EE forum as well
    Frank

  • Please help me return my skype!!!! Please!!!!

    Please help me return my skype!!!! Please!!!!

    Hello,
    Please explain what the problem is.
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • Oawebbean.getValue() returns intial value not updated value. Please Help

    Hi all, I'm using the code
    OAMessageTextInputBean test = (OAMessageTextInputBean)oawebbean.findChildRecursive("xxTestTo");
    Object testing = test.getValue(oapagecontext);
    where xxTestTo is the ID of the field in the XML
    I've set the initial value for testing purposes to be 12345 and when the page loads I try to change the value to 54321 however, the value which is always passed is 12345 not the updated value.
    What am I doing wrong. I have the code above in my processFormRequest
    Please Help

    I think I've pinpointed the problem but I don't know the solution.
    When I add a messageinputtext field within the a region within the page, oawebbean.getValue always returns the old value.
    However if I add the messageinputtext field within the Page (not within a region) then oawebbean.getValue will give me the most updated value.
    When I add the messageinputtext, do I need to set its properties so that it doens't reset its value when I go into processFormRequest?

  • My MB is always starting up in safe mode... why? What to do to start-up normally? Please help.

    Hi,
    I am frequently having troubles with my MB. Different types of troubles. Couldn't solve a single one yet.
    I have performed reboot MB in safe mode-- hold down the left shift key after the start up tone till the spinning gear appeared.
    Few hours back i performed that, and since then it just starting up in safe mode without holding the any shift key. I have password protected log-in and each time the dialog box shown the safe mode, not the normal boot as it used to be. I restarted so many times, but same result.
    I started-up by holding down the Option key, dialog box showing the same thing "safe mode" and same result.
    I started-up in single user mode, and then typed reboot, then pressed enter/return button, but dialog box shown the same and it started up in safe mode after entering the password.
    While in the safe mode, i have selected the Mac OS X 10.4.11 from the preference pane, then restarted, but all produced the same result, same dialog box showing the safe mode.
    I couldn't take the screen shot of that dialog box that appears before starting up.
    I am currently using the internet while in safe mode, and using ethernet adapter- a AirStream 1100 F25 external modem attached to the USB port. I don't know if that is good for my MB to use internet on the safe mode.
    I used disk utility and verified the disk during the safe mode, i don't know if that is right or wrong to perform that utility in safe mode, but it all appeared as normal. You can see that from the following image.
    Few days back, i performed the disk utility to verify disk while on the normal boot. But the result shown the red marks, please see the following image for details.
    Hardware Overview:
      Model Name:          MacBook
      Model Identifier:          MacBook2,1
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          2 GHz
      Number Of Processors:          1
      Total Number Of Cores:          2
      L2 Cache (per processor):          4 MB
      Memory:          1 GB
      Bus Speed:          667 MHz
      Boot ROM Version:          MB21.00A5.B07
      SMC Version:          1.13f3
      Serial Number:          4*********M
      Sudden Motion Sensor:
      State:          Enabled
    BANK 0/DIMM0:
      Size:          512 MB
      Type:          DDR2 SDRAM
      Speed:          667 MHz
      Status:          OK
    BANK 1/DIMM1:
      Size:          512 MB
      Type:          DDR2 SDRAM
      Speed:          667 MHz
      Status:          OK
    System Power Settings:
      AC Power:
      System Sleep Timer (Minutes):          10
      Disk Sleep Timer (Minutes):          10
      Display Sleep Timer (Minutes):          10
      Automatic Restart On Power Loss:          No
      Wake On AC Change:          No
      Wake On Clamshell Open:          Yes
      Wake On LAN:          Yes
      Display Sleep Uses Dim:          Yes
      Battery Power:
      System Sleep Timer (Minutes):          5
      Disk Sleep Timer (Minutes):          10
      Display Sleep Timer (Minutes):          1
      Wake On AC Change:          No
      Wake On Clamshell Open:          Yes
      Display Sleep Uses Dim:          Yes
      Reduce Brightness:          Yes
    Battery Information:
      Battery Installed:          Yes
      First low level warning:          No
      Full Charge Capacity (mAh):          2745
      Remaining Capacity (mAh):          2745
      Amperage (mA):          133
      Voltage (mV):          12575
      Cycle Count:          507
    AC Charger Information:
      Connected:          Yes
      Charging:          No
    Hardware Configuration:
      UPS Installed:          No
    Intel ICH7-M AHCI:
      Vendor:          Intel
      Product:          ICH7-M AHCI
      Speed:          1.5 Gigabit
      Description:          AHCI Version 1.10 Supported
    TOSHIBA MK1234GSX:
      Capacity:          111.79 GB
      Model:          TOSHIBA MK1234GSX
      Revision:          AH008B
      Serial Number:          Z6M7T4FTT
      Native Command Queuing:          Yes
      Queue Depth:          8
      Removable Media:          No
      Detachable Drive:          No
      BSD Name:          disk0
      OS9 Drivers:          No
      S.M.A.R.T. status:          Verified
      Volumes:
    Macintosh HD:
      Capacity:          111.47 GB
      Available:          24.09 GB
      Writable:          Yes
      File System:          Journaled HFS+
      BSD Name:          disk0s2
      Mount Point:          /
    TOSHIBA MK1234GSX:
      Capacity:          111.79 GB
      Model:          TOSHIBA MK1234GSX
      Revision:          AH008B
      Serial Number:          Z6M7T4FTT
      Native Command Queuing:          Yes
      Queue Depth:          8
      Removable Media:          No
      Detachable Drive:          No
      BSD Name:          disk0
      OS9 Drivers:          No
      S.M.A.R.T. status:          Verified
      Volumes:
    Macintosh HD:
      Capacity:          111.47 GB
      Available:          24.09 GB
      Writable:          Yes
      File System:          Journaled HFS+
      BSD Name:          disk0s2
      Mount Point:          /
    System Software Overview:
      System Version:          Mac OS X 10.4.11 (8S2167)
      Kernel Version:          Darwin 8.11.1
      Boot Volume:          Macintosh HD
    Please help me out. Let me know how to start-up normally. By the way, my superdrive is not detecting DVDs including the OS dvds, but it read and write the CDs. So, It is not possible to reinstall OS early, at least not before the having the back up of the data. Please help me with contingency plan/s or as you think fit.
    Thank you. Look forward to your reply.
    <Personal Information Edited by Host> 

    Maximillianmann,
    depending upon how full “almost full” actually is, that could be the problem.
    You can try this, if you have Mac OS X 10.7 or newer installed, to see if it’s not related to your disk being almost full: boot your MacBook Pro into Recovery mode by holding down a Command key and the R key as it starts up. Once the Mac OS X Utilities menu appears, select Disk Utility. On the left-hand side of the Disk Utility window, select your internal disk’s boot partition (typically called “Macintosh HD”). On the right-hand side, press the Verify Disk button if it’s not greyed out; if it is greyed out, or if it reports that errors were found, press the Repair Disk button. Once the verification/repair is completed, exit Disk Utility and select Restart from the Apple menu to restart in normal mode. Once you hear the startup chime, try booting into Safe mode; does it let you do so now?

  • After i plug in my iphone 5s, it always asks me to trust the laptop, i click trust and my laptop makes that noise as if I've pulled my phone out, but i haven't, so now my itunes doesn't recognize my phone, please please help me?

    After i plug in my iphone 5s, it always asks me to trust the laptop, i click trust and my laptop makes that noise as if I've pulled my phone out, but i haven't, so now my itunes doesn't recognize my phone, please please help me?
    THis also happened with my old iphone 4s
    I need help!

    Hi loist,
    Thanks for visiting Apple Support Communities.
    If your iPhone is not being recognized by your computer after you click "Trust," the troubleshooting steps found here can help:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Cheers,
    Jeremy

  • I just bought an iPod nano 7th gen.  When I connect it to my laptop, it doesn't recognize the ipod.  I tried charging it, but now it won't turn on when i push the power button.  Please help me!  I don't want to have to return it.

    I just bought an iPod nano 7th Generation.  When i connect it to my laptop, it doesn't recognize the ipod.  I tried charging it but when I hold the power button, nothing happens.  I don't want to have to return it.  Please help me!

    Hi dnix257,
    Welcome to the Support Communities!
    What version of the Windows Operating System do you have?
    What version of the iTunes software?
    The troubleshooting steps below may help you with this:
    Apple - Support - iPod nano - iTunes Troubleshooting Assistant
    http://www.apple.com/support/ipodnano/assistant/itunes/#section_1
    iPod not recognized in My Computer and in iTunes for Windows
    http://support.apple.com/kb/TS1369
    Cheers,
    - Judy

  • I have a problem with my iphone 4. My 3G always stays activated but I lose my network signal. The bars all get lost and I'm not able to receive / send sms, mms or phone calls. Could you guys please help me fix this problem? Ios 5.1.1

    I have a problem with my iphone 4. My 3G always stays activated but I lose my network signal. The bars all get lost and I'm not able to receive / send sms, mms or phone calls. Could you guys please help me fix this problem? Ios 5.1.1

    I haven't gotten a new sim card because the problem has been presenting itself in various cards not only mine. So far, all I've done is reset my network settings.
    Last night, I turned off the 3G tab and it had all the signal bars. Today, I did the network reset and it's working apparently. But like I said before, previously the bars just disappear and the iphone only has the 3G activated.

Maybe you are looking for