Find index number of an Object in an ArrayList

hi guys
I have an array list of of products which contains 8 strings.
say productList[0]= "asaaas1212"
now i want to get a method which can find out at what index the string "asaaas1212"
is situated on the productList.
thanks
Message was edited by:
sifatkhan

thanks for your reply
will it work if i try this
int count= productList.indexOf("string")?
cheerzyep.. If it doesn't.. blame SUN..
Lots of knowledge available here http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html

Similar Messages

  • Finding GRN Number

    hi,
       i have created Outstanding Liability Grns report. for that report, i need grn number and grn date.
       my tables are bsis,bsas,bkpf,bseg.
      i have fetched the grn number of every document number from xref3 field. but for some datas, the Xref3 field is empty.
        if xref3 column is empty, then i have fetched from bkpf-awkey.
      my problem is,
          for rmrp type datas, bkpf-awkey is not a grn number.
      bkpf shows the miro number for doc number.
      how can i select the grn number if bseg-xref3 is empty and doc type is rmrp(Invoice)?

    hi farooq,
    u can find request number for any object by checkinng version number of that object.
    say for example u need to check the request number in a REPORT
    Go to that REPORT in SE38 and check in menu bar in UTILITIES->VERSION->VERSION MANAGEMENT.
    After u get the request number goto SE10 Tcode and Enter the user name and
    Request Number u got from the above mentioned step.
    Click on Icon DISPLAY button and enter the Request Number u have and tick the check box
    WORKBENCH REQUEST.
    u get the list of object assigned under this request.
       Modifiable
           RQAK936923       ADITYA       12.07.2005 testing
               RQAK993989   VIVEK        22.08.2007 testing.
    u get a similar format shown above.
    The first number shown above is called REQUEST NUMBER ( RQAK936923)
    The second Number shown just below is called TASK         (RQAK993989 )
    Every request number has a task assigned to it which maitains PARENT CHILD RELATIONSHIP
    Click on the Node of TASK  and u get list of object attached to it. Futher click will give u the object name.So place the mouse or tick on the object to PRESS DELETE BUTTON to delete the object

  • Finding Request number

    Dear Experts,
    How can i find the request number of an Object and After finding the request number i want to delete it.And If I delete that request number, all the data which will be holded in dat request will it be deleted ot not?
    How can I do?
    Regards,
    Farook.
    Edited by: farook shaik on Dec 5, 2008 5:35 AM

    hi farooq,
    u can find request number for any object by checkinng version number of that object.
    say for example u need to check the request number in a REPORT
    Go to that REPORT in SE38 and check in menu bar in UTILITIES->VERSION->VERSION MANAGEMENT.
    After u get the request number goto SE10 Tcode and Enter the user name and
    Request Number u got from the above mentioned step.
    Click on Icon DISPLAY button and enter the Request Number u have and tick the check box
    WORKBENCH REQUEST.
    u get the list of object assigned under this request.
       Modifiable
           RQAK936923       ADITYA       12.07.2005 testing
               RQAK993989   VIVEK        22.08.2007 testing.
    u get a similar format shown above.
    The first number shown above is called REQUEST NUMBER ( RQAK936923)
    The second Number shown just below is called TASK         (RQAK993989 )
    Every request number has a task assigned to it which maitains PARENT CHILD RELATIONSHIP
    Click on the Node of TASK  and u get list of object attached to it. Futher click will give u the object name.So place the mouse or tick on the object to PRESS DELETE BUTTON to delete the object

  • How to find the number of references to an object in a big application

    How to find the number of references created for a given object in a big application environment.
    That means, if i give any object name (of my application) as input, then how can i find the[b] number of references created for that particular object ??

    Please don't post the same question multiple times.
    I've answered your question in the other thread here:
    http://forum.java.sun.com/thread.jspa?messageID=4312939

  • How to find the number of references created for a given  object ??

    How to find the number of references created for a given object in a big application environment.
    That means, if i give any object name (of my application) as input, then how can i find the[b] number of references created for that particular object ??

    Please do not post the same question multiple times.
    As for your original question, there is no direct way to do it.
    Especially not the way you phrased it,
    since objects don't have "names".
    Applications also don't have "names".
    They have classes and instances.
    Also, there are 2 related issues, and I'm not sure which one is the one you asked.
    #1. Finding the number of references to the same object.
    Eg.
    Map<String,String> a = new HashMap<String,String>();
    Map<String,String> b = new HashMap<String,String>();
    Map<String,String> c = a;In this case, there are only 2 objects.
    The first object has (at least) 2 references pointing to it.
    The second object has (at least) 1 reference pointing to it.
    (There may be more, if the HashMap library keeps
    references to these things, or if the HashMap object has
    some internal cyclic references...)
    If you're asking this, then it can't be done.
    It's an active research topic in universities
    and software research labs, called "alias analysis".
    Type it in google, and you'll see people are working hard
    and having little success so far.
    #2. Finding the number of instances created from a class.
    In this case, what you have to do is to add a counter to
    the constructor of the class. Every time an object is constructed,
    you increment the counter. Like this:
       class MyClass
           public static int counter = 0;
           public MyClass( )  { counter++; }
        // Then later in your program, you can do this:
        MyClass a = new MyClass();
        MyClass b = new MyClass();
        System.out.println(MyClass.counter); // It should show 2Note: you won't be able to do this to every class in the system.
    For every class you care about, you have to modify its constructor.
    Also: when an object is deleted, you won't always know it
    (and thus you won't always be able to decrement the counter).
    Finalizers cannot always work (read Joshua Bloch's
    "Effective Java" book if you don't believe me), but basically
    (1) finalizers will not always be called, and
    (2) finalizers can sometimes cause objects to not be deleted,
    and thus the JVM will run out of memory and crash

  • Nternal ERROR: Can not find the ACL containter for object ...

    We are using OWB 10.2.0.3. We tried to introduce two basic roles to prevent user A from accessing certain parts of our project. Somehow (I cannot really say how) we ended up in the error message below whenever we want to modify the security properties of an object.
    Neither in metalink nor in the oracle forums I could find any hint about that error.
    Can anyone help??
    Thanks in advance, Maren
    Internal ERROR: Can not find the ACL containter for object:CMPMap@1ba11bc/id=2023180/owningFCO=2023180/proxyFor=(CMPMapGen@1a4d5c6/id=2023180/stname=CMPBatchMap/pname=LOAD_XML/lname=LOAD_XML/status=CLEAN/committed=true/persistent=true/propsLoaded=false)
    Internal ERROR: Can not find the ACL containter for object:CMPMap@1ba11bc/id=2023180/owningFCO=2023180/proxyFor=(CMPMapGen@1a4d5c6/id=2023180/stname=CMPBatchMap/pname=LOAD_XML/lname=LOAD_XML/status=CLEAN/committed=true/persistent=true/propsLoaded=false)
         at oracle.wh.repos.pdl.security.SecurityPolicyManager.getAccessCharMapOfPrivilegeOwner(SecurityPolicyManager.java:166)
         at oracle.wh.repos.impl.foundation.CMPElement.getAccessCharMapOfPrivilegeOwner(CMPElement.java:2743)
         at oracle.wh.repos.pdl.security.OWBSecurityImpl.hasPrivilege(OWBSecurityImpl.java:820)
         at oracle.wh.repos.pdl.security.OWBSecurityImpl.internalSecurityCheck(OWBSecurityImpl.java:1449)
         at oracle.wh.repos.pdl.security.OWBSecurityImpl.securityCheck(OWBSecurityImpl.java:649)
         at oracle.wh.repos.pdl.security.SecurityModuleImpl.securityCheck(SecurityModuleImpl.java:660)
         at oracle.wh.repos.pdl.security.SecurityModuleImpl.securityCheck(SecurityModuleImpl.java:623)
         at oracle.wh.ui.common.WhSecurityHelper.securityCheck(WhSecurityHelper.java:112)
         at oracle.wh.ui.console.commands.EditObjectCmd.performAction(EditObjectCmd.java:107)
         at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:189)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:478)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    Hi Maren
    Like you I get this error and do not know what steps caused it.In my scenario I have some mappings that give the error and some that do not - the repository user gets the error but the repository owner does not.
    Thinking back over the last number of months (as this project contains 7-8 months od work - we do have exports of the project) I think the ones giving the error are those that perhaps were copied from another to start the coding but I cannot be sure.
    I have read the metalink note mentioned above as well as the the queries posted by Oleg and yourself. The queries posted are slightly different, one has a where clause
    fco.classname = 'CMPACLContainer' (Maren's)
    and the other
    fco.classname='CMPMap' (Oleg's).
    Was this intentional Maren on your behalf for your problem to be fixed?
    We are using 10.2.0.3.33 OWB client and 10.2.0.3.0 OWB repository.
    Thanks
    Edwin

  • How to find the number of occurence of a string

    String str="The AR tech seeks experienced candidates in java,jsp. The candidates should have atleast 1 year of experience in the specified skills.";
    here i need to find the number of occurence of the string "experience".
    how to find it out?

    String str="The AR tech seeks experienced candidates in java,jsp. The candidates should have atleast 1 year of experience in the specified skills.";
    String findStr = "experience";
    int count = 0;
    int index = 0;
    while(index != -1) {
    index = str.indexOf(findStr, (count == 0 ? 0 : index + findStr.length()));
    if(index != -1) {
    count++;

  • How to find the number of entries in a master data table

    Hi Experts,
    I am trying to find the entries in 0CUSTOMER master data.
    BW>LISTCUBE>Data target: 0CUSTOMER and selected the fields that I need.
    I would like to know how to find the "number of entrees". I tried to run the SUM for a count field, but it is taking forever as there are huge number of records .

    Hi Dev,
    Go to the change/display mode of the info object (0CUSTOMER) in your case. Go to the Master data/Text tab. Here you will find the master data tables according to your settings (P orQ or X or Y). Double click on the table name and it will take you to the SE11 display. From there, you can check the number of records as you do in any transparent table.
    Hope this helps.
    Thanks and Regards
    Subray Hegde

  • How to find the number of records per months  in cube

    Hi,
      how to find the number of records per months for my all cubes?
      Can i use the ListCube transaction to find totl number f records per cube monthwise ?
    Jimmy

    Hi,
    Here is a program to generate no of records and list of ODS and Cubes in Active version.Schedule this program in background and create a cube to load this information and schedule to the data from the file generated by the program. Schedule this all per you requirement.
    1.Copy the code into your Z<programname> from Se38.
    2.change the FILENAME in CALL FUNCTION 'GUI_DOWNLOAD' in the program to the location from where you can pick the information to load data to cube(eg Application server).
    3.Save program.
    4.Schedule the program in background as required
    5.Create cube with infoobjects to hold no of records and Infoprovider name
    6.Load this cube based on event after the program job is done.
    Hence you can report on this cube to see no of records in  CUBE or ODS in your box.
    Please find the code below.
    Cheers,
    Kavitha Kamesh.
    types: begin of itabs ,
          tabname type dd02l-tabname,
          end of itabs.
    data: itab type itabs occurs 0 with header line.
    data: counter type i.
    data: begin of itab1 occurs 0,
    tabname type dd02l-tabname,
    counter type i,
    end of itab1.
    DATA: ITABTABNAME TYPE STRING.
    DATA: LENGTH TYPE I.
    DATA: OBJECT(30).
    data: str(6) type c.
    select  tabname from dd02l into table itab where ( tabname LIKE  '/BIC/F%' or tabname LIKE  '/BIC/A%00' )
    and TABCLASS = 'TRANSP' and AS4LOCAL = 'A'.
    loop at itab.
      select count(*) from (itab-tabname) into counter.
      str = itab-tabname.
      if str = '/BIC/F'.
    LENGTH  = STRLEN( ITAB-TABNAME ).
      SHIFT  itab-tabname BY 6 PLACES LEFT.
    ELSEIf  str = '/BIC/A'.
      SHIFT  itab-tabname BY 6 PLACES LEFT.
      LENGTH  = STRLEN( ITAB-TABNAME ).
    LENGTH = LENGTH - 2.
    endif.
      itab1-tabname = itab-tabname(LENGTH).
      append itab1.
      itab1-counter = counter.
      clear itab-tabname.
      clear:  COUNTER.
    endloop.
    *********** itab1
    loop at itab1.
    write:/ itab1-tabname, itab1-counter.
    endloop.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                    =
        FILENAME                        = 'c:records.xls'
        FILETYPE                        = 'ASC'
    *   APPEND                          = ' '
        WRITE_FIELD_SEPARATOR           = ','
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    * IMPORTING
    *   FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab1
    *   FIELDNAMES                      =
    * EXCEPTIONS
    *   FILE_WRITE_ERROR                = 1
    *   NO_BATCH                        = 2
    *   GUI_REFUSE_FILETRANSFER         = 3
    *   INVALID_TYPE                    = 4
    *   NO_AUTHORITY                    = 5
    *   UNKNOWN_ERROR                   = 6
    *   HEADER_NOT_ALLOWED              = 7
    *   SEPARATOR_NOT_ALLOWED           = 8
    *   FILESIZE_NOT_ALLOWED            = 9
    *   HEADER_TOO_LONG                 = 10
    *   DP_ERROR_CREATE                 = 11
    *   DP_ERROR_SEND                   = 12
    *   DP_ERROR_WRITE                  = 13
    *   UNKNOWN_DP_ERROR                = 14
    *   ACCESS_DENIED                   = 15
    *   DP_OUT_OF_MEMORY                = 16
    *   DISK_FULL                       = 17
    *   DP_TIMEOUT                      = 18
    *   FILE_NOT_FOUND                  = 19
    *   DATAPROVIDER_EXCEPTION          = 20
    *   CONTROL_FLUSH_ERROR             = 21
    *   OTHERS                          = 22
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How to find the number of records in ods?

    how to find the number of records in ods?
    Pls suggest the solution apart going to the table of ods and seeing the number of records.
    Is there any program or function module to see the number of records in ods?
    For eg: SAP_INFOCUBE_DESIGNS is a program which gives the detail (number of records) of infocube.

    Hi,
    I was looking at this and found the following tables that may be of help.
    One of these tables will include a summary of the record count of all the tables in your system based on the last time each table had it's database statistics calculated:
    DBSTATTADA
    DBSTATTDB2
    DBSTATTDB4
    DBSTATTDB6
    DBSTATTINF
    DBSTATTMSS
    DBSTATTORA
    We run on an Oracle database so the table record counts can be taken from DBSTATTORA. Type in AZ in table selection field in SE16 to restrict the output to ODS (or DSO) tables only.
    The record count is at the time indicated in the timestamp field. Obviously this is not real time but should not be too out of date - if it is you may be having performance issues and should get your DBA / Basis to run a full refresh of DB stats.
    Hope this helps, alhtough not real time the table should give you a decent indication of the size of all your ODS objects (or any other table for that matter!)

  • To find total number of files inside folder

    Hai,
       In knowledge management is there any option to find total number of files inside folder...
        I also want to see the recently uploaded and modified documents in a seperate iview...
        Iam using NW2004s SP8..
        Very urgent..
        Waiting for a positive reply..
        Thanks&regards,
         Kiruthika.S

    Hi Kiruthika,
    1. You only need the configarchive if you don't want create all the KM configuration objects mentioned in the guide manually. So, just create the objects mentioned there and you don't need the configarchive
    Also, the scenario works also on 2004s.
    2. Please check this thread on how to show the total number of files inside a folder:
    https://forums.sdn.sap.com/thread.jspa?threadID=19610
    3. It would be nice if you would consider rewarding the time people like Saravanan spend to investigate and answer your question by assigning points via the colored stars.
    Best regards,
    Robert

  • How do I find the number of users returned by a cfldap query?

    How do I find the number of users returned by a cfldap query?
    I'm not allowed to do something like:
    <cfif ArrayLen(results.rows) gt 1>
    I then get an error:
    faultCode:Server.Processing faultString:'Unable to invoke CFC - Object of type class coldfusion.tagext.net.LdapResultTable cannot be used as an array' faultDetail:''
    Many thanks for any light you can shed

       Cheers again Ian for your many helps,
    it now won't let me do
    <cfqueryparam value="#results.USNCreated#" cfsqltype="cf_sql_varchar">
    I get the message:
    faultCode:Server.Processing faultString:'Unable to invoke CFC - Error Executing Database Query.' faultDetail:'[Macromedia][SQLServer JDBC Driver][SQLServer]The name "results.USNCreated" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.'

  • Error: Number range  for object RESB does not exist

    Hi
    I'm trying to convert a planned order (to purch requisition) partially via trxn code MD04. Upon saving I get the above error msg. The complete text of msg is as  follows. I've maitained the number ranges of all the objects specified in this error msg. Can somebody explain on how to overcome this problem?
    Many thanks
    BE
    Error Msg Text:
    Number range  for object RESB does not exist
         Message no. 61501
    Diagnosis
         The system cannot create a document for an MRP element if no number
         range or interval has been maintained in Customizing of MRP or if t
         number range you have maintained is not allowed.
         Below is a list of MRP elements that are affected:
         Number range object  MRP element
         PLAF                 planned order (operative oder simulative)
         EBAN                 purchase requisition
         RESB                 dependent requirements
         MDSM                 simulative dependent reqmts (long-term plannin
         MDTB                 MRP list
    Procedure
         Check the number ranges in Customizing. If you do not have the necessa
         authorization, please get in touch with your systems administration.

    Hi
    Thanks for the reply. But I have maintained the number ranges for matl. reservations/dependant requirements at OMI2. Here is the screen shot..Do find anything wrong with it? Pl advice.
    NR Object                             MRES/DREQ
    No.                          From Number            To Number          Curr Number          Ext
    01                           0000000001               8999999999           380                    blank
    02                           9000000000               9500000000           blank                  checked
    RB                          9500000001               9999999999           blank                  checked
    Number ranges for the plants are assigned to 01 (0000000001 to 8999999999).
    thanks
    BE
    Edited by: Brian Elfie on Jan 10, 2008 11:27 AM

  • How to find out Number of entries in a Huge Table?

    Hi,
    I would like to know Number of entries in table DFKKOP. when i try to get it through se16, it takes more than 10 minutes in dialogue process so a time out occurs. is there any way to find out number of entries in the table Apart from creating a program for that?
    Please guide me to the solution.
    Thanks,
    Lijo Joseph
    Message was edited by: Lijo Joseph Vazhappilly

    REPORT  YCHATEST                                .
    Data : begin of itab occurs 0.
            include structure tab512.
    data:end of itab.
    data : v_count like sy-index,
           tabname like X030L-TABNAME value 'DFKKOP'.
    CALL FUNCTION 'RFC_GET_TABLE_ENTRIES'
      EXPORTING
        table_name              = tabname
    IMPORTING
       NUMBER_OF_ENTRIES       = v_count
    tables
       entries                 = itab.
    write : v_count.
    Message was edited by: Sekhar

  • Find Total Number of Rows in Database

    I am trying to find total number of rows in Database? Thanks in advance

    I'd come back to a question of "why". What possible reason could you have to want to know the number of rows in every table in the database?
    This seems like it is a request from someone non-technical where they're not sure exactly what they need to ask to get the information they want. I'm forseeing something along the lines of
    User: How many rows are in the database
    DBA: Ummm.... <<goes off and spends a lot of resources to count>>> ... 1 billion.
    User: Wow, that's a lot... How big are those rows...
    DBA: Hmmm... <<goes off and spends more time trying to find an average row size>>... 100 bytes
    User: <<Plugs numbers into Excel>>... OK, our database is 93 GB, so we need to order 100 GB of disk for our new environment.
    DBA: <<Months later, after 100 GB of disk has been budgeted, purchased, and delivered>> User, you didn't order enough disk for our disaster recovery environment.
    User: You said our database was only 93 GB!!
    DBA: 93 GB of data. Plus 100 GB of indexes, TEMP, UNDO, space for archived logs, ...
    When "odd" requests come down, it's generally the case that the person asking the question doesn't know what question they really want to ask because they don't have the domain knowledge to know how to ask the question. Walking over and asking them what they're hoping to accomplish/ what they're using the data for generally leads to a case where
    - The user gets exactly the information they need, not the information they think they want
    - The DBA does a lot less work, since the right question is almost always easier to answer
    - The user thinks of the DBA as a really helpful sort of guy and remembers how helpful you were in the past when you have to push back on other things later
    - No one ends up playing the blame game when the user gets just what they asked for and not what they want.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

Maybe you are looking for

  • My iphone 3g is showing no service all of a sudden.. i am unable to make calls. please help...

    My iphone 3g is showing no service all of a sudden. i am unable to make calls. my iphone has turned out to a simple ipod. pls help. ...

  • Problem displaying applet in java

    hello, we are doing a project in image processing and we need to display the output multiple images in an applet. we are getting the display when we use Applet Viewer, but when we are using web browser(IE5) to display the same applet we are getting a

  • No sound after burning

    I've been searching this forum, and followed most, but still have this problem. I'm attempting to burn a "purchased" playlist in Toast Lite. iTunes is set to audio cd . The disk is a Memorex CD-R. I drag the playlist to the Toast interface. All songs

  • How to feed 4x6 in paper in a 3520 deskjet printer

    I want to print pictures on 4x6 in pages.  The HP deskjet installation and readme files do not address that issue. Has someone done this?

  • Can someone explain icloud in plain english

    I Just can't get my head around Icloud and how it works, I'm assuming now that I've paid 79p a month whatever photos i take on my iPhone with automatically be beamed to my iPad and iMac and vice versa, but when i took a photo with my iPhone to test i