How do check the whether the vector contain specific value

I store the value retrive from select statement into vector .How do I check if the value is in the vector list . The value I am checking for is from combobox identified as obj.value. Curently I using the following syntax to check whether value is in vector or not.
if (tran_typ.Contains(obj.value))
Please answer me soon.

should be:
for (int x=0; x<vector.size(); x++)
      MyObject o = (MyObject) vector.elementAt(x);
      if (value == o.getMyValue())
             //do something
}Sorry, it is 2:30 in the morning!!!
Thanks,
Harold Clements

Similar Messages

  • How to check/count whether child records with specific type exist?

    Hi
    We need to create a BIP report based on data from Siebel.
    In Siebel we have two entities:
    Entity <Mandate> = Parent Business Componet
    Entity <Attachment> = Child Business Component
    (An attachment has a specific type attribute (e.g. “contract”, “appendix” and lot of others…)
    Relationship between Mandate and Attachments is 1-m.
    We need to create a BIP report which displays all Mandates records which do not have at least two Attachments child records (there must be one attachment child record with type=”contract’ and another with type “appendix”). How can we check in BIP whether these child records with a specific Attachment type exist? And if not, display the Mandate in a list....
    Many thanks
    Alen

    Thanks for your help
    Well I'm not sure about the syatax I have to use in order to filter on the field *<GAMDocumentType>*
    The structure of the xml we use is as follows:
    <ListOfBipJbAmlMandateAttachmentReport>
    <JbAmlMandate>
    <ListOfJbAmlAttachment>
    <JbAmlAttachment>
                   <AccntFileName>DocumentPage_713328</AccntFileName>
                   <GAMDocumentType>*contract</GAMDocumentType>
                   <MandateId>1-4C79B</MandateId>
                   <Status>Active</Status>
    </JbAmlAttachment>
    I tried <?for-each:JbAmlMandate[count(./JbAmlAttachment[GAMDocumentType='contract']) > 1 and count(./Attachment[type='appendix']) > 1]?>
    But this returns nothing.
    Many thanks for your help
    Saggittarius

  • How to find out whether the system user is a vendor or a purchaser

    Hi,
    I am working in SRM 5.0. I have a requirement that some fields of Bid invitation can be visible by purchaser but not to bidder.
    How to find out whether the system user (user id though which system logged in) is a vendor or a purchaser. Kindly help me to resolve this issue.
    Sushmita Singh

    check his role.
    is surrogate bidding available for that bidder.
    via surrogate bid , purchaser can submit bid on behalf of the bidder.
    masa is correct
    pposa_bbp - search via user . so he might be  a purchaser.
    maintain business partner -supply your bidder bp number -edit
    go to bidder data .Under bidder data you must flag "PERMIT PROXY BIDDING"
    regards
    Muthu
    br
    muthu

  • How to check what is the full name of the installer is used?

    Hi,
    how to check what is the full name of the installer is used?
    Thanks,

    Very nice, but assuming you did deliberately fire the installer, don't you remember the command? Apart from that your question has (as usual) no version and no platform and no context. If you are still in the installer and using any variant of Unix you can very easily run 'ps' to see the exact command.
    You would have needed to provide platform and version information when submitting the SR. Can you explain why you have this forum guess at it?
    Sybrand Bakker
    Senior Oracle DBA

  • How to check what are the enhancement done for MIRO transaction

    Hi Experts,
    Please help me out, how to check what are the enhancement done for MIRO transaction.
    Thanks in advance.
    Thanks,
    Basanagouda

    Hi
    Use the BADI
    Please refer these documents: [Enhancements required in MIGO|Enhancements required in MIGO; and
    [Enhancement in MIGO for Goods Movement|Enhancement in MIGO for Goods Movement;
    Hope this helps!!
    Regards
    Vijay

  • How do I know whether the USB port in my macbook air is 2.0 or 3.0?

    How do I know whether the USB port in my macbook air is 2.0 or 3.0? I really want to use a usb flash drive that has faster read/write speed but I don't kow if it would be supported by my macbook air - I purchased the macbook air from the apple store on autumn 2011, 1.7Ghz Intel Core i5

    Eddy ~ The free Mactracker app shows USB info and much more:

  • How do we know whether the materials maintaine any sales org?

    Hi All, as an ABAPer, how do we know whether the materials maintaine any sales org?

    Hi,
    1.Go to the Table MVKE (Sales Data for Material)
    2.This relates the material with sales organization & distribution.
    3.Give the sales Organization and u will find all the material that correspondance to the sales org.
    Regards,
    Jagadish

  • We want to the whether the below functionality exists in SRM

    We want to the whether the below functionality exists in SRM.
    In the shopping cart when we click on the details against any item and get in to the follow-on documents. We have two options. 1) Display as Graphic 2) Display as table.
    When we select graphic display, we get hyperlink for the order number. When we click on this link we get details pertaining to only to that specific item only that too in a tabular form (in the same screen). Is this the standard SRM functionality? Or   is there a way that when we click on this link do we get the PDF copy of the order showing all the items along with terms and conditions whcih can be saved on to our desk top.

    Hi,
    This is the standard behavior. If you click on the item link in SRM 5.0, it will open there in tabular form with less details. In SRM 7.0, if you click on the Related Documents tab and then PO number, system will open the PO in new window where you can Export it to Excel or Print it using Print Preview and then save it in PDF. I don't think in SRM 5.0 if there is functionality to directly save PO in PDF through SC.
    Thanks,
    Anshuk Saxena

  • How does Check Names in the Target Audience picker work?

    Can anyone tell me how the Check Names button in the Target Audience picker works? We are having problem with a specific audience in one of our web applications. I don’t think the problem is the actual audience though:
    The Target Audience is a global target audience named ”XYZ”. It is compiled and contains member. When an article is tagged with this audience all works fine as long as we use the Audience Picker dialog. But, when using the Check Name button the audience
    is not saved. This happens when I edit properties on the article (not customized UI) and also when I edit the article in a customized UI. No ULS messages.
    I have read that the Target Audience Picker searches for matches in AD Distribution groups, SharePoint groups and Global Audiences. When we write “XYZ” in the audience field and presses the Check Names button one suggestion is displayed, named “XYZ”. When
    I write “XYZ N” and press the Check Names button several suggestions are displayed: 4 “XYZ” and a couple of other suggestions “XYZ xx…” etc. We have no SharePoint groups starting with “XYZ”, we have no AD Distribution Groups starting with “XYZ”, and we have
    only one Global Audience starting with “XYZ”. Where are all the “XYZ” suggestions coming from? Can anyone help, please?
    We are using SharePoint 2010.
    Best regards Heidi Lillebuen

    Hi Heidi,
    The target audience picker is similar to people picker, it searches the content of User Profile Service to find the matching users or groups.
    I did a test based on your description. In my testing, everything worked well.
    Please check whether there are some users whose display names are like ‘XYZ ***’.
    Please create a new global audience using a different name, compare the result.
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • How can I know whether the Servlet is sending a response!!!

    Hello,
    My question is this :
    How do I know whether that server outputstream is sending me a response or not?
    I have opened the Client InputStream to recieve a response from a servlet,but how
    can i be sure that i will receive a response from the servlet?
    I cud be waiting for an 15 expecting a response but havent received one..
    Is there any way to check whether the servlet is sending me a response?
    The reason I am asking is this.
    I have written a Java Client that connects to a servlet.It has to wait for a
    response from the servlet.It will wait for 5 seconds and if this doesnt recieve
    a response,it will return back else it will display the response.
    I have set a timer on my client for 5 seconds and a timer on the servlet for 15 seconds.
    Essentially,when the client connects,the servlet response is held for 15 seconds
    and the client tries for 5 seconds.
    But the client is unable to exit without a response.The response comes back in 15 seconds.
    The client shud have the message 'Connection Timed Out' after 5 seconds.
    This means there is an error somewhere.
    As the response takes 15 seconds,the client shudnt recieve one.
    So,is there a way I can block the servlet response?
    I am using threads and Inner classes for the timer purposes..
    Please can any one help me?
    ajay
    Client code:
    public class HttpHandler {
    private static String sURL="localhost";
    static String sMessage="Hello Server..Client sending Data";
    static DataInputStream dis = null;
    static HttpURLConnection hpCon=null;
    public static void main(String[] args)
    sendData(sMessage);
    public void TimerTest() {
    NewThread nt = new NewThread();
    public static void sendData(String sMess)
    String response=null;
    try{
    // Invoke Timer
    new HttpHandler.TimerTest();
    URL url=null;
    String uri = "http://" + sURL + ":8080/servlet/threads.Recieve_Http_Data1";
    url = new URL(uri);
    hpCon=null;
    hpCon = (HttpURLConnection)url.openConnection();
    hpCon.setDoOutput(true);
    hpCon.setDoInput(true);
    // Transfer Data over http
    DataOutputStream dos = new DataOutputStream(hpCon.getOutputStream());
    dos.writeUTF(sMess);
    }catch(IOException e)
    {System.out.println("Error in Client " + e); e.printStackTrace();}
    } // End of Method sendData
    // Inner Class
    class NewThread extends Thread
    String response;
    int i=0;
    NewThread()
    start();
    public void run()
    try {
    while(i < 5)
    System.out.println(i);
    Thread.sleep(1000);
    try {
    dis = new DataInputStream(hpCon.getInputStream());
    response = dis.readUTF();
    // If response recieved, break off else Loop back.
    if(dis !=null)
    System.out.println("SERVER RESPONSE : " + response);
    dis.close();
    break;
    }catch(IOException e){System.out.println("Here : " + e);}
    i++;
    } // End of While.
    }catch(InterruptedException e){}
    The Servlet
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import java.math.*;
    public class Recieve_Http_Data1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    doPost(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    System.out.println("Server Ready to receive Message from application :");
    System.out.println();
    BufferedReader br=null;
    // Data Read by the Servlet
    String sMess="";
    DataInputStream dis = new DataInputStream(request.getInputStream());
    sMess = dis.readUTF();
    System.out.println("Received from Client: " + sMess);
    // Send response back after 15 seconds Only.
    try {
    for(int i=0;i<15;i++)
    System.out.println(i);
    DataOutputStream dos = new DataOutputStream(response.getOutputStream());
    String sResponse = "Hello Client...This is server sending response";
    dos.writeUTF(sResponse);
    Thread.sleep(1000);
    }catch(InterruptedException e){}

    I don't know whether you solve your problem or not! Anyway, I have the same problem. The program hangs when getInputStream is called.
    DataInputStream dis = new DataInputStream(request.getInputStream());
    If you have the answer, please let me know. Thanks!!

  • How to verify that the variable "does not contain" a value?

    Hi
    I am using CP 7.0.1.237.
    We want to use Text Area widget for a custom quiz and verify an answer. While we figured out how to verify the existence of certain keywords, we are not able to figure out how to verify that the content should NOT contain certain keywords. For example, we want to ensure that the text entered in this widget should not contain "Transformation" and "Non-compliant".
    Is this possible at all?
    Thanks
    Sreekanth

    Here's what the solution might look like in JavaScript.  This would be for SWF output and aimed at Cp 7.  For Cp 8, this would still work for SWF output, but you'd probably want to take advantage of the new unified JS API that gets and sets Cp variables for both SWF and HTML5 output.  You can read more about that here:  Common JS interface
    //Get the text area value from Captivate (SWF output Only)
    var cpTextAreaValue = document.Captivate.cpEIGetValue('m_VarHandle.v_TextArea);
    //convert the value to lower case to properly compare
    cpTextAreaValue = cpTextAreaValue.toLowerCase();
    //Check if text area value contains the words "transformation" or "non-compliant"
    if(cpTextAreaValue.indexof('organizational') > -1 && cpTextAreaValue.indexof('behavioral ') > -1 && cpTextAreaValue.indexof('managerial') > -1 && cpTextAreaValue.indexof('transformation') < 0 && cpTextAreaValue.indexof('non-compliant') < 0){
      //the text area has the correct answer so increment varScore
      //get the current score from Captivate
      var score = document.Captivate.cpEIGetValue('m_VarHandle.varScore');
      //increment score by 1
      score++;
      //set score in Captivate
      document.Captivate.cpEISetValue('m_VarHandle.varScore', score);
    } else {
      //the text area does not have the correct answer so show message to user inside of Captivate
      document.Captivate.cpEISetValue('m_VarHandle.v_message', 'Answer is not correct');
    This JS has not been tested.  Note that the "does not contain" operator is done using the "indexof" operator in JS. 
    Jim Leichliter

  • How to check data in the cube

    for integration purpose, how can you go and check data in the cube and validate it against the query data ? i know we can go to corresponded infocube and right click "display data" but what's on the query is not available when i execute "display data"
    Thanks

    You can always use the similar set of Restrictions as used in RKF and get the value very close to what RKF is displaying.
    But getting the same values in CKF is a bit tough..I can suggest may be you can take few/1-2 examples and do the calculations manually and compare the query result and Infocube data.

  • How to Check and Uncheck the JCheckBox in the JTable?

    Dear Friends,
    I created a Table using JTable and it consists first column is JCheckBox (JCheckBox is included in JTable by using TableCellRenderer) and two more columns with Id and Name. How to enable the check and uncheck the JCheckBox in the Table and how to get the row id or values of the rows where the CheckBox is checked?
    Thanks in Advance.
    Sathish kumar D

    Read the API for JTable and follow the link to the tutorial on how to use tables, where you will find adequate guidance and examples.
    db
    edit And isn't this post on the same topic as your previous one? If so, please add a note that responses should be posted here and not on the other thread.
    [http://forums.sun.com/thread.jspa?threadID=5353422]
    Edited by: Darryl.Burke

  • How to find out whether the transaction logs are being truncated or not

    Hi,
    We are using Veritas Backup tool for Backups and restores on our MS SQL 2000.
    One of our Veritas Tech has disabled the Truncation of Transaction Log Backup using the Job setup in Veritas. We want to confirm whether the Truncation is happening or not. I don't see any difference in the Transaction Log file size.
    How to find out whether truncation is active or not?
    Thanks
    Vijay

    Hello Vijay,
    On MSSQL truncation of transaction log does not shrink the size of the transaction log. It simply removes the content within the transaction log and writes it to the backup.
    Meaning the free percentage within the transaction log will increase.
    If you want to Resize the transaction log size, you need to do something else.
    The shrinking procedure is given here:
    http://support.microsoft.com/kb/907511
    Regards,
    Siddhesh

  • Availability checking - How Avail check can see the Reservat linked to a SO

    Hii there,
    We have the following issue. When we create a Sales Order, we want to reserve the stock so that when another Sales Order for the same material is created, the standard Material Availability check will know the 1st SO has x amount of stock already reserved.
    We are running the standard BAPI - BAPI_MATERIAL_AVAILABILITY and using the Availabilty checking rule assinged in the Material Master and the Scope of check from Transaction OPJJ, but we are not able to force the Avail Check to acknowledge the Reservation created for the Sales Order.
    The standard Reservation check on the Scope of check is only for manually created Material Reservations but we are creating ours linked to a Sales Order (movement ype 231) and although you can see the Reservation in the RESB table, the Avail check does not take this reservation into consideration.
    Any ideas would be greatly appreciated.
    Thanks.
    Owen

    When we create a Sales Order, we want to reserve the stock
    1)  Go to material master and check what availability check is maintained.  Most probably, it should have been 02
    2)  Next go to OVZ9, select the combination 02 => A and execute.  There tick the box for "Include sales reqmts". and save
    3)  Now create a sale order and update the forum how it works
    thanks
    G. Lakshmipathi

Maybe you are looking for