Help in calling same method many  times

hello
I have 3 different list.put statements, each of which I need to call at different parts of the program. I have now been told to put all these statements into a single method , and call that method wherever necessary. how will the method now identify which .put statement that it needs to execute?
I need help..kindly provide.
thanks in advance
aparna

I am unable to post the code currently. Instead, the following:
I have the following,each in 3 different methods of the program,
userList.put(rs.getString("username"));
userList.put(rs1.getString("username"));
userList.put(rs2.getString("username"));Now I would like to put all these 3 statements in to a single method named InOffice(String Phone) --> This method already has an argument 'Phone'.
Now when I need to execute the different userList.put statements wherever necessary in the pgm, I should be able to call this method InOffice, and it should be able to execute only those userList.put statements which are needed at that point of execution.
How do i now go abt this?
Thanks again..
Aparna

Similar Messages

  • Album display shows same album many times

    Just installed iTunes 8 and switched to Album display. Display now shows same album many times. Each time is for a different song. Occurs on compilation CD that has many artists, showing one for each artist. Example: Top Gun Soundtrack
    How do you consolidate to only show album once?
    How do you get the album cover for one of these compilation cd's? comes back and says Artwork can't be found

    Have you had a look at this troubleshooting page? It may be of some help: Why aren't songs with the same album art grouped together

  • Same message many times to xi system

    Hi all,
                i want to send same message many times to the xi system,couid anyone give me idea using any adapter  and using BPM and without using bpm also..
    regards
    ptrao

    Hi Krishna,
         Let's take an example..you are sending the file to the xi...you are placing the file in the source directory...you have the option in the sender communican channel if you do no tselect the delete option from the processing mode.The XI will keep on the poll the  message according to the time interval which you mentioned in the sender adapter ( file) poll interval.
      For more information you can refere the below link:
    http://help.sap.com/saphelp_nw04/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
        Hope i am clear.
       Thanks and Regards,
       Chandu.

  • "OIM Database Application Connector" is Recon the same user many times!

    Hey,
    I am facing an interesting issue that my OIM Database Application Connector is reconning (Creating) the same user many times.
    I have created/configured the "OIM DB Application Connector" which should Recon the new user in to OIM when ever new user created in the database via portal. I scheduled the connector every 15 min. The connector is working as expected and creating new OIM user if any new user has created in the DB table.
    Issue here is: I have created one user in the table which has reconed to OIM and I can see the entry in design console Recon Manager table. After 15 min when connecotr is run it is picking up the same user. So it is picking the same user every time it runs!!!. It stops picking the user after some time, but dont have exact time when it stop picking the user. But I could see min 25+ times same user and all the time the status is EVENT LINKED. Any idea please why it is happening. My matching criteria is Time Stamp Attribute: "Updated_By_Sysate" & Unique Attribute = "User_ID".
    My Env:
    OIM Version: 9101
    Server : Weblogic
    DB : SQL Server 2005 (Source DB)
    Any idea please?
    thanks
    kln

    1) Yes, you should add in your resource object all fields that are defined in xel_data_source parameters of config.xml file.
    2) Correct. You have to create a user defined field in your form designer and map it to a column in your process definition (reconciliation field mapping tab).
    3) Reconciliation rule is the rule that OIM use to link Database users and OIM users. You need to create a recon rule using an attribute who has the same value in both systems. Also, you need to define this rule in your config.xml file (see how to configure reconcile tasks in connector documentation). So, this attribute used in your recon rule must be required because it will be used to create or link users. You can define any other fields as required, but if one of these required fields are not filled, you will receive a "Required Data Missing" error in your reconciliation manager event.
    4) Reconciliation is used to update OIM with changes made directly in your database table. To update your database table based on OIM changes, you must modify an user attribute in your UD_DBAPP user's form.
    Regards.

  • HT204152 I am unable to update my App  store Updations. the reason being billing problem asking to update payment method.many times i updated my credit card details but refusing from the system .how can i update my app store updations like  Face book etc.

    I am unable to update my App  store Updations. the reason being billing problem asking to update payment method.Many a  times i updated my credit card details but refusing from the system .how can i update my app store updations like  Face book etc....Using ! phone 6plus  .IOS8.3

    What do you mean by 'refusing from the system', if you are getting an error message then what does it say ?
    For a credit card to have a chance of being accepted it needs to be registered to the same name and address (including format and spacing etc) that you have on your iTunes account, and have been issued by a bank in the country where you and your iTunes account are. If it is and if you are getting a 'declined' message then you could check with the card issuer to see if it's them that are declining it, and if not then try contacting iTunes Support (these are user-to-user forums) and see if they know why it's being declined : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If when trying to download you are getting a message about a 'problem with a previous purchase' then that implies that iTunes wasn't able to collect the money for your last purchase. If that is the case then you won't be able to download anything else (including app updates) until you've paid off what you owe : Pay an unpaid balance in the iTunes Store - Apple Support
    If you aren't getting the 'problem with a previous purchase' message then try logging into your account (not when trying to download something) and see if you get the 'none' option so that you can remove the card's details and be able to download updates to your apps : Change or remove your payment information from your iTunes Store account (Apple ID) - Apple Support

  • [Help] - How to create BP many times.

    Dear all,
    Pls help..
    i created Business Partners(BP) many times (use FM: COM_BPUS_BUPA_CREATE)
    This is the code:
    LOOP AT lt_mstcust INTO ls_mstcust.
    i FILL data cust that want to be created.
      CALL FUNCTION 'COM_BPUS_BUPA_CREATE'
        EXPORTING
          IV_PARTNERCATEGORY         = partner_cat
          IV_BUSINESSPARTNERGROUP    = lv_bpgroup
          IS_CENTRALDATA             = ls_central
          IS_CENTRALDATAORGANIZATION = ls_organ
          IS_ADDRESSDATA             = ls_address
          IV_ACCEPT_ERROR            = 'X'
          IV_BUSINESSPARTNERROLE     = lv_bprole
        IMPORTING
          EV_BUSINESSPARTNER         = lv_bpnumber
        TABLES
          IT_TELEFONDATA             = lt_telephone
          IT_FAXDATA                 = lt_fax
          ET_RETURN                  = lt_return.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            WAIT   = ''
          IMPORTING
            RETURN = lt_return.
    ENDLOOP. 
    end of code.
    The strange problems:
      Not all BP that i created saved in table BUT000, although all BP number was generated after running that FM.
      So i can say after i run the LOOP, i got all bp number. BUT, some of bp numbers were not found in table BUT000. It means when i run TCODE: BP and i entered BP number that were not found in BUT000, error message (bp is not found) would be raised.
    Do u have any solutions for it?
    Or are there others creating BP FM that can be run in LOOP (can create BP in many times)?
    Please help y..
    Ur help is very important for me.
    Regards.
    Daniel N.

    Hi Daniel,
    You can try out one of the following.
    1. Call the function module "COM_BPUS_INPUTDATA_CHECK" before the function module "COM_BPUS_BUPA_CREATE"
    2. Instead of calling the function module "COM_BPUS_BUPA_CREATE" Try calling "BAPI_BUPA_CREATE_FROM_DATA" and then commit and then call "COM_BPUS_BUPA_ROLE_ADD"
    3. Try removing the flag IV_ACCEPT_ERROR = 'X' from the function module call.
    4. In the BAPI_TRANSACTION_COMMIT pass a value 'X' to the parameter WAIT.
    Let me know if this helps!
    Jash.

  • Help on Calling a method from another class

    how can i call a method from another class.
    Class A has 3 methods
    i just want to call only one of these 3 methods into my another class.
    How can I do that.

    When i am trying this
    A a=new A;
    Its calling all the methods from class A. I just want
    to call a specfic method.How can it be done?When i am trying this
    A a=new A();
    Its calling all the methods from class A. I just want to call a specfic method.How can it be done?

  • Can I CALL FUNCTION 'SPBT_INITIALIZE' many times ?

    Hi ABAP Expert,
    I need your advise whether is recommended to calling FUNCTION 'SPBT_INITIALIZE' to get updated information regarding available background process for parallel processing in ABAP.
    Because if i just call this program 1 time at the beginning and the report running quite long, the information is not updated anymore.
    Please advise.
    Thank you in advance
    Fernand.

    Hi
    what you can do is create form and perform
    write your code for that FM in Form part and use perform wherever in your program you want to use.
    whenever the perform will be triggered it will go to the form part where you are calling the FM.
    I hope this way you can use it multiple time without calling it every time from pattern.
    But I am not sure whether it is a good approach or not?
    thanks
    Lalit Gupta

  • Help on calling static method in a multithreaded environment

    Hi,
    I have a basic question.. pls help and it is urgent.. plss
    I have a class with a static method which does nothing other than just writing the message passed to a file. Now i have to call this static method from many threads..
    What actually happens ???
    Does all the thread start to execute the static method or one method executes while the other threads wait for the current thread to complete execution?. I am not talking about synchronizing the threads...my question is what happens when multiple threads call a static method??
    Pls reply.. I need to design my project accordingly..
    Thanks
    Rajeev

    HI Omar,
    My doubt is just this..
    I wanted to know what might happen if two threads try to access a static method.. Logically only one thread can use the method since it is only only copy... but i was wondering what might happens if f threads try to access the same static method.. My Situation is this.. I have a cache which is just a hash table which will be only one copy for the whole application.. No when i get a request I have to check if the id is avaible in the cache. if it is available i call method 1 if not i call method2. Now Ideally the cache should be a static object and the method to check the id in the cache will be a normal instance method..
    I was just wondering what might happen if i make the method static.. If i can make it static i can can save a lot of space by not creating the object each time.. u know what i mean.. That y i wanted to know what happens..
    Rajeev

  • Run the same procedure many times in parallel but no more than 10 at a time

    I have a table filled with individual such criteria and want to run a stored pl/sql procedure to run searches on an external server on each of them. The stored procedure deals with the API and the external server can handle the concurrency.
    I want to be able to the multiple searches concurrently (ie. run the stored procedure concurrently) but no more than 10 concurrent searches at a time (There are 20,000 searches to complete).
    I'm thinking this should involve AQ whose messages call "run once" event based jobs from the Scheduler (I'm running on 10g) but I am very new to Oracle and hence not sure where to begin.
    If somebody could fill in my obvious blanks and give me an approach that will actually achieve my end I would be extremely grateful!
    Cheers, Kim.

    > I'm hoping that each of my "spawned threads" (Jobs)
    will insert all outputs into the same table (I don't
    mind them waiting on each other as it is the
    searching that is the real bottle neck). Is this
    going to be a spanner in the works?
    Inserts into the same table is not a problem. The typical problem is spawning multiple copies of the same PL/SQL proc to update the same table. Somehow each PL/SQL proc needs to find itself a unique set of rows to lock and process - without impact its fellow processes. Using ROWNUM ranges for example does not work in this case.
    The search implies I/O. This is good and bad.
    Good in that the only real way to speed up a ton of I/O (assuming that the ton of I/O is non-negotiable and must happen) is to perform the I/O in parallel. I/O is the slowest operation on a db platform due to I/O latency. And this parallel I/O processing exactly what Oracle does with Parallel Query (PQ).
    The bad is that more processes means a bigger resource footprint and one needs to figure out just what the optimal size is.
    Oracle PQ has a very simplistic mechanism - it allows you to specify the number of PQs that can be spawned (and if on a a cluster, on how many nodes) per table. It also allows you to specify a PQ process pool ceiling.
    But this is fairly primitive as you still need to figure out (in some way) what the optimal PQ sizes are per table.
    The bad is that you either need to do something primitive and similar to PQ - which means a manual monitoring and tuning - or you need to try and automate it. Which in itself can be very interesting, but complex to develop and often quite difficult to get right.

  • Calling same form multiple times

    Hi, i need to call a single form with different table names as parameters depending on conditions.
    for eg here is the approach
    if flag1_is_set
      call form1 multiple times with table1, table2....... as parameters
    "and i can avoid this
    "  form 1 using table 1
    "  form 1 using table 2
    "  form 1 using table 3
    "  form 1 using table 4
    "  form 1 using table 5
    elseif
      flag2_is_set
        form 1 using table 2
    elseif
      flag3_is_set
       form 1 using table 3.
    but i cannot call forms like this. can someone suggest
    an equivalent implementation on how to do this.
    if i dont implement in the above mentioned approach i have to code the same thing with minor changes multiple times
    thanks.
    your help would be appreciated.
    kranthi.

    You might try passing a field symbol (itab) in the tables.
    And assign the filed symbol with your itab as per the condition.
    Check if the program below gives you any idea.
    REPORT  Z_RAM_DYN_TAB_IN_FORM.
    PARAMETERS : P_TAB1 TYPE C.
    DATA: lt_users2 type standard table of usr02.
    DATA: lt_users1 type standard table of usr01.
    FIELD-SYMBOLS: <fs_itab> type standard table.
    SELECT * into table lt_users1 FROM usr01.
    SELECT * into table lt_users2 FROM usr02.
    IF P_TAB1 eq 'X'.
       ASSIGN lt_users1 to <fs_itab>.
    ELSE.
       ASSIGN lt_users2 to <fs_itab>.
    ENDIF.
    PERFORM test_form TABLES <fs_itab>.
    FORM test_form TABLES x_itab .
    FIELD-SYMBOLS: <fs_wa> type any.
    FIELD-SYMBOLS: <fs_field> type any.
      LOOP AT x_itab ASSIGNING <fs_wa>.
        DO 5 times.     "Write first 5 fields of itabs.
          ASSIGN COMPONENT sy-index OF STRUCTURE <fs_wa> to <fs_field>.
          WRITE :  <fs_field>.
        ENDDO.
        WRITE :/.
      ENDLOOP.
    Thanks,
    Ram
    Message was edited by: Ram Manohar Tiwari

  • Help me, calling a method in another class.

    public class xxx extends thread{
    User aUser=new User("MARY") //create an object in the User class
    aUser.SendToOnlineList();  // i want to use the SendToOnlineList() method to call the AddToList() method which is in the OnlineList class
    OnlineList.ReturnList();   // and then i want to get back the online list by using the method ReturnList() in the class OnlineList.
    class User {
          private final String userId;
        public User(String userId) {  //constructor
            this.userId = userId;
    public void SendToOnlineList () {
        OnlineList.ServerOnlineList.AddToList(this); // netbeans underlines this statement!!!!!!!!can anybody help me with codes?
    class OnlineList {
       ArrayList ServerOnlineList=new ArrayList();
       public void AddToList(User user) {
           ServerOnlineList.add(user); // I want to add a User object into the ServerOnlineList( this is an arraylist) in this class
    public ArrayList ReturnList () {
    return ServerOnlineList;
    }can you help me???thanks!!!!!!!!!!!!!!

    @OP: You need to stop this.
    You don't grasp even the basics of Java, and you're trying to write a client/server app. That is not reasonable. If you don't understand how to initialize a variable or how to print things out or what public means, or how to debug your own NullPointerExceptions, or any of a host of other basics that seem to stump you, then you're in way over your head.
    It doesn't matter if you "have to" do this because it's an assignment for school. Posting a new thread here for each of the 80 bazillion things you don't undertsand will not help you to learn, and it's getting very annoying.
    If you really want to learn Java, then go through one of more of the following.
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java.

  • Subcontracting : Issue of materials to same PO many times

    Dear Friends,
    The issue that i have is when i create a subcontracting PO, then issue materials thro transfer posting.. 541 movemnet triggers and no accounting document gets generated.. But issue is that i can always do a second time and n number of times issue to the same subcontractoing Po. Is there any way by which this can be restricted to one time issue for PO and no repeations?
    thanks
    nandu

    Hi,
    This is the standard SAP fuctionalty, any number of times material can be issue. There is no updation in PO.
    Amit

  • How do I turn on long press keyboard to write the same character many times with one keystroke only? I can only write 1 letter at a time with each key press. To write "aaaaa" I need to press 5 times the A key. I didn't use to do this.

    I know this has something to do with INSERT key in Windows I guess. But suddenly I was using Mac OS X Lion and a keyboard sign appeared in the top bar, and the keyboard didnt work as it usually does. I mean, I wanted the long press key to write multiple caracters of course. Please help!

    It's now a hidden option that can be turned on with a terminal command.  The easiest way to do this is to download TinkerTool from this site:
    http://www.bresink.com/osx/0TinkerTool/download.php5
    Then go to Tinkertool > General tab > Select "support key repeat".
    Logoff and login again.
    Regards,
    Captfred

  • Dropdown Box in WAD (Please help me as i posted many times,but no infos)

    Hello ,
    I have defined two drop down box one for Plant and other for Material.
    Plant has 14 entries and Material drop down has 100 entried for every plant.
    Now Dropdown Box is assigned with characteristcs info object 0PLANT
        2nd    Dropdown Box is assigned with characteristcs info object 0MATERIAL
    Plant is used as an Compounding attribute of 0material.
    When i select plant 4040 corresponding material numbers will be displayed in dropdown box of material.
    After that i am selecting a material from that dropdown box.
    Now if i change the plant it is not displaying me any values even though there is data for that plant.
    The dropdown box keeps the previous selection and it is not getting refreshed .
    How to solve this issue.
    Please help me!
    Kind regagrds
    Ram
    Points will be assigned

    Hello Rakesh,
    Thanks for the informations,
    But already these options were selected.
    My issues in if i select 1st drop down box and  then select second drop down box the values are displayed.
    Now if i make change in the 1st drop down box the previous selection of the first drop down box was not cleared and because of that it does not show the values in the chart or table.
    i need to solve this issue,
    Please help me with informations
    Lots of thanks in advance
    Kind regards
    Ram

Maybe you are looking for

  • Unable to get the admin object for the CsContainerAdmin service

    Hi, On AIX, we deployed XIR2 SP2 --> XIR2 SP3 --> SP3 Productivity Pack. The Conection server does show up on the server list in the CMC, but on trying to access this server, it throws an error" Unable to get the admin object for the CsContainerAdmin

  • Unable to open the app in ios7 it gets crashed?

    unable to open the app in ios7 it gets crashed?

  • TV in has no color on ti4400

    Everything on this card works fine. But when i try the tv in on my camcorder its not in color. Im using the  Intervideo winproducer that came with the card with a COLOR sony camcorder. Any ideas?

  • RFC Destination type for IDOC to FILE

    Hi, wat is the RFC Destination type for IDOC to FILE ? jeff

  • Time Stamp Error In ODS

    Hi ALL When I tring to load data from ODS1 to ODS2,an error is coming like Time Stamp Error. And when IAm trying to activate the Transfer structure,I could'nt able to find Activate Symbol? What should I do now in oredr to activate this? Pl help me ou