Help for code in resource scheduling in scm-apo

Hi
I am having different resources in a table.i want to calculate the time taken for the first resource and the second resource.i want to know the time taken between each resource.so i want to maintain them in a loop.can you please help me in guiding me.
Thanks & Regards
jyothi

hi
my problem is i am having a table with some resources i want to calculate the setuptime between the 2 resources.the resources examples is machines.so i need to calculate the setup time for each machine and display in a table.for that i created a table with these resources.but i am getting problem in calculating setup time bt 2 machines.
Best Regards
Jyothi

Similar Messages

  • F4 help for Code groups while creating a notification.

    Hi all,
    We are using Exit QQMA0015 to filter the code groups for object parts, Damage, Causes and Activities  based on the Z table.
    Our requirement is based on Object Parts, we want to restrict f4 help for Damage and then based on Object Parts and Damage we want to restrict f4 help for Causes and so on for Activities based on the Z table . And we are going to maintain multiple values for one Object Part.
    For e.g. If we have two entries for Damage code group in z table based on the Object Part, then both these code groups should be shown on f4 help of Damage. So  we want to pass multiple code groups from the Z table
    We are facing an issue like the export parameter E_codegruppe is an variable and hence we can pass only one value. So in the loop we are trying to pass both the values to the table T_RIWO020TAB and in the exit this table is getting filled with the values we want.
    But once we are out of exit the standard table G_RIWO020TAB in the FUNCTION'CATALOGUE_SELECTION' is having values as per standard configuration and we are not able to get the values we want.
    Please suggest on the above mentioned requirement. This will be really helpful for us.
    Thanks & Regards,
    Sonali Deshmukh

    done

  • Need help for code

    Hi friends,
    I need help to get the java code to be used in netbeans 5.0
    I have to develop:
    1. Merge files using JFileChooser in netbeans 5.0
    2.Create files in the format .html, .doc, .pdf, etc
    3. Browse the file and attach to the MS Outlook
    Can anybody help me out plz to get the code for this or any reference from where I can understand the code for the same.
    Edited by: vinodmatlani81 on Oct 28, 2007 2:05 PM

    You must be using an old Google version, mine found lots of stuff:
    1. Merge files using JFileChooser in netbeans 5.0\\
    Depends on what you're merging, but here's Sun's basic IO tutorial: http://java.sun.com/docs/books/tutorial/essential/io/
    How to use the JFileChooser: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html
    2.Create files in the format .html, .doc, .pdf, etc\\
    For HTML, see the basic IO tutorial.
    PDF: http://www.lowagie.com/iText/
    DOC: http://schmidt.devlib.org/java/libraries-word.html
    3. Browse the file and attach to the MS Outlook\\
    http://www.sun.com/software/products/calendar_srvr/connector/index.xml

  • Help for code

    I am unable to recognize the problem in the following code. My paint() in defined in a class ImagePanel and I am unable to access paint() from outside.
    Please Help!
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import javax.media.*;
    import javax.media.format.*;
    import javax.media.util.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import com.sun.image.codec.jpeg.*;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.control.*;
    import javax.media.format.*;
    import javax.media.util.BufferToImage;
    import java.io.IOException;
    import java.net.*;
    import java.awt.*;
    ////////////////////FROM GESTURE
    import java.io.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.applet.*;
    import java.util.*;
    import java.lang.*;
    //import Gesture.class;
    import com.sun.image.codec.jpeg.*;
    import sun.awt.image.BufferedImageGraphics2D;
    public class SwingCapture extends Panel implements ActionListener, Runnable { 
    public static Player player = null; 
    public CaptureDeviceInfo di = null; 
    public MediaLocator ml = null; 
    public JButton capture = null; 
    public Buffer buf = null; 
    public Image img = null; 
    //public VideoFormat vf=null
    public BufferToImage btoi = null; 
    public ImagePanel imgpanel = null;   
    Thread thr;
    String str1=new String();
    //from gesture
    int xcentre, ycentre,ij;
         static int iw = 320;
         static int ih = 240;
         static int  attenH = 400;
         static int attenW = 200;
         static int PIXCOUNTBB=5;
         static int IMIN=40;   //approximate location of hand
        static int IMAX=239;
        static int JMIN=5;
        static int JMAX=300;
         Image imgprocess;
         Image im;
         int xmin,xmax,ymin,ymax;
    int pix_fill[][]= new int [320][240];
    int pixel2[] = new int[76800];
    int pixel3[] = new int[76800];
    int pixel4[] = new int[76800];
    int pixel5[] = new int[76800];
    int pixel6[] = new int[attenH * attenW];
    double arr[][] = new double[21][2];
    int flag = 0;
    int ixmean = 0;
    int iymean = 0;
    //MyThread thread ;
    int threadflag = 1;
    public SwingCapture()   {
         setLayout(new BorderLayout());   
    //setSize(320,550);
    //setSize(320,550);      
    imgpanel = new ImagePanel();   
    capture = new JButton("Capture");   
    capture.addActionListener(this);       
    //String str1 = "vfw:Philips USB PC-Camera:0";   
    //String str2 = "vfw:Microsoft WDM Image Capture:2"; 
    //String str3 = "vfw:Video Blaster WebCam Go (VFW):0";  
      String str3 = "vfw:Video Blaster WebCam 3/WebCam Plus (VFW):1";  
    System.out.println("sur");
      String str2= "vfw:Microsoft WDM Image Capture (Win32):0";
    di =(CaptureDeviceInfo) CaptureDeviceManager.getDevice(str3);
    System.out.println("sur" + di);
    ml = di.getLocator();       
    try     {     
    player = Manager.createRealizedPlayer(ml);     
    player.start();     
    Component comp;           
    if ((comp = player.getVisualComponent()) != null)                   
          {add(comp,BorderLayout.NORTH);     
    add(capture,BorderLayout.CENTER);     
    add(imgpanel,BorderLayout.SOUTH);}   
    catch (Exception e)    
              e.printStackTrace();   
    thr = new Thread(this);
    public static void main(String[] args)   {   
    Frame f = new Frame("SwingCapture");   
    SwingCapture cf = new SwingCapture();       
    f.addWindowListener(new WindowAdapter() {      //overriding windowClosing
                                             public void windowClosing(WindowEvent e) {     
                                             playerclose();     
                                             System.exit(0); }       
    f.add("Center",cf);   
    f.pack();   
    f.setSize(new Dimension(320,550));   
    f.setVisible(true);
    /*for(int i=0;i<=10;i++)
         FrameGrabbingControl fgc = (FrameGrabbingControl)  player.getControl("javax.media.control.FrameGrabbingControl");     
    buf = fgc.grabFrame();           
    // Convert it to an image     
    btoi = new BufferToImage((VideoFormat)buf.getFormat());     
    img = btoi.createImage(buf);           
    // show the image     
    imgpanel.setImage(img);
    Gesture(img);
    imgprocess.flush();
    img.flush();
    try{
         Thread.sleep(10000);}
         catch(Exception e1){};
    public static void playerclose()   {   
    player.close();   
    player.deallocate(); 
    public synchronized void actionPerformed(ActionEvent e)   {   
    JComponent c = (JComponent) e.getSource();       
    if (c == capture)     {
         //thread started
         thr.start();
         while(ij<=7)
           if(threadflag ==1)
               try{
              System.out.println("Waiting");
                     wait();
                     System.out.println("Finished Waiting");
                catch(Exception e3)
                threadflag =0;
                System.out.println("Back");
                imgpanel.callPaint("<");
                threadflag=1;
                notify();
    public synchronized void run()
           ij = 0;
           while(ij<=7)
         if(threadflag ==1)
              //for( ij = 0; ij<=20;ij++)
    // Grab a frame   
    //this.imgpanel=imgpanel;
    System.out.println("ij : " + ij);
    FrameGrabbingControl fgc = (FrameGrabbingControl)  player.getControl("javax.media.control.FrameGrabbingControl");     
    System.out.println("After buf1 " + fgc);
    buf = fgc.grabFrame();
    System.out.println("After buf " + buf);
    // Convert it to an image     
    btoi = new BufferToImage((VideoFormat)buf.getFormat());     
    System.out.println("After btoi "+ btoi);
    img = btoi.createImage(buf);
    System.out.println("After img "+ img);
    //imgpanel.callpaint(">");
    // show the image     
    //System.out.println("rhododendron");
    //imgpanel.setImage(imgprocess);
    //System.out.println("cacatua");
    //pixel2=Gesture(img);
    Gesture(img);
    //imgpanel.repaint();
    //repaint();
    System.out.println("After Gesture");
    //String str = new String("C:\\test");
                   //str = str + ij + ".jpg";
    //System.out.println("After ");               
              //     SaveImage(str,imgprocess);
    //imgprocess=createImage(new MemoryImageSource(iw,ih,pixel2,0,iw));
    //repaint();
    /*try{
         Thread.sleep(10000);}
         catch(Exception e1){};*/
    //imgprocess.flush();
    //img.flush();
    ij++;
    System.out.println("ij: " + ij);
    threadflag = 0;
    notify();
    //System.out.println("After Notify");
    if(threadflag==0)
         try{
         wait();
    //     notify();
    //repaint();
         catch(Exception e2)
    //System.out.flush();
    /*flag =1;
         int cntleft=0;
         int cntright=0;
    for(int i=1;i<=7;i++)
        if(arr[i-1][0]<arr[0])
         cntright++;
    else
              cntleft++;
    if(cntleft>5)
         str1 = "Moving right";
         System.out.println("Moving right");
         imgpanel.callPaint(str1);
         else
    if(cntright>5)
         str1 = "Moving left";
              System.out.println("Moving left");
         imgpanel.callPaint(str1);
    else
         str1 = "No Movement";
              System.out.println("No Movement");
         imgpanel.callPaint(str1);
    /*class MyThread extends Thread
    MyThread()
         if(threadflag ==1)
              wait();
         else
              threadflag =0;
              imgpanel.callPaint();
              threadflag=1;
              notify();
    class ImagePanel extends Panel {   
    public Image myimg = null;
    String str2 = new String();
    public ImagePanel() {     
    setLayout(null);
    setSize(320,240);
    public void setImage(Image img) {     
    //System.out.println("cacatua");
    //this.myimg = img;
    //repaint();
    public void callPaint(String st)
         //this.str2 = st;
         System.out.println("in callPaint");
         System.out.println("xmean: "+ixmean);
         imgpanel.repaint();
         System.out.println("in out callPaint");
    public void paint(Graphics g) {     
    //if (myimg != null) {  
    //g.drawImage(imgprocess, 0, 0, null);
         System.out.println("xmean: "+ixmean);
         //System.out.println("in Paint of imgpanel");
    //g.drawImage(imgprocess,0,0,null);
    //if(flag==1)
    //g.drawString(str2, 20,20);
    //     else
              //repaint();
              g.drawString(">",ixmean,iymean);
              //repaint();
    //g.drawImage(imgprocess,0,0,null);
    //class Gesture //extends Applet
         /*int xcentre, ycentre;
         static int iw = 320;
         static int ih = 240;
         static int attenH = 400;
         static int attenW = 200;
         static int PIXCOUNTBB=5;
         static int IMIN=40; //approximate location of hand
    static int IMAX=239;
    static int JMIN=5;
    static int JMAX=300;
         Image imgprocess;
         Image im;
         int xmin,xmax,ymin,ymax;
    int pix_fill[][]= new int [320][240];
    int pixel2[] = new int[76800];
    int pixel3[] = new int[76800];
    int pixel4[] = new int[76800];
    int pixel5[] = new int[76800];
    int pixel6[] = new int[attenH * attenW];
         //public int intensity(int pix[][], int x, int y)*/
         public int intensity(int pix[][], int x, int y)
         int p, r, g, b, inten;
              //p=pix[x][y];
    p=pix[x][y];
              r = 0xff & p>>16 ;
              g = 0xff & p>>8;
              b = 0xff & p;
              //inten = (int)(0.33 * r + 0.56 g + 0.11b);
              inten = (int)(0 * r + 0 g + 0.11b);
              //inten = (int)( 0.11*b);
              return(int)(inten);
    public int min(int x, int y)
         if(x<y)
                   return(x);
              else
                   return(y);
         //public void init()
         public void Gesture(Image im)
              //int pixel3[] = new int[80000];
              //int pixel2[] = new int[76800];
         int whitepix=0;
              int coord[][] = new int[2][256];
              //int ymin, xmax,ymax,xmin;
              int no_elem_comp[] = new int[76800];
              int count = 0;
              float pskin[][] = new float[241][241];
              float pnoskin[][] = new float[241][241];
              int num = 0;
              String imname;
              //Image im;
              for(int i=0;i<2;i++)
                   for(int j=0;j<256;j++)
                   coord[i][j] = 0;
              //imname = getParameter("img");
              //im = getImage(getDocumentBase(),imname);
              int pixels[] = new int [iw * ih];
              int pix[][] = new int[iw][ih]; //changed iw and ih
              FileReader fr;
              BufferedReader br ;
              String s = new String();
              int l;
              int total;
              PixelGrabber pg = new PixelGrabber(im,0,0,iw,ih,pixels,0,iw);
              try
                   pg.grabPixels();
              catch(InterruptedException e) {}
              int size = iw * ih;
              for(int m=240; m<480;m++)
                   //System.out.println(m + " : " + pixels[m] );
                   int p = pixels[m];
                   int r = 0xff & (p>>16);
                   int g = 0xff & (p>>8);
                   int b = 0xff & (p);
                   //System.out.println("r : " + r + " g : " + g + " b : " + b);
              //imgprocess=createImage(new MemoryImageSource(iw,ih,pixels,0,iw));
              //repaint();
              ///////controller
              float C[][] = new float[16][size];
              for(int i=0;i<16;i++)
                   for ( int j=0;j<size;j++ )
                   C[i][j]=0;
              //System.out.println("End Controller");
    ////////fingerinit
              try{
              fr = new FileReader("skin");
              br = new BufferedReader(fr);
              //String s;
              s=br.readLine();
              l = Integer.parseInt(s);
              System.out.println("l : " + l);
              s=br.readLine();
              total = Integer.parseInt(s);
              System.out.println("total : " + total);
    String val = new String();
              for(int i=0; i<241; i++)
    for(int j=0; j<241; j++)
         s=br.readLine();
         int intval = Integer.parseInt(s);
              //pskin[i][j] = ((float)intval)/total;
         pskin[i][j] = (float)intval;
              fr.close();
              catch(Exception e)
              {System.out.println("Hello");
    try{
         fr = new FileReader("noskin");
         br = new BufferedReader(fr);
              s=br.readLine();
         l = Integer.parseInt(s);
              s=br.readLine();
         total = Integer.parseInt(s);
              for(int i=0; i<241; i++)
    for(int j=0; j<241; j++)
         s=br.readLine();
         int intval = Integer.parseInt(s);
              //pskin[i][j] = ((float)intval)/total;
         pnoskin[i][j] = (float)intval;
              fr.close();
              catch(Exception e)
                   System.out.println("Here:");
    System.out.println("after noskin");
              float A[][] = new float[size+1][20];
              try{
    System.out.println("in try");
              fr = new FileReader("svdnewdata");
              if(fr==null)
                   System.out.println("Could not open svdnewdata ");
                   System.exit(0);
              br = new BufferedReader(fr);
              for(int i1=0;i1<size;i1++)
                   s=br.readLine();
                   StringTokenizer st =new StringTokenizer(s,"\t");
                   //System.out.println("svd :" + s);
                   for(int j1=0;j1<20;j1++)
                             String val = st.nextToken();
                   //          System.out.println("val : " + val);
                             int intval=Integer.parseInt(val);
                             A[i1][j1]=intval;
              fr.close();
              catch(Exception e)
                   System.out.println("surbhi");
    System.out.println("after svdnewdata");
              ////////Process
              int points[][] = new int[2][size];
              int colors[][] = new int[3][size];
              int data[][] = new int[2][size];
              float prob[] = new float[size];
              ////////fingerpoint
              for(int i=0;i<size;i++)
                   int p = pixels[i];
                   int r=0xff & (p>>16);
                   int g=0xff & (p>>8);
                   int b=0xff & (p);
                   colors[0][i] = r;
    colors[1][i] = g;
                   colors[2][i] = b;
                   data[0][i] = (int)(i/iw)-1;
                   data[1][i] = (int)(i%iw)-1;
    float Cb_f = (float)(((-4818.0*r - 9527.0*g + 14345.0*b)/32768.0)+128.5);
                   float Cr_f = (float)(((14345.0*r - 12045.0*g - 2300.0*b)/32768.0)+128.5);
                   int Cb = (int)Cb_f;
                   int Cr = (int)Cr_f;
                                  //System.out.println("Cb :" + Cb);
                                  //System.out.println("Cr :" + Cr);
                   if(pnoskin[Cb][Cr] ==0)
    //System.out.println("sur :" );
                        prob[i]=1;
                   else
                        prob[i]=pskin[Cb][Cr]/pnoskin[Cb][Cr];
              //System.out.println("anui");
    for(int a=0;a<size ;a++)
         if( prob[a]>0.05)
         //     { System.out.println("Ishsani"); 
              pixel2[a]=0xff000000 | 0x000000ff;//}
         else
         //     {System.out.println("Ishsani11");
              pixel2[a]=0xff000000 | 0x00ff0000;
                   int k=0;
                   int buffer[] = new int[3];
                   //int pix[][] = new int[ih][iw];
                   for(int i=0;i<ih;i++)
                        for(int j=0;j<iw;j++)
                        pix[j][i]= pixel2[k++];
    //System.out.println("out k:" + k);
                   for(int i=1;i<ih-1;i++)
                   for(int j=1;j<iw-1;j++)
                        whitepix = 0;
                        for(int i1=i-1;i1<=i+1;i1++)
                             for(int j1=j-1;j1<j+1;j1++)
                        buffer[0]= 0x000000ff & (pix[j1][i1]>>16);
                        buffer[1]= 0x000000ff & (pix[j1][i1]>>8);
                             buffer[2]= 0x000000ff & (pix[j1][i1]);
                             //if(((buffer[0]==-1)&&(buffer[1]==-1))||((buffer[2]==-1)&&(buffer[1]==-1))||((buffer[0]==-1)&&(buffer[2]==-1)))
                             if(buffer[2]==255)
                                  whitepix++;
                        if(whitepix>=3)
                             //pix[j][i] = (255<<24) | (255 << 16) | (255<<8) | (255);
                             pix[j][i] = 0xff000000 | 0x000000ff;
              //               System.out.println("if : " + pix[j][i]);
                        else
                             //pix[j][i] = 0xff|(0<<16)|(0<<8)|0;
                             pix[j][i] = 0xff000000 | 0x00ff0000;
              //               System.out.println("else : " + pix[j][i]);
                   }//end for
         int b=0;
                   for(int i=0;i<ih;i++)
                   for(int j=0;j<iw;j++)
                        pixel2[b++] = pix[j][i];
    //imgprocess=createImage(new MemoryImageSource(iw,ih,pixel3,0,iw));
    //repaint();
              IdenOutline(pix);
              IdenOutline(pix_fill);
              IdenOutline(pix_fill);
              IdenOutline(pix_fill);
              IdenOutline(pix_fill);
              IdenOutline(pix_fill);
              //IdenOutline(pix_fill);
    calcBoundary();
              System.out.println("xmax : " + xmax + " xmin : " + xmin);
    System.out.println("ymax : " + ymax + " ymin : " + ymin);
              BBox();
              CalcMvt();
              b=0;
                   for(int i=0;i<ih;i++)
                   for(int j=0;j<iw;j++)
                        pixel2[b++] = pix_fill[j][i];
    //imgpanel.callPaint(">");
    //imgpanel.repaint();
    // imgprocess.flush();
    //imgprocess=createImage(new MemoryImageSource(iw,ih,pixel2,0,iw));
    //repaint();
    //thread.start();
    //try{
    //wait();
    //catch(Exception e)
    //imgpanel.callPaint(">");
    //repaint();
    //imgprocess.flush();
    /*          public void run()
                   imgpanel.callPaint(">");
                   notify();
    /*public void paint(Graphics g)
         g.drawString(str1, 310,300);
         System.out.println("Came in paint");
    //g.drawString("Coordinates of the Centroid is "+ xcentre + " , " + ycentre , 10,40);
    //g.drawImage(imgprocess,0,0,null);
         //System.out.println("Came in paint out");
    //g.drawImage(im,0,0,this);
    //if(imgprocess==null){
              System.out.println("ishani1");
              //imgprocess=createImage(new MemoryImageSource(iw,ih,pixel2,0,iw));
              //repaint();
         System.out.println("ishani2");
    //g.drawImage(imgprocess,0,0,null);
    //g.drawImage(imgprocess,0,400,null);
    System.out.println("ishani3");
    //repaint();
    void BBox()
    for(int i=xmin ; i<=xmax;i++)
         pix_fill[i][ymax] = 0xff0000ff;
         pix_fill[i][ymin] = 0xff0000ff;
         System.out.println("Came here");
         for(int j=ymin;j<=ymax;j++)
              pix_fill[xmax][j] = 0xff0000ff;
    pix_fill[xmin][j] = 0xff0000ff;
         System.out.println("Came here2");
    void calcBoundary()
    int minrow,maxrow,mincol,maxcol,flag=0;
         minrow=maxrow=mincol=maxcol=0;
         for(int i=0;i<ih;i++)
         for(int j=0;j<iw;j++)
         if(pix_fill[j][i] == 0xff0000ff)
              flag = 1;
              minrow = i;
              break;
         if(flag==1)
         break;
         flag=0;
    for(int i=(ih-1);i>=0;i--)
         for(int j=0;j<iw;j++)
              if(pix_fill[j][i] == 0xff0000ff)
                   flag =1;
                   maxrow=i;
                   break;
              if(flag==1)
              break;
         flag =0;
    for(int j=0;j<iw;j++)
         for(int i=0;i<ih;i++)
              if(pix_fill[j][i] == 0xff0000ff)
                   flag=1;
                   mincol = j;
                   //System.out.println("row : " + i + " Col : " + mincol);
                   break;
              if(flag==1)
                   break;
         flag =0;
    for(int j=(iw-1);j>=0;j--)
         for(int i=0;i<ih;i++)
              if(pix_fill[j][i] == 0xff0000ff)
                   flag =1;
                   maxcol = j;
                   System.out.println("row : " + i + " Col : " + maxcol);
                   break;
              if(flag==1)
    break;
    xmax = maxcol;
    xmin = mincol;
    ymax = maxrow;
    ymin = minrow;
    return;
    void IdenOutline(int pix_temp[][])
         int n,k,l,i,j;
         for(i=0;i<ih;i++)
              for(j=0;j<iw;j++)
         if(pix_temp[j][i]==0xffff0000)
                        continue;
                   else
                        for(k=1;(j+k)<320;k++)
                        if(pix_temp[j+k][i]!=0xffff0000)
                        continue;
                        else
                             break;
                             for(l=1;(i-l)>0;l++)
                        if(pix_temp[j][i-l]!=0xffff0000)
                                  continue;
                             else
                                            break;
                                       /*for(m=1;j-m>0;m++)
                                            if(pix_fill[j-m][i])!=0xff0000ff)
                                            continue;
                                       else*/
                                                 for(n=1;(i+n)<240;n++)
                        if(pix_temp[j][i+n]!=0xffff0000)
                                                 continue;
                                                 else
    break;
                                                      if((k<15)&&(n<20)&&(l<20))
                                                           pix_temp[j][i]=0xffff0000;
                                                      else
                                                                     if((k<15)&&(l<10)&&(n>10))
    pix_temp[j][i]=0xff0000ff;
                                                                else
                                                                          if((n<10)&&(k<15)&&(l>10))
                                                                          pix_temp[j][i]=0xff0000ff;
                                                                     else
                                                                          if((n<10)&&(l<10)&&(k>15))
                                                                          pix_temp[j][i]=0xff0000ff;
    int b1=0;
                        for(int a=0;a<ih;a++)
                        for(int d=0;d<iw;d++)
                        pixel2[b1++] = pix_temp[d][a];
                        pix_fill[d][a] = pix_temp[d][a];
    //imgprocess=createImage(new MemoryImageSource(iw,ih,pixel4,0,iw));
              //repaint();
    public void SaveImage(String s,Image im)
         System.out.println("i m here" + im);
         /* try{
              Thread.sleep(1000);
         catch(Exception e)
         //BufferedImage bi = new BufferedImage(im.getWidth(null, im.getHeight(null), BufferedImage.TYPE_INT_RGB);
    BufferedImage bi = new BufferedImage(320, 240, BufferedImage.TYPE_INT_RGB);
         System.out.println("i m here" + bi);
         Graphics2D g2 = bi.createGraphics();
         g2.drawImage(im, null, null);
         System.out.println("i m here" + g2);
         FileOutputStream out = null;
         try {      
              out = new FileOutputStream(s);
         catch (java.io.FileNotFoundException io)
              System.out.println("File Not Found");
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
         JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
         param.setQuality(0.5f,false);
         encoder.setJPEGEncodeParam(param);
         try
              encoder.encode(bi);
              out.close();
         catch (java.io.IOException io)
              System.out.println("IOException");
         public void CalcMvt()
              double xmean=(xmax+xmin)/2;
              double ymean=(ymax+ymin)/2;
              ixmean = (int) xmean;
              iymean = (int)ymean;
              arr[ij][0]= xmean;
              arr[ij][1]=ymean;
         }//end of class
    /*public class SCapture
    public static void main(String[] args) {   
    Frame f = new Frame("SwingCapture");
    SwingCapture cf = new SwingCapture();
    f.addWindowListener(new WindowAdapter() {      //overriding windowClosing
    public void windowClosing(WindowEvent e) {     
    playerclose();
    System.exit(0); }
    f.add("Center",cf);
    f.pack();
    f.setSize(new Dimension(320,550));
    f.setVisible(true);*/
    /*for(int i=0;i<=10;i++)
         FrameGrabbingControl fgc = (FrameGrabbingControl) player.getControl("javax.media.control.FrameGrabbingControl");
    buf = fgc.grabFrame();
    // Convert it to an image
    btoi = new BufferToImage((VideoFormat)buf.getFormat());
    img = btoi.createImage(buf);
    // show the image
    imgpanel.setImage(img);
    Gesture(img);
    imgprocess.flush();
    img.flush();
    try{
         Thread.sleep(10000);}
         catch(Exception e1){};

    Not sure exactly what you mean...
    Here, try this sample, use your ImagePanel with a standard frame. Just add the panel to the frame, make the frame visible, shrink and restore it a few time, see if your paint method gets called...
    If it works correctly, good, you know the ImagePanel is fine, and yout problem is with your other class. If it doesn't work, then concentrate on your ImagePanel and explain exactly HOW it doesn't work... (like any errors, what gets shown/printed to the command line, exactly how it misbehaves...
    public void ImagePanelTest extends Frame {
      public ImagePanelTest (String title) {
        super(title);
      public void main(String[] args) {
        ImagePanel ip = new ImagePanel();
        ImagePanelTest ipt = new ImagePanelTest("ImagePanel Test");
          ipt.add(ip);
          ipt.setSize(new Dimension(300,300));
          ipt.addWindowListener(new WindowAdapter() {
            public void windowClosing(windowEvent we) {
              dispose();
              System.exit(0);
          ipt.show();
      }

  • Looking for Code Review Resources

    We have completed a complex project using jakarta struts and are in beta testing at the moment.
    Would like to have someone review our code but we have not been able to find expierienced developers in our (physical) area.
    Does anyone have suggestions on where I could look to find a qualified individual for independent code review.
    Thank you in advance for your suggestions.

    Just post it here. Some of our fine reviewers will be happy to serve you.
    P.S. Be sure to say that it's homework.

  • F4 help for REUSE ALV grid

    Hi,
    I am doing an ALV report using REUSE_ALV_GRID_DISPLAY . This is my requirement
    If user press F4 in field in WERKS then i need to get values from table T001W and also from my custom table YT001W and display, so user can select from the f4 list.
    How to do this.
    Your help is appreciated
    Sa_R

    DATA : alvgrid TYPE REF TO cl_gui_alv_grid,
    custom_container TYPE REF TO cl_gui_custom_container,
    fieldcatalog TYPE lvc_t_fcat.
    table to contain fields that require f4...............................
    DATA : lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
    ok_code declaration...................................................
    DATA : ok_code TYPE sy-ucomm.
    Tables declaration....................................................
    TABLES : zaemp.
    Types declaration.....................................................
    TYPES : BEGIN OF ty_emp,
    code LIKE zaemp-code,
    designation LIKE zaemp-designation,
    END OF ty_emp.
    Internal table declaration............................................
    DATA : i_emp TYPE TABLE OF ty_emp.
    Workarea declaration..................................................
    DATA : wa_emp TYPE ty_emp.
    Selection screen parameters...........................................
    SELECT-OPTIONS : s_code FOR zaemp-code.
    CLASS lcl_event_handler DEFINITION
    CLASS lcl_event_handler DEFINITION.
    PUBLIC SECTION.
    METHODS :
    handle_on_f1 FOR EVENT onf1 OF cl_gui_alv_grid
    IMPORTING e_fieldname es_row_no er_event_data,
    handle_on_f4 for event onf4 of cl_gui_alv_grid
    importing e_fieldname es_row_no er_event_data
    ENDCLASS.
    CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
    METHOD handle_on_f1.
    custom f1 help for code field.......................................
    IF e_fieldname = 'code'.
    CALL SCREEN 3001.
    ENDIF.
    to prevent processing of standard f1 help............................
    er_event_data->m_event_handled = 'X'.
    ENDMETHOD.
    Method handle_on_f4.
    standard f4 help will be invoked......................................
    endmethod.
    ENDCLASS.
    start of selection....................................................
    START-OF-SELECTION.
    SELECT code designation FROM zaemp
    INTO CORRESPONDING FIELDS OF TABLE i_emp
    WHERE code IN s_code.
    CALL SCREEN 3000.
    *& Module STATUS_3000 OUTPUT
    text
    MODULE status_3000 OUTPUT.
    SET PF-STATUS 'ZTOOL'.
    SET TITLEBAR 'ZTITLE'.
    IF alvgrid IS INITIAL.
    CREATE OBJECT custom_container
    EXPORTING
    container_name = 'ZCONTAINER'.
    CREATE OBJECT alvgrid
    EXPORTING
    i_parent = custom_container.
    PERFORM prepare_f4.
    CALL METHOD alvgrid->register_f4_for_fields
    EXPORTING
    it_f4 = lt_f4[]
    creating instance for event handler..................................
    DATA : event_handler TYPE REF TO lcl_event_handler.
    CREATE OBJECT event_handler.
    SET HANDLER event_handler->handle_on_f1 FOR alvgrid.
    SET HANDLER event_handler->handle_on_f4 FOR alvgrid.
    preparing field catalog..............................................
    PERFORM prepare_fieldcatalog CHANGING fieldcatalog.
    CALL METHOD alvgrid->set_table_for_first_display
    EXPORTING
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    CHANGING
    it_outtab = i_emp
    it_fieldcatalog = fieldcatalog
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDIF.
    ENDMODULE. " STATUS_3000 OUTPUT
    preparing field catalog...............................................
    FORM prepare_fieldcatalog CHANGING i_fieldcatalog TYPE lvc_t_fcat.
    DATA : ls_fcat TYPE lvc_s_fcat.
    ls_fcat-fieldname = 'code'.
    ls_fcat-ref_table = 'zaemp'.
    ls_fcat-coltext = 'EMPLOYEE ID'.
    APPEND ls_fcat TO i_fieldcatalog.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'designation'.
    ls_fcat-ref_table = 'zaemp'.
    ls_fcat-coltext = 'EMPLOYEE NAME'.
    APPEND ls_fcat TO i_fieldcatalog.
    ENDFORM.
    *& Module USER_COMMAND_3000 INPUT
    text
    MODULE user_command_3000 INPUT.
    CASE ok_code.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_3000 INPUT
    *& Module USER_COMMAND_3001 INPUT
    text
    MODULE user_command_3001 INPUT.
    CASE ok_code.
    WHEN 'SAVE'.
    LEAVE TO SCREEN 0.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_3001 INPUT
    *& Module STATUS_3001 OUTPUT
    text
    MODULE status_3001 OUTPUT.
    SET PF-STATUS 'GUI'.
    SET TITLEBAR 'TITLE'.
    ENDMODULE. " STATUS_3001 OUTPUT
    preparing fields to be registered for f4 help.........................
    FORM prepare_f4.
    lt_f4-fieldname = 'designation'.
    lt_f4-register = 'X'.
    lt_f4-getbefore = 'X'.
    lt_f4-chngeafter = 'X'.
    APPEND lt_f4.
    ENDFORM.
    Hi
    For creating the F4 Help see the sample code and do accordingly
    See the following ex:
    TYPES: BEGIN OF TY_MBLNR,
    MBLNR LIKE MKPF-MBLNR,
    END OF TY_MBLNR.
    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
    data: it_ret like ddshretval occurs 0 with header line.
    At selection-screen on value-request for s_mat-low.
    Select MBLNR from mkpf into table it_mblnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'MBLNR'
    PVALKEY = ' '
    DYNPPROG = ' '
    DYNPNR = ' '
    DYNPROFIELD = ' '
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    VALUE_TAB = IT_MBLNR
    FIELD_TAB =
    RETURN_TAB = IT_RET
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_mat-low.
    ENDIF.
    Go through the test program.
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3.
    F4 help -- on editable alv field.
    The specified item was not found.
    Message was edited by:
            Karthikeyan Pandurangan

  • T-Code to update condition table for delivery & transport scheduling to SCM

    Hello,
    Could you tell the T-code to update condition table for delivery & transport scheduling to SCM system
    These are the some SAP fileds
    /SAPCN1/KOTABNR (Condition Table)
    /SAPCND/KAPPL(Application)
    /SAPCND/KSCHL(Condition type)
    /SAPCND/KOLNR(Access sequence)
    Thanks in Advance
    RK
    Edited by: RK on Jun 9, 2009 5:58 PM

    HI
    The TCODE for this is /SAPAPO/ATP_GCM.
    Regards
    Anurag.

  • Search help for material code in VA01

    Dear Experts,
    In VA01 tcode in item level if user press f4 in the material code then we will get all the f4 helps for few fields.Now i need to add one more field  mtart from mara table  in the existing  search help of material code.
    plz suggest me how can i proceed.
    If u have any documets regarding adding one more fied to existing search help plz send me.
    Thanks & Regards,
    farook.
    Edited by: farook shaik on Aug 18, 2009 8:58 AM

    Hi,
       You can do that using search help exits you would find several threads already posted to the forum for this like below:
    Link[Search Help Exits|Search Help Exit;
    Regards,
    Himanshu

  • BAPI Function Module for SCM APO Trans code /SAPAPO/AC42

    Hi,
       Is there any BAPI Function Modules for SCM APO Tcode /SAPAPO/AC42.
       This BAPI FM should return the column values "Remaining Prod Alloc"  and "Incoming Order Quantity" when we give
       below details as inputs for the Tcode /SAPAPO/AC42
            Product Allocation Group
            Product
            Allocation Procedure
            prod Alloc step
            Product Alloc Object (Characteristics of Product Alloc Group)
            Plant (Characteristics of Product Alloc Group)
            Customer Group 5 (Characteristics of Product Alloc Group)
        Reward points if helpful.
    Thanks,
    Mich

    Hi,
    You should be able to get the information using the standard BAPI (Assuming you are using SCM5.0) BAPI_APOPAL_INSERT in the transaction BAPI.
    ProductAllocationAPO.DataInsert
    Interface to Import Product Allocation Data  Functionality
    This method is used to adopt data from OLTP systems for product allocation in the global availability check.
    You can do the following using the method:
    Adopt new data
    You can adopt new characteristics combinations or new time series. Newly created characteristics combinations have the status Active and are therefore included in the product allocation check.
    Change existing data
    You can overwrite existing data if you have set the interface parameter ALLOW_UPDATE. You can set the status of existing characteristics combinations to Active if you set the interface parameter UPDATE_STATUS. If the characteristics combination does not exist, the system creates it.
    The product allocation quantity is overwritten for existing time series. If you also want to change the incoming orders quantity, you must set the interface parameter UPDATE_INCOMING_ORDER_QTY. If the time series does not exist, the system creates it.
    Prerequisite
    To be able to use this method, you must have made all the Customizing settings for product allocation. For more information, see the Implementation Guide (IMG) for SAP APO under Global Available-to-Promise -> Product Allocation.
    Regards
    Vinod

  • How to build search help for company code (BUK) in SRM

    Hello,
    I am new to SRM and was wondering if any have come across similar requirement. I am a workflow developer and we are building a custom table to derive deadline escalation timelines. We are also adding a field in our custom table for company code so that we can have company specific deadlines. table T001 is empty in SRM and hence we are unable to use F4 (search help). Is there existing functionality in SRM that gets this search from the backend ECC system and displays when F4 is pressed. How can I use that functinoality?
    Appreciate any info folks.
    Thanks again.
    Samir

    Hi
    Which SRM version are you using ?
    <b>Related links -></b>
    Re: Search Help on SRM front end screen
    F4 Help for WBS Element
    Re: Company Code defaults
    Re: Search help for Custom Item level field
    Custom field in SRM as a dropdown field with values stored in R/3
    Calendar help for Date i/p field in SRM 5.0 shopping cart
    Company code
    Problems assigning values via F4 or search help
    Also There is a standard table in SRM which contains Plant data ->
    <b>BBP_LOCMAP</b> (Mapping Table Business Partner --> System --> Location)
    Try creating a  custom search help based on this Table, defined as selection method and assign the same to the related field.
    Do let me know.
    Regards
    - Atul

  • Change Search help for Location in Schedule creation screen(NWBC)

    Hi all,
    My requirement is to change the standard search help for Location field in Standard stop sequence of Schedule creation in NWBC.
    Presently, the search help for the location field is a webdynpro component WDR_F4_ELEMENTARY .Is there any possibility to replace with the custom search help.
    Can anybody please let me know how to replace the search help.
    Thanks&Regards,
    Sharmista.

    Hi
    I suppose you may create a component customizing for /SCMTMS/WDCC_SCH_C_LOC_ATS, and maintain your DDIC search help for location ID, this will replace the one assigned in structure:
    You may only maintain DDIC search help here, but if you have a custom developed search help, then you may need to go with another approach, in viewexit class (/SCMTMS/CL_UI_VIEWEXIT_SCH) adapt_fields (ADAPT_FIELDS), modify the attribute 'WD_VALUE_HELP' = custom search help.
    Hope it helps

  • Maestro need help also code is 75957252 for bios password reset

    maestro need help also code is 75957252 for bios password reset
    This question was solved.
    View Solution.

    Check your other post. I replied there.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Search Help for Company Code from Backend

    Hi experts,
    How can I make a SH for company code from backend system? I already made a SH for account assigments from backend with USAGE_SH_F4  functioanality, but i don't know whether I can use it for Company code or not? And how?
    Best Regards,
    Mikhail.

    I need functionality where I will manually maintain backend system, and then I need bind search help for this backend system with my input field for web dynpro. For Account Assignment I use this: http://scn.sap.com/community/srm/blog/2014/01/08/standard-account-assignment-search-helps-in-custom-srm-developments
    But what should I use for company code?

  • HI ALL SINCE TWO DAYS I AM DOWNLOADING VIBER BUT I AM NOT HAVING MY ACCESS CODE AND EVERY TIME I DELETE THE APPLICATION AND DOWNLOADING IT AGAIN BUT ALWAYS THE SAME RESULT PLEASE I NEED YOUR HELP FOR THE ACCESS CODE.MY PHONE NUMBER IS 0022996969896.THANKS

    HI ALL SINCE TWO DAYS I AM DOWNLOADING VIBER BUT I AM NOT HAVING MY ACCESS CODE AND EVERY TIME I DELETE THE APPLICATION AND DOWNLOADING IT AGAIN BUT ALWAYS THE SAME RESULT PLEASE I NEED YOUR HELP FOR THE ACCESS CODE.MY PHONE NUMBER IS 0022996969896.THANKS IN ADVANCE

    try this website this should help you http://helpme.viber.com/index.php?/Knowledgebase/List/Index/1/iphone

  • I have an iphone 5 and i just updated it to ios7 and it kept asking for codes and wouldnt accept any and now it just says iphone disconnected.please help

    I have an iphone 5 and i just updated it to ios7 and it kept asking for codes and wouldnt accept any and now it just says iphone disconnected.please help

    Are you attempting to synchronise new or existing photographs between your devices? My Photo Stream can only synchronise new photographs.

Maybe you are looking for

  • Is there anyway to watch my purchased videos from my iPhone/imac to a brand new Samsung smart tv?

    We just purchased a Samsung 3D HD Smart TV. My B-friend has a Samsung Galaxy 3 (poor thing) which syncs beautifully with the TV. We are also Amazon Prime customers. So another great syncing capability. I own an iphone 5 and an Imac. so we can never c

  • Best practice to save file in the database?

    Hallo, in version 10.1.2 there i make a little application which allows to save a file in a table. the column i defined as ordsys.orddoc. than i could use the standard functionality of jdeveloper. is this a good way to do that, or is it better to go

  • Problem integrating slideshowpro flash photo gallery into existing page

    Hi, I have a photo gallery made with slideshow pro which you can see on the page http://theoldfort.com/slideshow/slideshow.html. All the files are located in a directory on the server root called slideshow. However I would like to put this flash anim

  • Horizontal Scroll Bar in Power Pivot?

    Good Afternoon, I have recently installed PowerPivot and began importing my T-SQL queries into it, unfortunately for queries with a large number of columns, I am unable to see a horizontal scroll bar, although I do have a vertical scrollbar.  I can m

  • Adding to the play count number

    Is there a way to add to the playcount without: playing the song and clicking the end of the timeline bar and repeating? I like to keep the playcount, espcially when getting rid of duplicate songs.