Logical problem in triggers

hi all
i have a table like this
EMPNO NOT NULL NUMBER(4)
HIREDATE DATE
OFF_DAY NUMBER(3)
now what i want is i want to restrict the user with out entering the data in off_day column continuesly for three days
ex
10 22-09-2004 8
10 23-09-2004 8
10 24-09-2004 8
so in this case i don't want to enter in 3rd row of 24th day for inserting or updating the data.
i am trying it using triggers but i am fail please tell me how to solve this problem
Thanks & Regards
-Chandu
[email protected]

You could use:
WHEN-VALIDATE-ITEM trigger to reject changes made
PRE-TEXT-ITEM trigger to hinder the user to enter the field if date isn't in range
Regards,
Martin Malmström

Similar Messages

  • The logical problem in turnover in  for ?

    Welcome
    wrote this code, everything is true but there is a logical problem to be solved first idea of this program is a moving train to the contrary, it can stop and operated once again and that can add cars and locomotives and can delete it but there is a problem when adding that the train carriages have remained stable cart after the first turnover Thus ...
    THAT shows us the error ..
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Train extends JFrame implements ActionListener{
        private boolean check = false;
        private boolean stopped = true;
        private boolean add = false;
        private int trainPlace = 0;
        private int INDEX_START = 0;
        public int speed = 300;
        private ImageIcon CurrentImage ;
        private boolean front=true, back=false ;
        private int carrNum = 0 ;
        private JPanel screen, area , controlroom;
        private JButton[][] street;
        public JButton[] keybord;
        private String s[] = {"Start","Back","Fast","Slow","Add Carriage","Delete Carriage","Rest","Check","Desiners"};
        private ImageIcon images[][] ={{
                        new ImageIcon("images/UpRight.jpg"),
                        new ImageIcon("images/RightDown.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        {new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/DownRight.jpg"),
                        new ImageIcon("images/Horiz.jpg"),
                        new ImageIcon("images/RightDown.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/Vert.jpg"),
                        new ImageIcon("images/UpRight.jpg"),
                        new ImageIcon("images/Horiz.jpg"),
                        new ImageIcon("images/RightUp.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/DownRight.jpg"),
                        new ImageIcon("images/RightUp.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg"),
                        new ImageIcon("images/NoTrack.jpg")}};
        private ImageIcon frontImagesTrain[]={
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainLeft.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainUp.jpg"),
                        new ImageIcon("images/TrainRight.jpg"),
                        new ImageIcon("images/TrainDown.jpg"),
                        new ImageIcon("images/TrainRight.jpg"),
                        new ImageIcon("images/TrainDown.jpg")};
            private ImageIcon trackImagesTrain[]={
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/RightUp.jpg"),
                    new ImageIcon("images/Horiz.jpg"),
                    new ImageIcon("images/UpRight.jpg"),
                    new ImageIcon("images/RightUp.jpg"),
                    new ImageIcon("images/DownRight.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/Vert.jpg"),
                    new ImageIcon("images/UpRight.jpg"),
                    new ImageIcon("images/RightDown.jpg"),
                    new ImageIcon("images/DownRight.jpg"),
                    new ImageIcon("images/Horiz.jpg"),
                    new ImageIcon("images/RightDown.jpg")};
              private ImageIcon carrinImagesTrain[]={
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Left.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Up.jpg"),
                        new ImageIcon("images/Carriage1Right.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg"),
                        new ImageIcon("images/Carriage1Right.jpg"),
                        new ImageIcon("images/Carriage1Down.jpg")};
        private int[]frontPath={13, 18,17,16,21,20,15,10,5,0,1,6,7,8};
      private int[]frontPath2={8, 13,18,17,16,21,20,15,10,5,0,1,6,7};  
        private ImageIcon icon;
        private JLabel labelInfo;
        public Train () {  
           screen = new JPanel(new GridLayout(1,1));
           Font f =new Font ("Sanserif",Font.BOLD,18);
           labelInfo = new JLabel("WELCOM" ,JLabel.CENTER);
           labelInfo.setFont(f);
           screen.setBackground(Color.red);
           screen.add(labelInfo);
           getContentPane().add(BorderLayout.NORTH,screen );
            street = new JButton[5][5];
            area = new JPanel (new GridLayout(5,5));
            for(int r=0; r<5; r++) 
                for (int c=0; c<5; c++){
                    street[r][c] = new JButton("", images[r][c]);
                    area.add(street[r][c]);
            getContentPane().add(BorderLayout.CENTER,area );   
            keybord = new JButton[9];
            controlroom = new JPanel(new GridLayout(5,2));   
    //        ActionHandler handler = new ActionHandler();
            for (int i=0; i <9; i++)
                keybord[i] = new JButton(s);
    keybord[i].addActionListener(this);
    controlroom.add(keybord[i]);
              keybord[i].setEnabled(false);
              keybord[7].setEnabled(true);
    getContentPane().add(BorderLayout.SOUTH,controlroom );
    public void moveTrainFront(){
    int trainPlace1 = trainPlace;
    try{
    if (trainPlace == frontPath.length-1) trainPlace = 0;
    else trainPlace ++;
                   if (carrNum == 0 )
         int i = frontPath[trainPlace]/5;
         int j = frontPath[trainPlace] - i * 5;
         int r = frontPath[trainPlace1]/5;
         int c = frontPath[trainPlace1] - r * 5;
         street[i][j].setIcon(frontImagesTrain[trainPlace]);
         street[r][c].setIcon(trackImagesTrain[trainPlace1]);
                   else
                        int i1 = frontPath[trainPlace]/5;
                        int j1 = frontPath[trainPlace] - i1 * 5;
                        street[i1][j1].setIcon(frontImagesTrain[trainPlace]);     
                        int trainPlace2 = trainPlace;
                        for (int z = 1; z <= carrNum; z++)
    if (trainPlace2 - z < 0) trainPlace2 = 13;
                                  int i2 = frontPath[trainPlace2 - z]/5;
                                  int j2 = frontPath[trainPlace2 - z] - i2 * 5;
                                  street[i2][j2].setIcon(carrinImagesTrain[trainPlace2 - z]);
              int r1 = frontPath[trainPlace1 - carrNum]/5;
                        int c1 = frontPath[trainPlace1 - carrNum] - r1 * 5;
                        street[r1][c1].setIcon(trackImagesTrain[trainPlace1 - carrNum]);
    }catch(ArrayIndexOutOfBoundsException aiex){System.out.println("the array out of index");}
    // Move train Back
    public void moveTrainBack(){
    int trainPlace1 = trainPlace;
    try{
    if (trainPlace == 0) trainPlace = 13;
    else trainPlace--;
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    int r = frontPath[trainPlace1]/5;
    int c = frontPath[trainPlace1] - r * 5;
    street[i][j].setIcon(frontImagesTrain[trainPlace]);
    street[r][c].setIcon(trackImagesTrain[trainPlace1]);
    }catch(ArrayIndexOutOfBoundsException aiex){System.out.println("the array out of index");}
    public void setRest(){
    setStop(true);
              setSpeed(300);
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(trackImagesTrain[trainPlace]);
    trainPlace = 0;
    i = frontPath[trainPlace]/5;
    j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(frontImagesTrain[0]);
    public void setCheck (boolean c)
    int i = frontPath[trainPlace]/5;
    int j = frontPath[trainPlace] - i * 5;
    street[i][j].setIcon(frontImagesTrain[0]);
    check = c ;
    public boolean getCheck (){ return  check ;}
    public void setSpeed (int s){speed = s ;}
    public int getSpeed(){return  speed;}
    public void setStop(boolean s){stopped = s ;}
    public boolean getStop(){return  stopped ;}
    public void setBack(boolean s){back = s ;}
    public boolean getBack(){return  back;}
         public void setAdd(){carrNum++ ;}
    public boolean getAdd(){return  add;}
    // Action
         public void actionPerformed(ActionEvent e){
              if(e.getSource()==keybord[0])//Start
              if (stopped)
              keybord[0].setText("Stop");
                   setStop(false);
                   labelInfo.setText("Running");
    else      
                   {    setStop(true);
                   keybord[0].setText("Start");
                        labelInfo.setText("Stop");
              if(e.getSource()==keybord[1])//Front And Back
              if (!back)
                   setBack(true);
              keybord[1].setText("Front");
                   labelInfo.setText("Back");
              else      
                   setBack(false);
              keybord[1].setText("Back");
                   labelInfo.setText("Front");
              }     else if (e.getSource()==keybord[2])//Fast
              if (speed <= 0)
              labelInfo.setText("You've arrived the maximum speed : " + getSpeed());
              else {      setSpeed(speed  - 10);
                   labelInfo.setText("The Train speed is slow down to : " + getSpeed());
         else if(e.getSource()==keybord[3])//Slow
              {setSpeed(speed + 10);
                    labelInfo.setText("The Train speed is pulled up to : "+getSpeed());
    else if(e.getSource()==keybord[4]) //ADD carrin
                        setAdd();
                        labelInfo.setText("Add Carriage");
              //setStop(false);
    else if(e.getSource()==keybord[5]) //Delete carrin
                   labelInfo.setText("Delete Carrin");
         else if(e.getSource()==keybord[6]) //Rest
                   setRest();     
              labelInfo.setText("Rest");
         else if (e.getSource()==keybord[7]) //Check
         setCheck(true);
         keybord[7].setEnabled(false);
         keybord[0].setEnabled(true);
         keybord[1].setEnabled(true);
         keybord[2].setEnabled(true);
         keybord[3].setEnabled(true);
         keybord[4].setEnabled(true);
         keybord[5].setEnabled(true);
         keybord[6].setEnabled(true);
         keybord[8].setEnabled(true);
         labelInfo.setText("The Train is Checked");
    else if(e.getSource()==keybord[8]) //desiners
         String x = "";
                   labelInfo.setText("Desiners About");
                   JOptionPane.showMessageDialog(null,"The Progect is Under The Auspices of:"
                   + "\n??" + "\n" + "\n ??" +
                   "\n ??" + "\n??" + "\n ??" + "\n" + "\n" + "\n?? " + "\n C 2007");     }     
    This main ..
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.Thread;
    public class TestTrain{     
        public static void main(String[]args){
            Train train = new Train ();
              MoveTrain mt = new MoveTrain(train);
            train.setTitle("Train");
            train.setSize(421,550);
            train.setVisible(true);
            train.addWindowListener (
            new WindowAdapter (){
                 public void windowClosing(WindowEvent e ){
                      System.exit(0);
              mt.start();
    }This Threads
    import java.lang.Thread;
    public class MoveTrain extends Thread {
         Train train ;
        public MoveTrain (Train train){
               this.train= train;
         public void run(){
               while(!train.getCheck());
               while (train.getCheck()){
                    try {sleep (train.getSpeed()); }
                    catch (InterruptedException e ){System.out.println("unknown error");}
                     if (!train.getStop())
                        if(!train.getBack())
                                {train.moveTrainFront();
                          else  train.moveTrainBack();
    }This Link image icon ..
    http://www.geocities.com/alhairan_2003/as/777/UpRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/Vert.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainUp.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainLeft.jpg
    http://www.geocities.com/alhairan_2003/as/777/TrainDown.jpg
    http://www.geocities.com/alhairan_2003/as/777/Train.jpg
    http://www.geocities.com/alhairan_2003/as/777/RightUp.jpg
    http://www.geocities.com/alhairan_2003/as/777/RightDown.jpg
    http://www.geocities.com/alhairan_2003/as/777/NoTrack.jpg
    http://www.geocities.com/alhairan_2003/as/777/Horiz.jpg
    http://www.geocities.com/alhairan_2003/as/777/DownRight.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Up.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage3Down.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Up.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage2Down.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Right.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Left.jpg
    http://www.geocities.com/alhairan_2003/as/777/Carriage1Down.jpg
    thanks :)

            String[] car1Names = {
                "Carriage1Down", "Carriage1Left", "Carriage1Down", "Carriage1Right"
            };The first image name should be "Carriage1Up" but it is missing in your directory.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class MC6 implements Runnable, ActionListener {
        JLabel[] grid;
        BufferedImage[] trackImages;
        BufferedImage[] trainImages;
        BufferedImage[][] carImages;
        int[] imageKeys;
        int[] trackKeys;
        int[] forwardKeys;
        int[] reverseKeys;
        int keyIndex = 0;
        int carCount = 0;           // [0 - 3]
        boolean goingAhead = true;
        boolean changeDirections = false;
        Thread thread = null;
        boolean moving = false;
        final int DELAY = 1000;
        public MC6() {
            loadImages();
        public void actionPerformed(ActionEvent e) {
            String ac = e.getActionCommand();
            if(ac.equals("START"))
                changeDirections = false;
                start();
            if(ac.equals("STOP"))
                stop();
            if(ac.equals("FORWARD") || ac.equals("REVERSE"))
                changeDirections = true;
            if(ac.equals("ADD CARRIAGE"))
                carCount += (carCount+1 <= 3) ? 1 : 0;
            if(ac.equals("REMOVE CARRIAGE")) {
                int carIndex = getCarIndex(carCount);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = imageKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));           
                carCount -= (carCount-1 >=0 ) ? 1 : 0;
        public void run() {
            while(moving) {
                // Clear track in preparation for next advance.
                if(changeDirections) {
                    clearTrack();
                    // Adjust keyIndex by one increment in the direction of travel
                    // to allow it to return it to its current position after the
                    // next advance in position (further below).
                    advance();
                    goingAhead = !goingAhead;
                    changeDirections = false;
                } else {
                    // Replace last car with track image before train advances.
                    int carIndex = getCarIndex(carCount);
                    int trackIndex = trackKeys[carIndex];
                    int imageIndex = imageKeys[carIndex];
                    grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));
                // Move to next position on the track.
                advance();
                // Set locomotive.
                setLocomotive();
                // Set the cars following the locomotive.
                setCars();
                try {
                    Thread.sleep(DELAY);
                } catch(InterruptedException e) {
                    System.out.println("interrupted");
                    stop();
        private int getCarIndex(int carNumber) {
            int n = carNumber;
            int index;
            if(goingAhead) {
                index = keyIndex-n;
                if(index < 0)
                    index += trackKeys.length;
            } else {
                index = (keyIndex+n) % trackKeys.length;
            return index;
        private void advance() {
            keyIndex = goingAhead ?
                           (keyIndex+1 > trackKeys.length-1) ? 0 : keyIndex+1
                           (keyIndex-1 < 0) ? trackKeys.length-1 : keyIndex-1;
        private void clearTrack() {
            // Remove all cars from track before direction change.
            for(int j = 0; j < carCount; j++) {
                int carIndex = getCarIndex(j+1);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = imageKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(trackImages[imageIndex]));
        private void setLocomotive() {
            int trackIndex = trackKeys[keyIndex];
            int imageIndex = goingAhead ? forwardKeys[keyIndex]
                                        : reverseKeys[keyIndex];
            grid[trackIndex].setIcon(new ImageIcon(trainImages[imageIndex]));
        private void setCars() {
            for(int j = 0; j < carCount; j++) {
                int carIndex = getCarIndex(j+1);
                int trackIndex = trackKeys[carIndex];
                int imageIndex = goingAhead ? forwardKeys[carIndex]
                                            : reverseKeys[carIndex];
                grid[trackIndex].setIcon(new ImageIcon(carImages[j][imageIndex]));
        private void start() {
            if(!moving) {
                moving = true;
                thread = new Thread(this);
                thread.setPriority(Thread.NORM_PRIORITY);
                thread.start();
        public void stop() {
            moving = false;
            if(thread != null)
                thread.interrupt();
            thread = null;
        private void loadImages() {
            String[] trackNames = {
                "UpRight", "RightDown", "Vert", "DownRight", "Horiz", "RightUp", "NoTrack"
            String[] trainNames = { "TrainUp", "TrainLeft", "TrainDown", "TrainRight" };
            String[] car1Names = {
                "Carriage1Down", "Carriage1Left", "Carriage1Down", "Carriage1Right"
            String[] car2Names = {
                "Carriage2Up", "Carriage2Left", "Carriage2Down", "Carriage2Right"
            String[] car3Names = {
                "Carriage3Up", "Carriage3Left", "Carriage3Down", "Carriage3Right"
            trackImages = getImages(trackNames);
            trainImages = getImages(trainNames);
            BufferedImage[] car1Images = getImages(car1Names);
            BufferedImage[] car2Images = getImages(car2Names);
            BufferedImage[] car3Images = getImages(car3Names);
            carImages = new BufferedImage[][]{ car1Images, car2Images, car3Images };
        private BufferedImage[] getImages(String[] ids) {
            BufferedImage[] images = new BufferedImage[ids.length];
            for(int j = 0; j < ids.length; j++) {
                String path = "images/" + ids[j] + ".jpg";
                try {
                    images[j] = ImageIO.read(new File(path));
                } catch(IOException e) {
                    System.out.println("Read error for " + path +
                                       ": " + e.getMessage());
                    images[j] = null;
            return images;
        private JPanel getCenterComponent() {
            imageKeys = new int[] {
                0, 1, 3, 4, 1,  2,  5,  4,  0,  5,  3,  2,  2, 2
            trackKeys = new int[] {
                0, 1, 6, 7, 8, 13, 18, 17, 16, 21, 20, 15, 10, 5
            forwardKeys = new int[] {
                0, 3, 2, 3, 3,  2,  2,  1,  1,  2,  1,  0,  0, 0
            reverseKeys = new int[] {
                1, 0, 1, 1, 0,  0,  3,  3,  0,  3,  2,  2,  2, 2
            grid = new JLabel[25];
            JPanel panel = new JPanel(new GridLayout(5,0));
            for(int j = 0; j < grid.length; j++) {
                ImageIcon icon;
                int index = getIndexForValue(j);
                if(index != -1) {
                    icon = new ImageIcon(trackImages[imageKeys[index]]);
                } else {
                    icon = new ImageIcon(trackImages[6]);
                grid[j] = new JLabel(icon);
                panel.add(grid[j]);
            return panel;
        private int getIndexForValue(int value) {
            for(int j = 0; j < trackKeys.length; j++) {
                if(value == trackKeys[j])
                    return j;
            return -1;
        private JPanel getControls() {
            String[] ids = {
                "Start", "Stop", "Forward", "Reverse", "Add Carriage", "Remove Carriage"
            JPanel panel = new JPanel(new GridLayout(0,2));
             for(int j = 0; j < ids.length; j++) {
                JButton button = new JButton(ids[j]);
                button.setActionCommand(ids[j].toUpperCase());
                button.addActionListener(this);
                panel.add(button);
            return panel;
        public static void main(String[] args) {
            MC6 test = new MC6();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test.getCenterComponent());
            f.getContentPane().add(test.getControls(), "Last");
            f.pack();
            f.setLocation(200,100);
            f.setVisible(true);
    }

  • Problem in Triggering the Mail to SAP Inbox

    Dear Experts,
                     I have a problem for triggering the Mail option to SAP Inbox.
    We created a Job assigning the program RSEIDOCA,RSWUWFML2 by creating a variant for those programs. We are scheduling the job,  It is showing as
    24.11.2010 12:43:46 Job started                                                                     00           516          S
    24.11.2010 12:43:46 Step 001 started (program RSEIDOCA, variant ZRSEIDOCA, user ID__ )        00           550          S
    24.11.2010 12:43:48 Error situation found by evaluation                                             E0           596          S
    24.11.2010 12:43:48 Step 002 started (program RSWUWFML2, variant ZRSWUWFML2, user ID__)      00           550          S
    24.11.2010 12:43:49 Job finished                                                                    00           517          S
    But while checking in SOST, we are unable to see those mails. eventhough the user is unable to get those mail in SAP INBOX.
    I think, is there any authorization problem while triggering the mail for that particular user id.. Please tell me the solution, this is very high requirement for me.
    Thanks in Advance.
    Regards,
    Srini

    Hi Chandra,
              Thanks for your reply. Actually i am not workflow consultant, thats why i asking this question. Where to assign the Receipient Type and Recipient Notification.
    you give Recipient Type as position and Recipient of Notification must be position of the reciepient,
    Regards,
    Srini

  • Logical problem using vectors

    Hi and Happy New Year,
    I have a vector in my java application which contains a number of elements that is not fix which means each time the number of elements might change.
    I want to retrieve the elements of the vector 3 by 3 its like table records paging in jsp , asp or php
    - lets say this time i've got 10 elements in my vector , I have to JButtons previous_3 and next_3
    - The first time the program runs I want to get the first three elements of the vector (0 to 2)
    - By clicking on the next_3 button I want to get the next 3 ( 3 to 5) and so on... providing that the exist
    - By clicking on the privious_3 button I want to get the previous 3 ( 0 to 2) in this instance and so on... providing that the exist
    Can anyone give me a hint as how to solve this problem at least give me some ideas cause i am lacking of ideas my brain is frozen, I know that is it more a logical problem that a programming one
    I 've done this kind of thing in Asp and PHP but as I am new to Java
    I just can not figure out how to tackle this issue

    You may want to use the modulus function.
    lets look at an example.
    pseudo code
    vector v = new vector()
    v.size = 10; //lets say there are 10 elements in the vector
    int n = 3; // you want to jump maximum 3 elements each time
    // you can jump 3.3 times before running outide the scope
    // of the vector, well after the third time you must check
    // how many elements that is left in the vector, this is
    // done by modulus n%10 = 1, this means that the last time
    // you can not jump more than 1 element.
    I have to go now so I cant give you any code to cope with the problem, Ill be back in 3 hours, maybe I can give a good axample, but this outline is the way to go.
    TheLaw

  • Problem in triggering the correct workflow on  AdobeForm submission for PCR

    Hi All,
    I am facing a problem involving triggering of workflows through Adobe form submission. I have created a scenario for "Employee seperation" in QISRSCENARIO transaction and assigned it to an approval workflow. I have also activated and assigned the BUS7051-Created event in the workflow Basic Data. My workflow also triggers perfectly when i submit the adobe form. Everything is perfect till here.
    Now i have to create another scenario for "Request for Transfer" Now for this i had to create a seperate workflow. My problem is since both these workflows are assigned to the same event whenever i submit the "Employee seperation" form both the workflows get triggered. <b>Is there a setting where i can configure the corresponding workflow to be triggered for the respective scenario's alone?</b> How do we handle this situation?

    Hi Jocelyn/Raja,
    I am trying to use SWB_COND for differentiating between the different workflows. I have created a virtual attribute W_SCENARIO_KEY for this. I tried populating this scenario key by using the following staement,
    <b>
    CALL FUNCTION 'ISR_SPECIAL_DATA_GET'                       
      EXPORTING                                                
        notification_no                     =  object-key-number
    IMPORTING                                                 
        SCENARIO                            = w_scenario_key.  
      SWC_SET_ELEMENT CONTAINER 'W_SCENARIO_KEY' W_SCENARIO_KEY.</b>
    When i try to include W_SCENARIO_KEY as a start condition the workflow shows up an express message and fails to trigger. In ST22 i can see that there is an exception "INVALID_NOTIF_NUMBER" raised.
    But if i don't set this as a start condition all the workflows activated to BUS7051-CREATED are triggered and in the WF logs i can see the correct value of W_SCENARIO_KEY for the respective notification number.
    I am not sure why this happens when i set it as a start condition alone.
    I instead used a select statement as shown below,
    <b>select * from viqmel into table itab_VIQMEL          
                  where qmnum = object-key-number.       
    loop at itab_viqmel where qmnum = object-key-number. 
    w_scenario_key = itab_viqmel-auswirk.                
    endloop.</b>
    After inserting this statement it works fine without any issues. Any idea on why ISR_SPECIAL_DATA_GET cant be used in the virtual attribute implementation?
    The following is the dump i get if i use ISR_SPECIAL_DATA_GET,
    Information on where terminated                                                                 
        The termination occurred in the ABAP program "SAPLQISR9" in                                 
         "ISR_SPECIAL_DATA_GET".                                                                    
        The main program was "RSWDSTRT ".                                                                               
    The termination occurred in line 39 of the source code of the (Include)                     
         program "LQISR9U01"                                                                        
        of the source code of program "LQISR9U01" (when calling the editor 390).                                                                               
    Source Code Extract                                                                               
    Line  SourceCde                                                                               
    9 *"  EXCEPTIONS                                                                               
    10 *"      NO_INTERNAL_SERVICE_REQUEST                                                       
       11 *"      INVALID_NOTIF_NUMBER                                                              
       12 *"      INT_SERVICE_REQUEST_NOT_FOUND                                                     
       13 *"----
       14                                                                               
    15 * local data                                                                               
    16   DATA: lt_dummy TYPE qisrsgeneral_param.                                                 
       17                                                                               
    18   DATA: lr_isr_document TYPE REF TO cl_isr_xml_document.                                  
       19                                                                               
    20   DATA: ls_notif TYPE qmel.                                                               
       21                                                                               
    22 * MAIN                                                                               
    23 * try buffer first                                                                      
       24   CALL FUNCTION 'ISR_SPECIAL_DATA_BUFFER_GET'                                           
       25     IMPORTING                                                                               
    26       ET_SPECIAL_DATA       = special_data                                              
       27       ED_SCENARIO           = scenario                                                  
       28     EXCEPTIONS                                                                          
       29       BUFFER_EMPTY          = 1.                                                        
       30                                                                               
    31   IF sy-subrc eq 0.                                                                     
       32     EXIT.                                                                               
    33   ENDIF.                                                                               
    34                                                                               
    <b>   35 * check notification number                                                             
       36   SELECT SINGLE * FROM qmel INTO  ls_notif                                              
       37                             WHERE qmnum = notification_no.                              
       38   IF sy-subrc NE 0.                                                                     
    >>>>>     RAISE invalid_notif_number.                                                         
       40   ELSEIF ls_notif-auswirk IS INITIAL.                                                   
       41     RAISE no_internal_service_request.                                                  
       42   ENDIF.     </b>                                                                               
    43                                                                               
    44 * set scenario                                                                          
       45   scenario = ls_notif-auswirk.                                                          
       46                                                                               
    47 * read ISR XML document                                                                 
       48   CALL METHOD cl_isr_xml_document=>read_for_display                                     
       49     EXPORTING  id_notif_no         = notification_no                                    
       50     IMPORTING  er_isr_xml_document = lr_isr_document                                    
       51     EXCEPTIONS bds_error = 1.                                                           
       52                                                                               
    53   IF sy-subrc NE 0.                                                                     
    54     RAISE int_service_request_not_found.           
    55   ENDIF.                                           
    56                                                    
    57 * read data from XML document                      
    58   CALL METHOD lr_isr_document->get_data_from_xml

  • Problem regarding triggers

    hi
    I have implemeted before row and after statement triggers on a table T1. My requirement is i need to get some values from another tables, say T2 and T3 , and perform some calculation and update one of the columns in T1 with that calculated value.
    Initially i have written that logic in after statement . but i have used update on the same table in the after statement trigger. when i executed that it went infinite loop because of the update on same table.
    update T1
    set c1 = calc_value
    where seq = p_rec.new.seq;
    [\pre]
    So i have moved that before row level trigger as shown below:
    [pre]
    p_rec.new.c1 := calc_value;
    [\pre]
    now i tried to entering the values for tables T1,T2 and T3 through the oracle form and pressed save button. but it was raising an error that the values for the T@ and T3 are not available to calc the value .
    Is there a way that i can do the update on the same table without any problem.
    Please suggest.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    It would have been easy for me to do all the logic in forms but my manager wants all the logic to be put into database triggers. In the trigger, i am selecting the values of tables T2 and T3 , then performing the calculation and then assigning it to the column in the before row trigger. I have used the POST command in the oracle form to make sure that the values are posted to the database . But also i could see the trigger raise error message in the form.

  • Logic 9 Issue Triggering Wrong 3rd Party Samples

    I know the question says 3rd party but bear with me because I have ruled out issues with the 3rd party libraries and players. This is my Issue:
    So far no one from 8dio, Native Instruments, or Apple can fix this and I am completely out of ideas.
    I recently picked up a 2010 8-core Mac Pro and have had this problem ever since. The issue is only with my 8dio Adagio strings (most of them), it will either play the wrong sample, or no sample at all. I don't get any error messages though. All my other Kontakt libraries work fine.
    Example: Bass "Shorts" will play "feather stacc", "marcato", but not "stacc" or "pizz". Violas will produce sound however it plays the exact same sample which ever articulation I select, but it will only play for a second then cut out, no sustained notes. This sort of issue is true for pretty much all of the strings. I have ruled out many things including:
    1. Its not the 8dio strings libraries or Kontakt because they work fine in standalone mode through Kontakt, its only when I try to open them through Logic that I get the issue.
    2. I did a fresh install of Logic and Kontakt and still the same issue, however when I installed the exact same configuration on a friend's laptop, they worked fine through Logic.
    3. The strings did work fine on my old iMac until I dragged over and opened a session from the new computer, now I get the same issue there. The only way I can get it to work on the iMac is to open an old session which already has Kontakt and strings loaded up, otherwise a new project or new instance of Kontakt results in the same issue. This points to a settings or preference issue with Logic, however a fresh install and/or deleting the "preferences" file should fix it right? Wrong.
    4. I have tried 3 different operating systems (Mavricks, Mountain Lion, and Lion), 2 different main drives, a SSD and a regular drive. I've tried a fresh install of everything multiple times, different user accounts, redownloading Adagio, running the libraries from both internal and external HDs....
    After ruling everything else out it still seems like a problem with Logic other than the fact that the fresh install works fine on my friend's laptop but not my new Mac Pro (both running Mountain Lion). Any ideas would be much appreciated cause I'm all out of them. Thank you.
    Gabe
    2010 Mac Pro 8-core 2.4ghz
    OS X 10.8.5
    Logic Pro 9.1.8
    Kontakt 5.3
    8dio Adagio
    Apogee Duet Firewire Interface

    If your Audio Unit Manager is not booting, re-install.
    Treatment

  • Problem while triggering IDoc

    hi,
    When i am triggering idoc from R/3 , it is saying idoc transferred to port,
    but when i am checking the idoc in XI system idx5 , i am not able to view the idocs,
    What could be the reason for this?
    Also when i am creating distribution model in BD64 and then saying distribute , it is giving this message:
    <b><b>Model view BANK_CREAT has not been updated
    Reason: Maintenance systems for model view BANK_CREAT are not identical
    ..... Maintenance system in sending system DMYCLNT702
    ..... Maintenance system in receiving system DMYCLNT100</b></b>
    Note:DMYCLNT702 - Testing client
            DMYCLNT100 - Development
    Urgent help needed,
    Thanks,
    Loveena

    Hi,
    Chk the following details which will be helpful:
    A Summary of the Steps to be carried out to enable a SAP R/3 System send Idocs to SAP Exchange Infrastructure.
    First - Maintain the Sender R/3 System:
    SM59 : Create a RFC destination to XI
    WE21 : Create a TRFC Port ->Specify the RFC Destination Created
    BD54 : Create a Logical System for the Idoc Receiver
    WE20 : Create Partner Profile ->Maintain Outbound and the Inbound Parameters
    Second - Log on to XI System:
    SM59 : RFC Destination for Sender System
    IDX1 : Create the port to get Idoc Metadata from Sender System ( The Port Name must match the port name in the idoc header - Usually in format SAP<System ID>. eg. SAPID1 [Optional Step. Not mandatory]
    IDX2 : Maintain the Idoc Metadata. This is needed only by XI, and not by other SAP systems. IDX2 is needed because XI needs to construct IDoc-XML from the IDoc. No other SAP system needs to do that.
    Also chk the following link providing details of pushing idocs:
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi

  • Help in script logic - problem in FOR loop

    Hi Experts,
    We are using BPC 7.5 SP08. I have written a FOR loop in script logic default.lgf which is as follows:
    *FOR %TIM_MEM%=%TIME_SET%
    *XDIM_MEMBERSET TIME =%TIM_MEM%
    *WHEN P_ACCT2
    *IS "OSDU"
    REC(EXPRESSION=[P_ACCT2].[ASSTCAINVURO][P_ACCT2].[COGSUPRVIPSA]/[P_ACCT2].[ASSTUPRVTAQTY],P_ACCT2="COGSUIPSAO")
    *ENDWHEN
    *COMMIT
    *NEXT
    As per my requirement, all this members: [ASSTCAINVURO], [COGSUPRVIPSA], [ASSTUPRVTAQTY] exists for months September to next year's August. But in my input schedule, the months are from August to next year's July(which is the company's fiscal year). Consequently the loop runs for month August to next year's July while I need to run the loop 1 month late(i.e. September to next year's August). This was achieved earlier by hard-coding the time members which we cannot afford as this requires to update these hard-coded member IDs every year.
    We have also tried using the "NEXT" property of TIME dimension as follows:
    *XDIM_MEMBERSET TIME =%TIM_MEM%.NEXT
    but %TIM_MEM%.NEXT doesn't get the month in 'NEXT'.
    Please suggest if there is any way out to solve this problem.
    Thanks in advance.

    Hi Appu,
    Even if you restrict the scope using the XDIM statement, your script will just run the number of times as per the for loop. Actually, in reality, the same calculation is happening again and again, in your code; since your calculation is not based on the time member.
    To use the for loop effectively, you need to incorporate the time member in your calculation.
    Please look at the below sample code:
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *FOR %TIM_MEM%=%TIME_SET%
       *WHEN P_ACCT2
       *IS "OSDU"
          *REC(EXPRESSION=<CALCULATION>,P_ACCT2="COGSUIPSAO")
       *ENDWHEN
    *NEXT
    And in your calculation, you can use statements like
    ([P_ACCT2].[ASSTCAINVURO],TMVL(1, [TIME].[%TIM_MEM%]))
    This will ensure that everytime (as per the for loop), the calculation works on separate set of data.
    Hope you got the idea.

  • Mixing in Logic, problems with levels!

    Mixing problem here: I can’t figure out how to get all my equipment/ software levels correct to get an accurate level/ sound. I use Logic Pro 7 on a Mac dual G5, my sound card is MOTU and my monitors (2) are Event 20/20 BAS. Here’s the problem I believe that something is too low and I am compensating in the somewhere else and I am getting distortion in my mix downs- but I can barely hear the song. Here are my levels/ gains:
    Logic Main Mixdown track: 0.0 dB
    MOTU Main out: -34 db
    Event Monitors input level: 7 (max is 10)
    My plug-ins and such are at the level that I load them at, I don’t mess with the gains on these too much.
    Should I turn something down and turn something else up so that I can actually mix correctly? Thank you for your help!
    Cappy

    Hi.
    I have the same problem as you. I have a dual 2.7 G5 mac using a PCI MOTU 424 with a 2408 mk3 interface. Before I updated my Logic software to 7.2, The audio seemed to work fairly deccently as far as levels. I even utilize a Presonus Digimax LT via adat pipeline into the MOTU which in the past has worked great to attenuate levels digitally and Logic and MOTU worked seemlessly BUT ever since the new intel revolution, I have noticed tons of problems with the universal version of Logic. So far I would say maybe at least 30 features doesn't work properly anymore with Logic 7.2 and 7.2.1. Seems like with each new updates, the version gets worse and worse with more problems for my G5 mac. Example, Bouncing audio. Several of my settings such as plugins, levels, crossfades getting skipped or ignored and at times even crashes. I also have other issues like cracks and pops in my audio recordings lately which really is beginning to **** me off to no end. My adat transfered audio has weird pops added to the audio when transfered digitally which it didn't do before. I also noticed several playback functions that are very unstable. Some of my song files wont even play back!! My levels are no longer accurate anymore when recording in Logic. I have to crank my presonus levels just to barely hear my guitar tracks being recorded which I didn't have to do in previous versions, which also means more hisses and noises added. Apple seriously needs to correct these issues with Logic especially when we have to pay for bad updates.
    Scary thing is Logic 7.2.1 seems to run much smoother using the built in audio on my 2.0 intel macbook than my dual 2.7 G5 with my MOTU gear.

  • Script logic problem BPC 7.5

    Hi!
    We have a script logic that worked fine in BPC 5.1 but after our upgrade to BPC 7.5 it doesn´t work anymore.
    I will try to explain the part of or logic that doesn´t work anymore.
    We have 2 lines that will pass through the script, each line creates a temporary value  on KATEGORI ="#avskr1").
    Depending on the value created on  u201C#avskr1" it should do calculation A if the value is negative and calculation B if the value is positive. To do this we the following script logic:
    *WHEN GET(KATEGORI="#avskr1")
           *IS < 0
    *Calculation A
    ELS
    *Calculation B
    And this logic worked fine in BPC 5.1.
    If line X had -50 as a value in  u201C#avskr1"   and line Y had 75 as a value  in u201C#avskr1" , calculation A would be performed on line X and calculation B on line Y
    With the same example as above in BPC 7.5 calculation A will be performed on both lines.
    But if I change the logic to the following script logic in BPC 7.5:
    *WHEN GET(KATEGORI="#avskr1")
           *IS  = -50
    *Calculation A
    ELS
    *Calculation B
    Calculation A would be performed on line X and calculation B on line Y. It seems like the logic can´t handle <> signs in this script logic anymore.
    Regards
    Fredrik

    Hi!
    Unfortunately it didn´t help still the same error.
    And I just got an answer from SAP Support that there are a bug in the use of "Get whith When or lookup" in 7.5 SP03 which we currently are using, but it has been fixed in SP04. They just put up a SAP not 1515973 about the issue.
    Unfortunately they have no work around for this problem so I don´t know how to solve it untill we have installed SP04.
    Regards
    Fredrik

  • Regarding logical problem plz help me

    hi all
    i have a table like this
    EMPNO NOT NULL NUMBER(4)
    HIREDATE DATE
    OFF_DAY NUMBER(3)
    now what i want is i want to restrict the user with out entering the data in off_day column continuesly for three days
    ex
    10 22-09-2004 8
    10 23-09-2004 8
    10 24-09-2004 8
    so in this case i don't want to enter in 3rd row of 24th day for inserting or updating the data.
    i am trying it using triggers but i am fail please tell me how to solve this problem
    Thanks & Regards
    -Chandu
    [email protected]

    You could use:
    WHEN-VALIDATE-ITEM trigger to reject changes made
    PRE-TEXT-ITEM trigger to hinder the user to enter the field if date isn't in range
    Regards,
    Martin Malmström

  • Problem with triggering process chain

    Hi
    We have a remote process chain that calls a process chain in another system.The process chain in the other system is not getting triggered with the remote chain.
    We have 3 such remote chains and we are facing such a problem with only one of them.
    The process chain in the other system has a start variant which gets triggered( i suppose) and gives an instance id...the next step in the process chain is to load data into a ODS.Now this step remains yellow forever.When i manually try to schedule this step it gives me records and the request in the monitor screen turns green.But the process chain step continues to remain yellow.
    What can be a way out for triggering the process chain or where could the problem be?
    Please help
    Thanks,
    Suchi

    Hi Suchitra,
    Even though ur process seems to be in yellow your data loading may be completed and the  reason for it may be the delay in activation of ODs by ur PC.
    For your information please go through the below infm provided in SAp Library
    Note when loading into an ODS object and for the subsequent, event-controlled update:
    If you switched on the automatic activation in the ODS maintenance or administration, the monitor status for the request remains yellow after the load was successfully completed. Nevertheless, the subsequent processing for the InfoPackage is started, because the loading process is successfully completed.
    [http://help.sap.com/saphelp_nw04/helpdata/en/65/163d3873130057e10000009b38f842/content.htm]
    I hope ur doubt is clear.
    Regards,
    Rajkandula

  • OSX MOUNTAIN LION AND LOGIC PROBLEMS

    I have a this problem... if my logic is running and i open logic EQ i cant do nothing, even stop the logic just nothing to do , only force quit.... ANY HELP on this.....????

    Not a new problem.
    https://discussions.apple.com/message/19254621#19254621
    https://discussions.apple.com/thread/4142085

  • A logic problem help

    hello experts,
    i have a problem with a logic
    here I have to pass the VBRK-WAERK and VBRK-FKDAT into TCURR-FCURR and TCURR-GDATU, but here the FKDAT and GDATU are of not the same data type and another specification is that
    >GDATU is in the inverted date format i have to convert it to date format but how ? and another problem is even if i convert it , i have one more specification given my functional consultant is that the FKDAT will be in some precise date like ( 23.10.2008) where as the GDATU will be in the starting date of the month like (01.10.2008 means it denotes the whole) , so here i have to make the FKDAT to the starting date of its months but how?.
    please kindly help me with some detail explaination , here this is the specification given to me.
    "To get the value part
    Pass VBRK-WAERK and VBRK-FKDAT into TCURR-FCURR and TCURR-GDATU for TCURR-KURST=ZCUS. Get UKURS for corresponding entry in INR"
    please kindly explain me with 'for all entries' and the complete logic joining the two tables to achive the specification.
    Thanks in advance

    Hi,
    for date conversion you can take help from this..
    CONVERSION_EXIT_PDATE_OUTPUT
    Eg: input = 24012008 and output = 24.01.2008
    CONVERT_DATE_FORMAT
    Eg: input = 20080201 and output = 01.02.2008
    CONVERSION_EXIT_SDATE_OUTPUT
    Eg: input = 20070201 and output = 01.FEB.2007
    CONVERSION_EXIT_IDATE_INPUT
    Eg: input = 01.02.2008 and Output = 20080201
    CONVERSION_EXIT_LDATE_OUTPUT
    Eg: input = 20070301 and output = 01. March 2007
    CONVERSION_EXIT_PDATE_OUTPUT
    Eg: input = 20070301 and output = 03.01.2007
    now to match the data type you can use the function module...
    CONVERSION_EXIT_INVDT_INPUT    Conversion exit routine for inverted date (INPUT)
    CONVERSION_EXIT_INVDT_OUTPUT   Conversion exit routine for inverted date (OUTPUT)
    Regards,
    Arunima

Maybe you are looking for