Checking a value against a BC set

I have a BC set with different ranges of values, and I need to check if one particular value is included on the set.  Are there any function to check that?
I was searching on forum posts and I've found some answers referring to some functions, but I don't understand the interface of any of these functions.  So if you'll give a function list to do it please I'll appreciate a brief explanation of what the function need to work.
Thanks!

Hi,
Check FM G_SET_FETCH. You have to pass set name and it will return a table containing ranges and values that are included in your set. Most likely you have to pass set name in the following format: 0000XXXX...XXX where XXXX...XXX stands for set name.

Similar Messages

  • How can I graph muliple sets of y-values against a single set of x-values?

    Hi.  I am trying to write a VI that will take columns of data stored in a 2D array and plot it with the first column being the x-coordinates and all subsequent columns (different parameters) of data being y-coordinates.  The number of these parameters is determined by the user, but it could be as high as 128.  I think that I need to write a for loop that will pair each column of y-coordinates with  the column of x-coordinates in a cluster, and then create an array of clusters to be plotted with an xy graph, but I am not sure how to do this. 
    Also, it would be nice if each parameters could be its own color so they can be distinguished on the graph (each parameter is over 40,000 data points)
    Thank you in advance!
    -Pushrod

    What have you tried so far? A for-loop is a good way to do this since you have so many columns, and you can automatically have it create the array of clusters necessary for the XY graph. Basically you just need to index out the first column to get your X values, and then drive a for-loop for the number of Y values. You can determine this by simply using Array Size on the 2D array. It will return to you the number of rows and the number of columns. The coloring of each trace is automatic. One solution:
    Attachments:
    Example_VI.png ‏21 KB

  • FRM-40501 Error When Attempting To Change Check Box Value

    I am getting a FRM-40501 error when attempting to update/change a check box value. There are a few factors in my form setup that could be the problem, I will list them below:
    My initial problem was that my INSERT statement would not trigger to fire (based on an IF statement) when my check box value was not initially set to the value of 'Y', even though the initial value was set to 'Y' in the property palette (value when checked was set to 'Y' and value when unchecked was set to 'N'). So, to remedy this I placed a specific literal select of 'Y' and aliased it back to the name of my check box name in the data block query, like: SELECT 'Y' CB_SELECT_SCHOOL FROM user_schools. Then I changed the check box to a database item (value to Yes when it was No before my "SQL select cheat" in the data block query). This made the initial value 'Y' and satisfied my IF statement before my INSERT statement in my trigger. However, now I can not update the check box item.
    Does anyone know a better way to satisfy the initial value of my check box to 'Y', even though in the initial value parameter for my checkbox is set to 'Y' and forms is not really setting the initial value (when the check box is not set to a database item)?
    Thanks in advance.
    Kyle

    I have fixed my issue.
    I have reverted the check box to not be a database item, removed the "SQL cheat" of selecting 'Y' aliasing my checkbox name in the datablock SQL, and changed the initial value of 'N' in the check box property palette. This will force a change by the user making the check box value of 'Y', satifying my insert when-button-pressed trigger to fire and update the selected row.

  • Need Help: I need a check box to auto fill a set value in separate text field.

    Hi, this is my first time with inserting scripts into a PDF Form.
    We have a form that requires the user to check a box regarding medical conditions they have (i.e. Asthma, Diabetes, Hypertension).  Later in the form, they have to type out the same condition into a text box. (I know stupid to double document, but it is required).  Is there a script that will auto fill the text box when they check the box?  For example, if they check asthma, the text box on a later page in the PDF will say "Asthma, controlled."  Is this possible?
    In addition, if they don't click Asthma, and do click Diabetes, could it add Diabetes to the first text box, but if they check both, it would add Asthma to box 1 and Diabetes to box 2?
    Any help would be GREATLY appreciated.
    I'm using Acrobat 9
    Thanks!

    Hi, I'm staring at the code trying to make it work for my needs, which are similar to Austin's.
    I have a 16-page form with 2,988 checkboxes in the entire document (a little over 200 in each page besides the first and last page). The last page contains a textbox labled Summary, and it should provide a summary of all the items checked in the document. Theoretically only one page will be populated at a time, so there will be no more than 200 checkboxes checked in the entire document.
    Is it possible to use the same code? And do I just put the code under the text in the script that reads:
    form1.SummaryPage.SummaryText::calculate - (JavaScript, client)
    The JS I am trying to get to work is the following from a post above.
    // Custom Calculate script
    (function () {
        var i, v, s = "";
        // Loop through the 2988 check boxes
        for (i = 1; i < 2989; i += 1) {
            // Get the value of the current checkbox
            v = getField("checkbox " + i).valueAsString;
            // Concatenate check box value to string if not deselected
            if (v !== "Off") s+= v + "\r";
        // Set this field value
        event.value = s;

  • Verify a value against value set

    Hi,
    I am trying to import price list lines along with Pricing attribute values.
    I have to validate the uploaded values against the pricing attribute value set, before I import them into base tables.
    Value set defined is of type table validation.
    I wanted to know if there are any public APIs that can be used to validate the value against the Value set values within my PL/SQL procedure
    Also please point me to documentation that lists various public PL/SQL APIs
    Regards,
    Mrutyunjay

    Hi,
    You can query the fnd_flex_values or fnd_flex_value_segments_vl to find the name of the value set defined.
    Another point is that the Value Set is defined of validation type Table so the values are dependent on the base tables.
    There are no such API's to cater the need for Verfying a Value against a Value Set.
    If u want to search for public API's go to the metalink.
    Regards

  • Validate a value against table validation value set within PL/SQL

    Hi,
    I am trying to import price list lines along with Pricing attribute values.
    I have to validate the uploaded values against the pricing attribute value set, before I import them into base tables.
    Value set defined is of type table validation.
    I wanted to know if there are any public APIs that can be used to validate the value against the Value set values within my PL/SQL procedure
    Also please point me to documentation that lists various public PL/SQL APIs
    Regards,
    Mrutyunjay

    You can find functions and procedure for Value sets in packages FND_FLEX_VAL_API or FND_FLEX_VAL_UTIL.
    Example : get_table_vset_select gives you the select statement of your value set. Executing this statement will allow you to validate your values.

  • Passing check box values to WHERE clause

    Hi,
    I have created a Data block - 'CONTACTS' (Database data block)
    and has database item - 'Code', 'Descr'
    The number of records displayed is set to 5.
    Value When checked - 'Y'
    Value When Unchecked - 'N'
    Check box mapping of other values - 'unchecked'
    I am writing the code inside 'WHEN BUTTON PRESSED'. My main objective is to return the count of records based
    based on several conditions and one among them is CODE which is can be single or multiple based on the check box checked.
    The requirement is when i check one or multiple checkboxes, i should pass the 'Code' item values to the WHERE clause.
    Right now whenver i am trying to do so, only the current record value is copied to the WHERE clause.
    I have tried using basic loop but things havnt worked.
    Logic tried with basic LOOP
    BEGIN
    GO_BLOCK('CONTACT');
    IF :contact.cb = 'Y' THEN
    LOOP
    IF p_where is null then
    p_where := :contact.code;
    else
    p_where := p_where ||','||:contact.code;
    end if;
    exit when :system.last_record = 'TRUE';
    next_record;
    END LOOP;
    end if;
    MESSAGE ( 'p_where :'||p_where);
    MESSAGE (' ');
    END;
    And Even if i write the LOOP before the first IF, it return me the current record value and move to the last record.
    please guide me where am i wrong.
    Regards.
    Anoop.

    Try something like this:
    FIRST_RECORD;
    LOOP
      IF :contact.cb = 'Y' THEN
        IF p_where is null then
           p_where := :contact.code;
         else
           p_where := p_where ||','||:contact.code;
         end if;
       END IF;
      exit when :system.last_record = 'TRUE';
      next_record;
    END LOOP;
    -- END LOOP;
    MESSAGE ( 'p_where :'||p_where);
    MESSAGE (' ');
    END;

  • How to force check right value of a JTable cell?

    Hi,
    I have a JTable with a column that must have a value no empty and between 0 and 100. I made a sample with only one column for simplicity.
    The code works fine when the user types some value. However, when the user press ENTER to go to next column, without editing the cell, no checks run.
    I have also other column that the user may type a part of a name and the system must find the full name of a person. In this column, if user uses ENTER without editing the cell, the same problem ocurrs.
    The simplistic code is here, runnable:
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.KeyEvent;
    import java.text.NumberFormat;
    import java.text.ParseException;
    import javax.swing.text.DefaultFormatterFactory;
    import javax.swing.text.NumberFormatter;
    public class TableCheckCell extends JFrame {
      /** Creates a new instance of TableCheckCell */
      public TableCheckCell() {
        Object[] columnNames = {"Percents"};
        Object[][] data =
          {new Integer(-1)}, // <--- DEFAULT VALUE FORCED TO BE OUT OF RANGE...
          {new Integer(-1)},
          {new Integer(-1)},
          {new Integer(-1)}
        DefaultTableModel model = new DefaultTableModel(data, columnNames);
        JTable table = new JTable(model);
        table.setPreferredScrollableViewportSize(table.getPreferredSize());
        JScrollPane scrollPane = new JScrollPane( table );
        getContentPane().add( scrollPane );
        TableColumn col = table.getColumnModel().getColumn(0);
        col.setCellEditor(new CellIntegerEditor(CellIntegerEditor.CHECKMINMAX,0,100));
      public static void main(String[] args) {
        TableCheckCell frame = new TableCheckCell();
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.pack();
        frame.setLocationRelativeTo( null );
        frame.setVisible(true);
    * Implements a cell editor that uses a formatted text field
    * to edit Integer values.
    class CellIntegerEditor extends DefaultCellEditor {
      public static final int NOCHECK = 0;
      public static final int CHECKMINMAX = 1;
      public static final int CHECKMIN = 2;
      public static final int CHECKMAX = 3;
      JFormattedTextField ftf;
      NumberFormat integerFormat;
      private int checkinterv;
      private Integer minimum, maximum;
      private boolean DEBUG = false;
      public CellIntegerEditor(int checkinterv, int min, int max) {
        super(new JFormattedTextField());
        init(checkinterv, min, max);
      void init(int checkinterv, int min, int max) {
        ftf = (JFormattedTextField)getComponent();
        this.checkinterv = checkinterv;
        minimum = new Integer(min);
        maximum = new Integer(max);
        //Set up the editor for the integer cells.
        integerFormat = NumberFormat.getIntegerInstance();
        NumberFormatter intFormatter = new NumberFormatter(integerFormat);
        intFormatter.setFormat(integerFormat);
        if (checkinterv == CHECKMIN || checkinterv == CHECKMINMAX)
          intFormatter.setMinimum(minimum);
        if (checkinterv == CHECKMAX || checkinterv == CHECKMINMAX)
          intFormatter.setMaximum(maximum);
        ftf.setFormatterFactory(new DefaultFormatterFactory(intFormatter));
        ftf.setValue(minimum);
        ftf.setHorizontalAlignment(JTextField.TRAILING);
        ftf.setFocusLostBehavior(JFormattedTextField.PERSIST);
        //React when the user presses Enter while the editor is
        //active.  (Tab is handled as specified by
        //JFormattedTextField's focusLostBehavior property.)
        ftf.getInputMap().put(KeyStroke.getKeyStroke(
          KeyEvent.VK_ENTER, 0),
          "check");
        ftf.getActionMap().put("check", new AbstractAction() {
          public void actionPerformed(ActionEvent e) {
            if (!ftf.isEditValid()) { //The text is invalid.
              if (userSaysRevert()) { //reverted
                ftf.postActionEvent(); //inform the editor
            } else try {              //The text is valid,
              ftf.commitEdit();     //so use it.
              ftf.postActionEvent(); //stop editing
            } catch (java.text.ParseException exc) { }
      //Override to invoke setValue on the formatted text field.
      public Component getTableCellEditorComponent(JTable table,
        Object value, boolean isSelected,
        int row, int column) {
        JFormattedTextField ftf =
          (JFormattedTextField)super.getTableCellEditorComponent(
          table, value, isSelected, row, column);
        ftf.setValue(value);
        return ftf;
      //Override to ensure that the value remains an Integer.
      public Object getCellEditorValue() {
        JFormattedTextField ftf = (JFormattedTextField)getComponent();
        Object o = ftf.getValue();
        if (o instanceof Integer) {
          return o;
        } else if (o instanceof Number) {
          return new Integer(((Number)o).intValue());
        } else {
          if (DEBUG) {
            System.out.println("getCellEditorValue: o isn't a Number");
          try {
            return integerFormat.parseObject(o.toString());
          } catch (ParseException exc) {
            System.err.println("getCellEditorValue: can't parse o: " + o);
            return null;
      //Override to check whether the edit is valid,
      //setting the value if it is and complaining if
      //it isn't.  If it's OK for the editor to go
      //away, we need to invoke the superclass's version
      //of this method so that everything gets cleaned up.
      public boolean stopCellEditing() {
        JFormattedTextField ftf = (JFormattedTextField)getComponent();
        if (ftf.isEditValid()) {
          try {
            ftf.commitEdit();
          } catch (java.text.ParseException exc) { }
        } else { //text is invalid
          if (!userSaysRevert()) { //user wants to edit
            return false; //don't let the editor go away
        return super.stopCellEditing();
       * Lets the user know that the text they entered is
       * bad. Returns true if the user elects to revert to
       * the last good value.  Otherwise, returns false,
       * indicating that the user wants to continue editing.
      protected boolean userSaysRevert() {
        Toolkit.getDefaultToolkit().beep();
        ftf.selectAll();
        Object[] options = {"Corrigir"};
        String msg = "";
        if (checkinterv == CHECKMINMAX)
          msg = "Value must be between " + minimum + " and " + maximum + ".";
        else if (checkinterv == CHECKMIN)
          msg = "Value must be >= " + minimum + ".";
        else if (checkinterv == CHECKMAX)
          msg = "Value must be <= " + maximum + ".";
        JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(ftf),msg);
        ftf.setValue(ftf.getValue());
        return true;
    }Then, I'd like to know if there is any way to check the user typed ENTER to go out of the cell, check the value of the cell and, if it is wrong, to come back to the cell, forcing the user to type a right value.

    Editing to force the entry of data in a cell is typically done when you press a button to process the data. It doesn't make sense to "edit" the cell when the user presses enter to go to the next cell. What if the user never places focus on a particular cell. Then the cell will never be edited.
    To force a user to enter a valid value once they have started editing you can do something like this:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=575309
    But you can't force a user to visit every cell in the table so you need to handle that as described above.

  • How to check the value from user input in database or not?

    Hello;
    I want to check the value of user input from JtextFiled in my database or not.
    If it is in database, then i will pop up a window to tell us, otherwise, it will tell us it is not in database.
    My problem is my code do not work properly, sometimes, it tell me correct information, sometime it tell wrong information.
    Could anyone help,please.Thanks
    The following code is for check whether the value in database or not, and pop up a window to tell us.
    while( rs.next()) {
                    System.out.println("i am testing");
                    bInt=new Integer(rs.getInt("id"));
                    if(aInt.equals(bInt)){ // If i find the value in data base, set flag to 1.
                  flag=1;  //I set a flag to check whether the id in database or not
                        break;
             System.out.println("falg" + flag);
                if(flag==1){ //?????????????????????
              String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
              String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
              String remove3 = "DELETE FROM Customer WHERE id=" +a;
              s.executeUpdate(remove1);
              s.executeUpdate(remove2);
              s.executeUpdate(remove3);
                    JOptionPane.showMessageDialog(null,"you have success delete the value");
              s.close();
             else//???????????????????????????????
                  JOptionPane.showMessageDialog(null,"I could not found the value"); -------------------------------------------------------------------
    My whole program
    import java.sql.*;
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JOptionPane;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class DeleteC extends JFrame
        public static int index=0;   
        public static ResultSet rs;
        public static Statement s;
        public static Connection c;
        public static  Object cols[][];
        private static JTable table;
        private static JScrollPane scroller;
        private static int flag=0;
        public DeleteC()
            //information of our connection
            //the url of the database: protocol:subprotocol:subname:computer_name:port:database_name
            String strUrl      = "jdbc:oracle:thin:@augur.scms.waikato.ac.nz:1521:teaching";
            //user name and password
            String strUser      = "xbl1";
            String strPass      = "19681978";
            //try to load the driver
            try {
                Class.forName("oracle.jdbc.driver.OracleDriver");
            catch (ClassNotFoundException e) {
                System.out.println( "Cannot load the Oracle driver. Include it in your classpath.");
                System.exit( -1);
            //a null reference to a Connection object
            c = null;
            try {
                //open a connection to the database
                c = DriverManager.getConnection( strUrl, strUser, strPass);
            catch (SQLException e) {
                System.out.println("Cannot connect to the database. Here is the error:");
                e.printStackTrace();
                System.exit( -1);
           //create a statement object to execute sql statements
        public void getData(String a){
            try {
             //create a statement object to execute sql statements
             s = c.createStatement();
                int index=0;
                Integer aInt= Integer.valueOf(a);
                Integer bInt;
                  //our example query
                String strQuery = "select id from customer";
                //execute the query
                ResultSet rs = s.executeQuery( strQuery);
                //while there are rows in the result set
                while( rs.next()) {
                    System.out.println("i am testing");
                    bInt=new Integer(rs.getInt("id"));
                    if(aInt.equals(bInt)){
                  //JOptionPane.showMessageDialog(null,"I found the value"); 
                  flag=1;
                        break;
             System.out.println("falg" + flag);
                if(flag==1){
              String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
              String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
              String remove3 = "DELETE FROM Customer WHERE id=" +a;
              s.executeUpdate(remove1);
              s.executeUpdate(remove2);
              s.executeUpdate(remove3);
                    JOptionPane.showMessageDialog(null,"you have success delete the value");
              s.close();
             else
                  JOptionPane.showMessageDialog(null,"I could not found the value");
            catch (SQLException e) {
                 JOptionPane.showMessageDialog(null,"You may enter wrong id");
    My main program for user input from JTextField.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.util.*;
    public class EnterID extends JFrame{
        public JTextField tF1;
        public EnterID enID;
        public String tF1Value;
        private JLabel label1, label2, label3;
        private static JButton button;
        private static ButtonHandler handler;
        private static String aString;
        private static Integer aInteger;
        private static Integer checkV=0;
        public static void main(String args[]){
           EnterID eId= new EnterID();
       public EnterID(){
          handler=new ButtonHandler();
          Container c= getContentPane();
          c.setLayout(new GridLayout(3,1));
          button= new JButton("ok");
          button.addActionListener(handler);
          label1 = new JLabel(" CustomerID, Please");
          label2 = new JLabel("Label2");
          label3 = new JLabel();
          label3.setLayout(new GridLayout(1,1));
          label3.add(button);
          label2.setLayout(new GridLayout(1,1));
          aString = "Enter Id Here";
          tF1 = new JTextField(aString);
          label2.add(tF1);
          c.add(label1);
          c.add(label2);         
          c.add(label3);            
          setSize(150,100);
          setVisible(true);     
       private class ButtonHandler implements ActionListener{
         public void actionPerformed(ActionEvent event){
             tF1Value=tF1.getText();
            //   CheckData cData = new CheckData();
             //  aInteger = Integer.valueOf(tF1Value);      
             if(tF1Value.equals(aString)){
              JOptionPane.showMessageDialog(null,"You didn't type value into box");
              setVisible(false); 
            else {
                DeleteC dC= new DeleteC();
                dC.getData(tF1Value);
                setVisible(false); 
    }

    You may have working code now, but the code you posted is horrible and I'm going to tell you a much much much better approach for the JDBC part. (You should probably isolate your database code from your user interface code as well, but I'm skipping over that structural problem...)
    Do this instead:
        public void getData(String a){
            PreparedStatement p;
            String strQuery = "select count(*) the_count from customer where id = ?";
            try {   
             //create a prepared statement object to execute sql statements, it's better, faster, safer
             p = c.prepareStatement(strQuery);
                // bind the parameter value to the "?"
                p.setInt(1, Integer.parseInt(a) );
                //execute the query
                ResultSet rs = p.executeQuery( );
                // if the query doesn't throw an exception, it will have exactly one row
                rs.next();
                System.out.println("i am testing");
                if (rs.getInt("the_count") > 0 ) {
                // it's there, do what you need to...
             else
                  JOptionPane.showMessageDialog(null,"I could not find the value");
            catch (SQLException e) {
                 // JOptionPane.showMessageDialog(null,"You may enter wrong id");
                 // if you get an exception, something is really wrong, and it's NOT user error
            // always, always, ALWAYS close JDBC resources in a finally block
            finally
                p.close();
        }First, this is simpler and easier to read.
    Second, this retrieves just the needed information, whether or not the id is in the database. Your way will get much much slower as more data goes into the database. My way, if there is an index on the id column, more data doesn;t slow it down very much.
    I've also left some important points in comments.
    No guarantees that there isn't a dumb typo in there; I didn't actually compile it, much less test it. It's at least close though...

  • Stored procedure for checking Invoice value if more than R 15 000

    Hi All
    I have a problem with my stored procedure below, i want to check the doctotal if it above R 15 000 , if it is then it checks if the supplier has a tax clearance cert.
    IF @transaction_type = 'A' AND @object_type = '22'
    BEGIN
    If exists (SELECT T0.cardcode, t0.docentry  FROM OPOR T0 where T0.DOCTOTAL >'15,000.00' and T0.U_TAXCLEAR IS NULL AND T0.docentry=@list_of_cols_val_tab_del)
         begin
              SET @error = 10
              SET @error_message = N'Amount is above R 15 000 please select Supplier with Valid Tax Certificate'
    END
    END
    I tried this executing the sp and there was this error
    Msg 208, Level 16, State 6, Procedure SBO_SP_TransactionNotification, Line 41
    Invalid object name 'dbo.SBO_SP_TransactionNotification'.
    In this case line 41 is 2nd END.
    Thanks
    Bongani Dlamini

    Hi all
    Thanks for the replies , forgot to mention a few requirements.
    In addition to the to checking the value above  R 15 000 I want to check if a tax certificate field is populated , if it is then checks if the expiry date is not null.
    please check the query I tried below.
    IF @transaction_type = 'A' AND @object_type = '22'
    BEGIN
        IF EXISTS (SELECT T0.CardCode FROM dbo.OPOR T0
        WHERE T0.DOCTOTAL > 15000 AND T0.U_TAXCLEAR IS NULL AND T0.DocEntry=@list_of_cols_val_tab_del)
        BEGIN
    SET @error = 10
    SET @error_message = 'Amount is above R 15 000, a valid Tax Certificate is required'
    END
    END
    IF @transaction_type = 'A' AND @object_type = '22'
    BEGIN
        IF EXISTS (SELECT T0.CardCode FROM dbo.OPOR T0 WHERE T0.U_EXPIRYDATE IS NULL AND T0.DocEntry=@list_of_cols_val_tab_del)
        BEGIN
    SET @error = 10
    SET @error_message = 'Tax Certificate expiry date is required'
    END
    END
    Thanks
    Bongani Dlamini

  • How to check the value of "The Interrupt Status Flag"?

    Hi, thank you for reading this post!
    Invoking Thread.interrupt() sets the value of the Interrupt Status Flag.
    Just wondering if there is a Java method to check the value of this flag? Or is using isInterrupted() or interrupted() the only way to check?
    http://download.oracle.com/javase/tutorial/essential/concurrency/interrupt.html
    Thank you in advance for your help!
    Eric

    Below is the full code. As soon as the Thread.sleep() is taken out in main(), the interrupt is detected in the child thread. But if the sleep() stays, then the child thread goes into an infinite loop. It's not detected the interrupt.
    //ParentInterruptChildThreadCatchedDemo.java
    //Program function: This program demonstrates the parent thread (main()) interrupting a child thread (thread1).
    //Threaded class
    class TryThread extends Thread {
         //fields
         private String threadname;
         private long aWhile;
         //Constructor
         public TryThread(String tname, long delay) {
              threadname = tname;
              aWhile = delay;
         //run() method
         public void run() {
              while(!Thread.interrupted()) {
                   //Do work
              try {
                   System.out.println(Thread.currentThread().getName() + " was just interrupted!");
                   throw new InterruptedException();
              } catch(InterruptedException e) {
                   //System.exit(1);
                   return;
    public class ParentInterruptChildThreadCatchedDemo {
         public static void main(String[] args) {
              Thread thread1 = new TryThread("thread1", 2000L);
              thread1.start();
              try {
                   System.out.println("main() goes to sleep for 10 second.");
                   Thread.sleep(10000);
                   System.out.println("Statement after main() sleep().");
              } catch(InterruptedException e) {
                    e.printStackTrace();
                 //Interrupt thread1
                  int interruptFlag = 5;
                  for(int i=0; i<11; i++) {
                       if(i == interruptFlag) {
                            System.out.println("Condition met, going to interrupt thread1 ...");
                            thread1.interrupt();
                            System.out.println("Thread1 interrupted!");
                  System.out.println("Ending main()");
    /*Output:
    main() goes to sleep for 10 second.
    Statement after main() sleep().
    Condition met, going to interrupt thread1 ...
    Thread1 interrupted!
    Ending main()
    INFINITION LOOP
    */

  • Validate input value against database

    Is it possible to check the value of an input field (regular input, not cfinput) against a database to check for duplicate values?

    Probably.

  • Cumulative credit value against the combined invoice value

    Is there any FI table where we can find cumulative credit value against combined invoice value.
    The scenario is..
    There is a combined invoive created  for multiple sales documents for the value 5000 dollers .
    1.I have created a credit memo& accounting document for 2000 dollers with ref. to the above invoice.
    2.Again I can create credit memo&accounting document for 5000 dollers with ref. to the same invoice
    also we can keep on creating credit memos with the value more than the combined invoice value.
    I would like to put the check that the system should issue the warning while try to create credit memo with the cumulative value more than the invoice value
    Kumar

    Dear Megha,
    Max.open.item % is meant for different purpose, and we can mention Maximum percentage of overdue open items/customer balance in that field.
    In order to meet up your requirement, use the option Oldest Open ITEM. This will solve your issue.
    Activate the indicator OLDESTOPENITEM indicator; and check the STATUS/BLOCK indicator.
    If you enter Days oldestItem as 1; then, the system will check if there are any open items (open accounting documents) which are due for one day; If the sysetm finds such open items, then it will block subsequent orders.
    You can make use of the transaction FD10N to find out the overdue open items.
    I have not tried with value 0 for this particular field. Just try. Hope this will solve your issue.
    Thank you
    Venkatesh SP
    Edited by: venkatesh paulraj on Mar 2, 2011 12:02 PM

  • Do not want Budget check & Commitment value for purchase Requisition

    Hi Experts,
    I hope you all are doing well.
    My client's requirement is that at the time of Creation of Purchase Requisition there should be no budget check against WBS element and also Commitment value should not be for Purchase Requisition.
    Please suggest.
    Thanks & Regards

    Hi Gokul,
    Thanks for ur quick reply.
    I have done changes in tolerence limit (activated it for PO only).
    Now i created 1 Project PR of more than value of budget (system didnt check the Budget against WBS) but when i am trying to create PO with reference to same PR, system is giving error of budget. That is OK for me.
    Now my requirement is to not take PR value as commitment in my reports, i want only PO value in Commitment column of repport.
    I have read all 3 notes suggested by you. Can u tell me whcih one should i implement to stop PR value as commitment in reports.
    Thanks & Regards

  • Error "One or more values could not be set" - Oracle Connector

    Hey guys - I should have known there was a forum here with smart people. I'm hoping someone can shed a little light on our latest issue. When we try to invite people not within our company to a meeting, (even if they are included in our contact list/address book, etc) the error "one or more values could not be set" I'm pretty sure it's a forms error, but can't seem to resolve it. It started with the 2003 outlook service patch. I've applied every connector patch available and have searched for an answer, but can't resolve this icky problem (very crabby users) I've searched this forum but didn't see this topic. If it's already been addressed, forgive me and point me to the thread. If it hasn't and anyone has an idea, I'd appreciate some help!
    Thanks
    Kim

    I have CRXI
    First off, try verifing the database
    Database,
         Verifiy Database
    Then if it is still broken.
    Double-check all of the unlikely places in your report structure.  Look at the subreport links.  Look through all your formulas (including the ones for formatting).  Keep in mind that Crystal doesn't have IntelliText, so you need to double-check (or even triple-check) that everything is spelled correctly.
    Odds are strong that, somewhere in there, you are accidentally referencing a field that doesn't exist.

Maybe you are looking for