How to do implement the FrameAccess.java code in my project

Iam doing an project in java for inserting the videos into oracle9i and searching the inserted videos using the frames of the videos inserted.I have done the project to insert and search the videos.But i have been asked to put an EXTRACT button to extract all the frames of the video being inserted.Please help me to implement the FrameAccess.java coding in my existing coding.I have pasted my coding(VideoInsert.java) and FrameAccess.java(used to extract frames) coding.
The VideoInsert.java when executed will contain browse button to choose the video file(only .mpg files) to be inserted into the database.After selecting the file and when we press open button in the Open dialog box,the video will be played in jmf player in a separate window and the filepath of the video will be included in the textbox.Now what i need is,an extract button should be placed and when it is clicked,the frames of the corresponding selected video has to be extracted in the location where the project files are stored i.e.,the FrameAccess.java coding has to be executed.
Please help me if anyone knows how to implement the above concept.
VideoInsert.java
import javax.swing.*;
import java.util.*;
import java.io.*;
import oracle.sql.*;
import java.sql.*;
import oracle.jdbc.driver.*;
import oracle.sql.BLOB ;
import symantec.itools.multimedia.ImageViewer;
public class VideoInsert extends javax.swing.JFrame {
    private Connection con;
    private Statement st=null;
    private OracleResultSet rs=null;
    int count=0;
    int count1=0;
    ImageViewer displaywindow = new ImageViewer();
    /** Creates new form VideoInsert */
    public VideoInsert() {
        initComponents();
        imgpane.add(displaywindow);
        try {
            DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
            con = DriverManager.getConnection("jdbc:oracle:oci:@","scott","tiger");
              //con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:FIRST","scott","tiger");
            con.setAutoCommit(false);
            st =con.createStatement();
            rs=(OracleResultSet)st.executeQuery("select max(vid) from browsevideo");
            while (rs.next()) {
                count = (rs.getInt(1) + 1);
            rs.close();
            st =con.createStatement();
            rs=(OracleResultSet)st.executeQuery("select max(imageno) from browseimage");
            while (rs.next()) {
                count1 = (rs.getInt(1) + 1);
            rs.close();
        } catch (SQLException e) {
            e.printStackTrace();
        txtvid.setText(String.valueOf(count));
         VideoTypeComboBox.addItem("All");
        VideoTypeComboBox.addItem("Entertainment");
        VideoTypeComboBox.addItem("Sports");
        VideoTypeComboBox.addItem("Animation");
        VideoTypeComboBox.addItem("News");
         VideoTypeComboBox.addItem("Others");
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    private void initComponents() {//GEN-BEGIN:initComponents
        jLabel1 = new javax.swing.JLabel();
        txtvid = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        txtvidfile = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        txtvidinfo = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        txtimgfile = new javax.swing.JTextField();
        vidbrowse = new javax.swing.JButton();
        imgbrowse = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        txtimgcont = new javax.swing.JTextField();
        insert = new javax.swing.JButton();
        imgpane = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        VideoTypeComboBox = new javax.swing.JComboBox();
        getContentPane().setLayout(null);
        setTitle("VideoInsert");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                exitForm(evt);
        jLabel1.setText("Video ID");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(30, 80, 90, 16);
        txtvid.setEditable(false);
        getContentPane().add(txtvid);
        txtvid.setBounds(130, 80, 130, 20);
        jLabel2.setText("VideoFile");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(30, 130, 70, 16);
        getContentPane().add(txtvidfile);
        txtvidfile.setBounds(130, 130, 130, 20);
        jLabel3.setText("VideoInfo");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(30, 180, 80, 16);
        getContentPane().add(txtvidinfo);
        txtvidinfo.setBounds(130, 180, 130, 20);
        jLabel4.setText("TopImage");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(30, 230, 70, 16);
        getContentPane().add(txtimgfile);
        txtimgfile.setBounds(130, 230, 130, 20);
        vidbrowse.setText("Browse");
        vidbrowse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                vidbrowseActionPerformed(evt);
        getContentPane().add(vidbrowse);
        vidbrowse.setBounds(280, 130, 78, 26);
        imgbrowse.setText("Browse");
        imgbrowse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                imgbrowseActionPerformed(evt);
        getContentPane().add(imgbrowse);
        imgbrowse.setBounds(280, 230, 78, 26);
        jLabel5.setText("ImageContent");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(30, 280, 80, 16);
        getContentPane().add(txtimgcont);
        txtimgcont.setBounds(130, 280, 130, 20);
        insert.setText("Insert");
        insert.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                insertActionPerformed(evt);
        getContentPane().add(insert);
        insert.setBounds(150, 400, 81, 26);
        imgpane.setLayout(new java.awt.BorderLayout());
        getContentPane().add(imgpane);
        imgpane.setBounds(410, 120, 350, 260);
        jLabel6.setText("Video Type");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(30, 340, 80, 16);
        getContentPane().add(VideoTypeComboBox);
        VideoTypeComboBox.setBounds(130, 340, 130, 25);
        pack();
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setSize(new java.awt.Dimension(800, 600));
        setLocation((screenSize.width-800)/2,(screenSize.height-600)/2);
    }//GEN-END:initComponents
    private void insertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_insertActionPerformed
        BLOB blb= null;
        PreparedStatement stmt = null;
        OutputStream fout=null;
        File f=null;
        FileInputStream fin=null;
        int bufferSize;
        byte[] buffer=null;
        int bytesRead = -1;
        String sfile1 = txtvidfile.getText();
        String sfile2 = txtimgfile.getText();
        String format=null;
        String format1=null;
        String videoinfo=txtvidinfo.getText();
        String imgcontent=txtimgcont.getText();
        String videoType=(String)VideoTypeComboBox.getSelectedItem();
        if(sfile1.endsWith("avi")) {
            format="avi";
        }else if(sfile1.endsWith("mpg")) {
            format="mpg";
        }else {
            format="mpg";
        if(sfile2.endsWith("jpg")) {
            format1="jpg";
        }else if(sfile2.endsWith("gif")) {
            format1="gif";
        }else {
            format1="jpg";
        if((sfile1.length()>0) && (sfile2.length()>0)) {
            try {
                stmt=con.prepareStatement(" insert into browsevideo values (?,EMPTY_BLOB(),?,?,?)");
                stmt.setInt(1,count);
                stmt.setString(2,format);
                stmt.setString(3,videoinfo);
                 stmt.setString(4,videoType);
                stmt.executeUpdate();
                stmt.close();
                con.commit();
            }catch(Exception e) {
                e.printStackTrace();
            try {
                stmt = con.prepareStatement("Select video FROM browsevideo WHERE vid = ? for update of video");
                stmt.setInt(1,count);
                rs = (OracleResultSet)stmt.executeQuery();
                rs.next();
                blb = rs.getBLOB("video");
                fout = blb.getBinaryOutputStream();
                f = new File(sfile1);
                fin = new FileInputStream(f);
                bufferSize = blb.getBufferSize();
                buffer = new byte[bufferSize];
                while((bytesRead = fin.read(buffer)) != -1) {
                    fout.write(buffer, 0, bytesRead);
                fout.flush();
                fout.close();
                con.commit();
                rs.close();
                stmt.close();
            }catch(Exception e) {
                e.printStackTrace();
            try {
                stmt=con.prepareStatement(" insert into browseimage values (?,?,?,EMPTY_BLOB(),?,?,?)");
                stmt.setInt(1,count);
                stmt.setInt(2,count1);
                stmt.setInt(3,count1);
                stmt.setString(4,imgcontent);
                stmt.setString(5,format1);
                stmt.setString(6,videoType);
                stmt.executeUpdate();
                stmt.close();
                con.commit();
            }catch(Exception e) {
                e.printStackTrace();
            try {
                stmt = con.prepareStatement("Select image FROM browseimage WHERE imageno = ? for update of image");
                stmt.setInt(1,count1);
                rs = (OracleResultSet)stmt.executeQuery();
                if(rs.next()) {
                    blb = rs.getBLOB("image");
                    fout = blb.getBinaryOutputStream();
                    f = new File(sfile2);
                    fin = new FileInputStream(f);
                    bufferSize = blb.getBufferSize();
                    buffer = new byte[bufferSize];
                    while((bytesRead = fin.read(buffer)) != -1) {
                        fout.write(buffer, 0, bytesRead);
                    fout.flush();
                    fout.close();
                    con.commit();
                    rs.close();
                stmt.close();
                count++;
                count1++;
                txtimgfile.setText("");
                txtvidfile.setText("");
                txtimgcont.setText("");
                txtvidinfo.setText("");
                txtvid.setText(String.valueOf(count));
                JOptionPane.showMessageDialog(this,"Successfuly Completed");
            }catch(Exception e) {
                e.printStackTrace();
    }//GEN-LAST:event_insertActionPerformed
    private void imgbrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imgbrowseActionPerformed
        ExampleFileFilter filter1 = new ExampleFileFilter();
        JFileChooser chooser = new JFileChooser();
        filter1.addExtension("jpg");
        filter1.addExtension("gif");
        filter1.setDescription("JPG,GIF Images");
        chooser.setFileFilter(filter1);
        int returnVal = chooser.showOpenDialog(this);
        if(returnVal == JFileChooser.APPROVE_OPTION) {
            txtimgfile.setText(chooser.getSelectedFile().getAbsolutePath());
            try{
                    displaywindow.setImageURL(new java.net.URL("file:"+txtimgfile.getText()));
                    displaywindow.setStyle(ImageViewer.IMAGE_SCALED_TO_FIT);
                }catch(Exception e){
                    e.printStackTrace();
    }//GEN-LAST:event_imgbrowseActionPerformed
    private void vidbrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vidbrowseActionPerformed
       ExampleFileFilter filter2 = new ExampleFileFilter();
       JFileChooser chooser = new JFileChooser();
       filter2.addExtension("avi");
        filter2.addExtension("mpg");
        filter2.setDescription("AVI & MPG Video");
        chooser.setFileFilter(filter2);
        int returnVal = chooser.showOpenDialog(this);
        if(returnVal == JFileChooser.APPROVE_OPTION) {
            txtvidfile.setText(chooser.getSelectedFile().getAbsolutePath());
            VideoAudioPlayer vap=new VideoAudioPlayer(txtvidfile.getText());
    }//GEN-LAST:event_vidbrowseActionPerformed
    /** Exit the Application */
    private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
        setVisible(false);
        dispose();
    }//GEN-LAST:event_exitForm
     * @param args the command line arguments
    /*public static void main(String args[]) {
        new VideoInsert().show();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton imgbrowse;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JTextField txtvid;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JTextField txtimgcont;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel imgpane;
    private javax.swing.JButton insert;
    private javax.swing.JComboBox VideoTypeComboBox;
    private javax.swing.JButton vidbrowse;
    private javax.swing.JTextField txtvidfile;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JTextField txtimgfile;
    private javax.swing.JTextField txtvidinfo;
    // End of variables declaration//GEN-END:variables
FrameAccess.java
import java.awt.*;
import javax.media.*;
import javax.media.control.TrackControl;
import javax.media.Format;
import javax.media.format.*;
import java.io.*;
import javax.imageio.*;
import javax.imageio.stream.*;
import java.awt.image.*;
import java.util.*;
import javax.media.util.*;
* Sample program to access individual video frames by using a
* "pass-thru" codec. The codec is inserted into the data flow
* path. As data pass through this codec, a callback is invoked
* for each frame of video data.
public class FrameAccess implements ControllerListener {
     Processor p;
     Object waitSync = new Object();
     boolean stateTransitionOK = true;
     public boolean alreadyPrnt = false;
     * Given a media locator, create a processor and use that processor
     * as a player to playback the media.
     * During the processor's Configured state, two "pass-thru" codecs,
     * PreAccessCodec and PostAccessCodec, are set on the video track.
     * These codecs are used to get access to individual video frames
     * of the media.
     * Much of the code is just standard code to present media in JMF.
     public boolean open(MediaLocator ml) {
          try {
               p = Manager.createProcessor(ml);
                            } catch (Exception e) {
               System.err.println(
                    "Failed to create a processor from the given url: " + e);
               return false;
          p.addControllerListener(this);
          // Put the Processor into configured state.
          p.configure();
          if (!waitForState(Processor.Configured)) {
               System.err.println("Failed to configure the processor.");
               return false;
          // So I can use it as a player.
          p.setContentDescriptor(null);
          // Obtain the track controls.
          TrackControl tc[] = p.getTrackControls();
          if (tc == null) {
               System.err.println(
                    "Failed to obtain track controls from the processor.");
               return false;
          // Search for the track control for the video track.
          TrackControl videoTrack = null;
          for (int i = 0; i < tc.length; i++) {
               if (tc.getFormat() instanceof VideoFormat) videoTrack = tc[i];
               else     tc[i].setEnabled(false);
          if (videoTrack == null) {
               System.err.println("The input media does not contain a video track.");
               return false;
          String videoFormat = videoTrack.getFormat().toString();
          Dimension videoSize = parseVideoSize(videoFormat);
          System.err.println("Video format: " + videoFormat);
          // Instantiate and set the frame access codec to the data flow path.
          try {
               Codec codec[] = { new PostAccessCodec(videoSize)};
               videoTrack.setCodecChain(codec);
          } catch (UnsupportedPlugInException e) {
               System.err.println("The process does not support effects.");
          // Realize the processor.
          p.prefetch();
          if (!waitForState(Processor.Prefetched)) {
               System.err.println("Failed to realise the processor.");
               return false;
          p.start();
          return true;
     /**parse the size of the video from the string videoformat*/
     public Dimension parseVideoSize(String videoSize){
          int x=300, y=200;
          StringTokenizer strtok = new StringTokenizer(videoSize, ", ");
          strtok.nextToken();
          String size = strtok.nextToken();
          StringTokenizer sizeStrtok = new StringTokenizer(size, "x");
          try{
               x = Integer.parseInt(sizeStrtok.nextToken());
               y = Integer.parseInt(sizeStrtok.nextToken());
          } catch (NumberFormatException e){
               System.out.println("unable to find video size, assuming default of 300x200");
          System.out.println("Image width = " + String.valueOf(x) +"\nImage height = "+ String.valueOf(y));
          return new Dimension(x, y);
     * Block until the processor has transitioned to the given state.
     * Return false if the transition failed.
     boolean waitForState(int state) {
          synchronized (waitSync) {
               try {
                    while (p.getState() != state && stateTransitionOK)
                         waitSync.wait();
               } catch (Exception e) {
          return stateTransitionOK;
     * Controller Listener.
     public void controllerUpdate(ControllerEvent evt) {
          if (evt instanceof ConfigureCompleteEvent
               || evt instanceof RealizeCompleteEvent
               || evt instanceof PrefetchCompleteEvent) {
               synchronized (waitSync) {
                    stateTransitionOK = true;
                    waitSync.notifyAll();
          } else if (evt instanceof ResourceUnavailableEvent) {
               synchronized (waitSync) {
                    stateTransitionOK = false;
                    waitSync.notifyAll();
          } else if (evt instanceof EndOfMediaEvent) {
               p.close();
               System.exit(0);
     * Main program
     public static void main(String[] args) {
//          if (args.length == 0) {
//               prUsage();
//               System.exit(0);
// System.out.print("masoud");
String url = new String("file:F:\\AVSEQ01.mpg");
          if (url.indexOf(":") < 0) {
               prUsage();
               System.exit(0);
          MediaLocator ml;
          if ((ml = new MediaLocator(url)) == null) {
               System.err.println("Cannot build media locator from: " + url);
               System.exit(0);
          FrameAccess fa = new FrameAccess();
          if (!fa.open(ml))
               System.exit(0);
     static void prUsage() {
          System.err.println("Usage: java FrameAccess <url>");
     * Inner class.
     * A pass-through codec to access to individual frames.
     public class PreAccessCodec implements Codec {
          * Callback to access individual video frames.
          void accessFrame(Buffer frame) {
               // For demo, we'll just print out the frame #, time &
               // data length.
               long t = (long) (frame.getTimeStamp() / 10000000f);
               System.err.println(
                    "Pre: frame #: "
                         + frame.getSequenceNumber()
                         + ", time: "
                         + ((float) t) / 100f
                         + ", len: "
                         + frame.getLength());
          * The code for a pass through codec.
          // We'll advertize as supporting all video formats.
          protected Format supportedIns[] = new Format[] { new VideoFormat(null)};
          // We'll advertize as supporting all video formats.
          protected Format supportedOuts[] = new Format[] { new VideoFormat(null)};
          Format input = null, output = null;
          public String getName() {
               return "Pre-Access Codec";
          //these dont do anything
          public void open() {}
          public void close() {}
          public void reset() {}
          public Format[] getSupportedInputFormats() {
               return supportedIns;
          public Format[] getSupportedOutputFormats(Format in) {
               if (in == null)
                    return supportedOuts;
               else {
                    // If an input format is given, we use that input format
                    // as the output since we are not modifying the bit stream
                    // at all.
                    Format outs[] = new Format[1];
                    outs[0] = in;
                    return outs;
          public Format setInputFormat(Format format) {
               input = format;
               return input;
          public Format setOutputFormat(Format format) {
               output = format;
               return output;
          public int process(Buffer in, Buffer out) {
               // This is the "Callback" to access individual frames.
               accessFrame(in);
               // Swap the data between the input & output.
               Object data = in.getData();
               in.setData(out.getData());
               out.setData(data);
               // Copy the input attributes to the output
               out.setFlags(Buffer.FLAG_NO_SYNC);
               out.setFormat(in.getFormat());
               out.setLength(in.getLength());
               out.setOffset(in.getOffset());
               return BUFFER_PROCESSED_OK;
          public Object[] getControls() {
               return new Object[0];
          public Object getControl(String type) {
               return null;
     public class PostAccessCodec extends PreAccessCodec {
          // We'll advertize as supporting all video formats.
          public PostAccessCodec(Dimension size) {
               supportedIns = new Format[] { new RGBFormat()};
               this.size = size;
          * Callback to access individual video frames.
          void accessFrame(Buffer frame) {
               // For demo, we'll just print out the frame #, time &
               // data length.
               if (!alreadyPrnt) {
                    BufferToImage stopBuffer = new BufferToImage((VideoFormat) frame.getFormat());
                    Image stopImage = stopBuffer.createImage(frame);
                    try {
                         BufferedImage outImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
                         Graphics og = outImage.getGraphics();
                         og.drawImage(stopImage, 0, 0, size.width, size.height, null);
                         //prepareImage(outImage,rheight,rheight, null);
                         Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
                         ImageWriter writer = (ImageWriter) writers.next();
                         //Once an ImageWriter has been obtained, its destination must be set to an ImageOutputStream:
                         File f = new File(frame.getSequenceNumber() + ".jpg");
                         ImageOutputStream ios = ImageIO.createImageOutputStream(f);
                         writer.setOutput(ios);
                         //Finally, the image may be written to the output stream:
                         //BufferedImage bi;
                         //writer.write(imagebi);
                         writer.write(outImage);
                         ios.close();
                    } catch (IOException e) {
                         System.out.println("Error :" + e);
               //alreadyPrnt = true;
               long t = (long) (frame.getTimeStamp() / 10000000f);
               System.err.println(
                    "Post: frame #: "
                         + frame.getSequenceNumber()
                         + ", time: "
                         + ((float) t) / 100f
                         + ", len: "
                         + frame.getLength());
          public String getName() {
               return "Post-Access Codec";
          private Dimension size;

check out the java.lang.Runtime and java.lang.Process classes

Similar Messages

  • How to get personnel number of the user in the wd java code in Leave reques

    Hi all,
    we are using the standard Leave Request Applicatin ESS.
    can any one please tell me how to get the personnel number of the user in the WD java code?
    cause i have pass the pernr number to a bapi and get the details.
    please help me its urgent.
    thanks in advance.

    Hi Madhu,
    Create a model for the particular bapi in wd java and acess it in your component. Then pernr parameter will be available in the context and u can pass value for the parameter (pernr) to the model and get the output.
    If you hav any doubt, please let me know.
    Regards,
    Jithin

  • How can I implement the connection pool in my java stored procedure

    my java stored procedures (in database 'B') have to connect to another oracle database ,let's say 'A'. And how can I implement the behavior like the so-called connection pool in my java stored procedure in 'B', as below.
    1. database B, has 2 java stored procedures sp1 and sp2
    2. both sp1 and sp2 connects to databse 'A'
    whatever I call the sp1 and sp2 and the database 'A' always only one connected session from sp1 and sp2 in database 'B'.
    THANKS A LOTS...

    my problem is I have a lots of java stored procedures need to cnnect to the remote oracle db, and I hope the remote db can only have a connected session from my java stored procedures in my local db. I try as below
    class sp{
    static Connection conn=null; //the remote db connection,
    public static void sp1(){...}//procedure 1, using conn
    public static void sp2(){...}//procedure 2, using conn,too
    I can 'see' the 'conn' variable if I invoke the sp1() and sp2() from the same client application(maybe sqlplus). But if I invoke the sp1() from client 'A' and invoke sp2() from client 'B' then the sp1() and sp2() can not see the 'conn' variable for each other. I think it's because the two clients cause oracle to create two instances of the class 'sp' and the sp1() and sp2() located in different instance seperately. Thus the sp1() and sp2() can not see 'conn' for each other. They can only see its own 'conn'.
    To connect to the remote db from the java stored procedure is easy but is it possible to connect to the remote db via database link from the java stored procedure at my local db ? If so, then I also archive my goal .
    BTW , thanks a lots...
    andrew :-)

  • How can I download the full source code for the Java 3D package

    how can I download the full source code for javax.media.j3d
    especially I need the Transform3D.java class.
    thanks a lot
    Meir

    thank you guys I'll try to do so, I suggest you to
    join me.From the one of the (ex-!)Java3D team:
    "I'm glad to see that Sun has decided to officially support an
    open source Java/OpenGL binding, JOGL. Perhaps they will
    eventually decide to make Java 3D open source. However, be
    careful what you wish for. The Java 3D source is huge and
    complex. There are native sections for Solaris, Windows/OpenGL,
    and Windows/Direct3D, plus common code. I don't know how you'd
    open source a build process that requires different pieces of
    the code be built on different machines running different
    operating systems."
    Sounds scary - I hope we're ready for it :)

  • How I would implement the print mehtod?

    I have this code...
    * SinglyLinkedList.java
    * An implementation of the List interface using a
    * singly linked list.
    * (P) 2000 Laurentiu Cristofor
    * Modified (slightly) for s03 by D. Wortman
    // The class SinglyLinkedList provides an implementation of the List
    // interface using a singly linked list.  This differs from the Java
    // class LinkedList, which employs a doubly linked list and includes
    // additional methods beyond those required by the List interface.
    // Note: Included in this file is (at least) a "stub" method for each of
    // the required methods, as well as an implementation of the Node class.
    // This allows the file to compile without error messages and allows
    // you to implement the "actual" methods incrementally, testing as you go.
    // The List interface include some "optional" methods, some of which are
    // included here (see the List API for the meaning of this).
    // Some of the methods are preceded by comments indicating that you are
    // required to implement the method recursively.  Where there are no
    // such comments, you can provide either an iterative or a recursive
    // implementation, as you prefer.
    // There are some methods that you are asked not to implement at all.
    // Leave these as they are here: they are implemented here to just
    // throw an UnsupportedOperationException when they are called.
    // Hint: Read carefully the comments for the interface List in the
    // online documentation (Java API).  You can also take a look at the
    // implementation of the LinkedList class from the API. It uses a
    // doubly linked list and it is different in many places from what
    // you need to do here. However it may help you figure out how to do
    // some things. You shouldn't copy the code from there, rather you
    // should try to solve the problem by yourself and look into that code
    // only if you get stuck.
    import java.util.*;
    public class SinglyLinkedList implements List
      // an inner class: This is our node class, a singly linked node!
      private class Node
        Object data;
        Node next;
        Node(Object o, Node n)
          data = o;
          next = n;
        Node(Object o)
          this(o, null);
        Node( )
          this(null,null);
      private Node head; // the "dummy" head reference
      private int size;  // the number of items on the list
      public SinglyLinkedList()
        head = new Node(); // dummy header node!
      public void add(int index, Object element)
      public boolean add(Object o)
        return true;
      public boolean addAll(Collection c)
        return true;
      public boolean addAll(int index, Collection c)
        return true;
      public void clear()
      // write a recursive implementation here
      public boolean contains(Object o)
        return true;
      public boolean containsAll(Collection c)
        return true;
      public boolean equals(Object o)
        return true;
      // write a recursive implementation here
      public Object get(int index)
        return null;
      // NOT implemented: we don't cover hash codes
      // and hashing in this course
      public int hashCode()
        throw new UnsupportedOperationException();
      public int indexOf(Object o)
        return -1;
      public boolean isEmpty()
        return true;
      public Iterator iterator()
        return null;
      public int lastIndexOf(Object o)
        return -1;
      // Not implemented: The following two operations are not supported
      // since we are using a singly linked list, which does not allow
      // us to iterate through the elements back and forth easily
      // (going back is the problem)
      public ListIterator listIterator()
        throw new UnsupportedOperationException();
      public ListIterator listIterator(int index)
        throw new UnsupportedOperationException();
      // write a recursive implementation here
      public Object remove(int index)
        return null;
      public boolean remove(Object o)
        return true;
      public boolean removeAll(Collection c)
        return true;
      public boolean retainAll(Collection c)
        return true;
      // write a recursive implementation here
      public Object set(int index, Object element)
        return null;
      public int size()
        return size;
      // NOT implemented: to keep the homework reasonably simple
      public List subList(int fromIndex, int toIndex)
        throw new UnsupportedOperationException();
      public Object[] toArray()
        Object[] array = new Object[size];
        Node n = head;
        for (int i = 0; i < size; i++)
            array[i] = n.data;
            n = n.next;
        return array;
      public Object[] toArray(Object[] a)
           // you'll find this piece of code useful
        // it checks the exact type of the array passed as a parameter
        // in order to create a larger array of the same type.
        if (a.length < size)
          a = (Object[])java.lang.reflect.Array.
         newInstance(a.getClass().getComponentType(), size);
         else if (a.length > size)
          a[size] = null;
        Node n = head;
        for (int i = 0; i < size; i++)
            a[i] = n.data;
            n = n.next;
        return a;
      public static void main(String args[])
           System.out.println("Singly Linked List");
           System.out.println();
           SinglyLinkedList l = new SinglyLinkedList();
           l.add("F");
    }        how should I implement the print method?
    should I use the iterator?
    can someone help me, please.
    Thank You
    Ennio

    actually, you would do the same thing for a toString() method as you would for a print() method. You are just going to return a String instead of using i/o. I would use an iterator to walk over your list of Nodes and then call toString() on each object in your list of Nodes.

  • How to Commit table by writting Java code in Managed Bean?

    Hi,
    Can anyone suggest me how to Commit table by writing Java code in Managed Bean?.
    I want to commit table manually after modifying in UI.
    Please suggest me guys.
    Thanks,
    Ramit Mathur

    Hi Friend Copy this two java files with same package of your bean package.
    1,*ADFUtils.java*
    package org.calwin.common.view.utils;(Your package name)
    import java.util.ArrayList;
    import java.util.List;
    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    import javax.el.MethodExpression;
    import javax.el.ValueExpression;
    import javax.faces.context.FacesContext;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.model.binding.DCParameter;
    import oracle.adf.share.logging.ADFLogger;
    import oracle.binding.AttributeBinding;
    import oracle.binding.BindingContainer;
    import oracle.binding.ControlBinding;
    import oracle.binding.OperationBinding;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.uicli.binding.JUCtrlValueBinding;
    * A series of convenience functions for dealing with ADF Bindings.
    * Note: Updated for JDeveloper 11
    * @author Duncan Mills
    * @author Steve Muench
    * $Id: ADFUtils.java 2513 2007-09-20 20:39:13Z ralsmith $.
    public class ADFUtils
    public static final ADFLogger _LOGGER = ADFLogger.createADFLogger(ADFUtils.class);
    * Get application module for an application module data control by name.
    * @param pName application module data control name
    * @return ApplicationModule
    public static ApplicationModule getApplicationModuleForDataControl(String pName)
    return (ApplicationModule) JSFUtils.resolveExpression("#{data." + pName + ".dataProvider}");
    * A convenience method for getting the value of a bound attribute in the
    * current page context programatically.
    * @param pAttributeName of the bound value in the pageDef
    * @return value of the attribute
    public static Object getBoundAttributeValue(String pAttributeName)
    return findControlBinding(pAttributeName).getInputValue();
    * A convenience method for setting the value of a bound attribute in the
    * context of the current page.
    * @param pAttributeName of the bound value in the pageDef
    * @param pValue to set
    public static void setBoundAttributeValue(String pAttributeName, Object pValue)
    findControlBinding(pAttributeName).setInputValue(pValue);
    * Returns the evaluated value of a pageDef parameter.
    * @param pPageDefName reference to the page definition file of the page with the parameter
    * @param pParameterName name of the pagedef parameter
    * @return evaluated value of the parameter as a String
    public static Object getPageDefParameterValue(String pPageDefName, String pParameterName)
    BindingContainer bindings = findBindingContainer(pPageDefName);
    DCParameter param = ((DCBindingContainer) bindings).findParameter(pParameterName);
    return param.getValue();
    * Convenience method to find a DCControlBinding as an AttributeBinding
    * to get able to then call getInputValue() or setInputValue() on it.
    * @param pBindingContainer binding container
    * @param pAttributeName name of the attribute binding.
    * @return the control value binding with the name passed in.
    public static AttributeBinding findControlBinding(BindingContainer pBindingContainer, String pAttributeName)
    if (pAttributeName != null)
    if (pBindingContainer != null)
    ControlBinding ctrlBinding = pBindingContainer.getControlBinding(pAttributeName);
    if (ctrlBinding instanceof AttributeBinding)
    return (AttributeBinding) ctrlBinding;
    return null;
    * Convenience method to find a DCControlBinding as a JUCtrlValueBinding
    * to get able to then call getInputValue() or setInputValue() on it.
    * @param pAttributeName name of the attribute binding.
    * @return the control value binding with the name passed in.
    public static AttributeBinding findControlBinding(String pAttributeName)
    return findControlBinding(getBindingContainer(), pAttributeName);
    * Return the current page's binding container.
    * @return the current page's binding container
    public static BindingContainer getBindingContainer()
    return (BindingContainer) JSFUtils.resolveExpression("#{bindings}");
    * Return the Binding Container as a DCBindingContainer.
    * @return current binding container as a DCBindingContainer
    public static DCBindingContainer getDCBindingContainer()
    return (DCBindingContainer) getBindingContainer();
    * Get List of ADF Faces SelectItem for an iterator binding.
    * Uses the value of the 'valueAttrName' attribute as the key for
    * the SelectItem key.
    * @param pIteratorName ADF iterator binding name
    * @param pValueAttrName name of the value attribute to use
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @return ADF Faces SelectItem for an iterator binding
    public static List<SelectItem> selectItemsForIterator(String pIteratorName, String pValueAttrName, String pDisplayAttrName)
    return selectItemsForIterator(findIterator(pIteratorName), pValueAttrName, pDisplayAttrName);
    * Get List of ADF Faces SelectItem for an iterator binding with description.
    * Uses the value of the 'valueAttrName' attribute as the key for
    * the SelectItem key.
    * @param pIteratorName ADF iterator binding name
    * @param pValueAttrName name of the value attribute to use
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @param pDescriptionAttrName name of the attribute to use for description
    * @return ADF Faces SelectItem for an iterator binding with description
    public static List<SelectItem> selectItemsForIterator(String pIteratorName, String pValueAttrName, String pDisplayAttrName, String pDescriptionAttrName)
    return selectItemsForIterator(findIterator(pIteratorName), pValueAttrName, pDisplayAttrName, pDescriptionAttrName);
    * Get List of attribute values for an iterator.
    * @param pIteratorName ADF iterator binding name
    * @param pValueAttrName value attribute to use
    * @return List of attribute values for an iterator
    public static List attributeListForIterator(String pIteratorName, String pValueAttrName)
    return attributeListForIterator(findIterator(pIteratorName), pValueAttrName);
    * Get List of Key objects for rows in an iterator.
    * @param pIteratorName iterabot binding name
    * @return List of Key objects for rows
    public static List<Key> keyListForIterator(String pIteratorName)
    return keyListForIterator(findIterator(pIteratorName));
    * Get List of Key objects for rows in an iterator.
    * @param pIterator iterator binding
    * @return List of Key objects for rows
    public static List<Key> keyListForIterator(DCIteratorBinding pIterator)
    List<Key> attributeList = new ArrayList<Key>();
    for (Row r: pIterator.getAllRowsInRange())
    attributeList.add(r.getKey());
    return attributeList;
    * Get List of Key objects for rows in an iterator using key attribute.
    * @param pIteratorName iterator binding name
    * @param pKeyAttrName name of key attribute to use
    * @return List of Key objects for rows
    public static List<Key> keyAttrListForIterator(String pIteratorName, String pKeyAttrName)
    return keyAttrListForIterator(findIterator(pIteratorName), pKeyAttrName);
    * Get List of Key objects for rows in an iterator using key attribute.
    * @param pIterator iterator binding
    * @param pKeyAttrName name of key attribute to use
    * @return List of Key objects for rows
    public static List<Key> keyAttrListForIterator(DCIteratorBinding pIterator, String pKeyAttrName)
    List<Key> attributeList = new ArrayList<Key>();
    for (Row r: pIterator.getAllRowsInRange())
    attributeList.add(new Key(new Object[]
    { r.getAttribute(pKeyAttrName) }));
    return attributeList;
    * Get a List of attribute values for an iterator.
    * @param pIterator iterator binding
    * @param pValueAttrName name of value attribute to use
    * @return List of attribute values
    public static List attributeListForIterator(DCIteratorBinding pIterator, String pValueAttrName)
    List attributeList = new ArrayList();
    for (Row r: pIterator.getAllRowsInRange())
    attributeList.add(r.getAttribute(pValueAttrName));
    return attributeList;
    * Find an iterator binding in the current binding container by name.
    * @param pName iterator binding name
    * @return iterator binding
    public static DCIteratorBinding findIterator(String pName)
    DCIteratorBinding iter = getDCBindingContainer().findIteratorBinding(pName);
    if (iter == null)
    throw new RuntimeException("Iterator '" + pName + "' not found");
    return iter;
    * @param pBindingContainer
    * @param pIterator
    * @return
    public static DCIteratorBinding findIterator(String pBindingContainer, String pIterator)
    DCBindingContainer bindings = (DCBindingContainer) JSFUtils.resolveExpression("#{" + pBindingContainer + "}");
    if (bindings == null)
    throw new RuntimeException("Binding container '" + pBindingContainer + "' not found");
    DCIteratorBinding iter = bindings.findIteratorBinding(pIterator);
    if (iter == null)
    throw new RuntimeException("Iterator '" + pIterator + "' not found");
    return iter;
    * @param pName
    * @return
    public static JUCtrlValueBinding findCtrlBinding(String pName)
    JUCtrlValueBinding rowBinding = (JUCtrlValueBinding) getDCBindingContainer().findCtrlBinding(pName);
    if (rowBinding == null)
    throw new RuntimeException("CtrlBinding " + pName + "' not found");
    return rowBinding;
    * Find an operation binding in the current binding container by name.
    * @param pName operation binding name
    * @return operation binding
    public static OperationBinding findOperation(String pName)
    OperationBinding op = getDCBindingContainer().getOperationBinding(pName);
    if (op == null)
    throw new RuntimeException("Operation '" + pName + "' not found");
    return op;
    * Find an operation binding in the current binding container by name.
    * @param pBindingContianer binding container name
    * @param pOpName operation binding name
    * @return operation binding
    public static OperationBinding findOperation(String pBindingContianer, String pOpName)
    DCBindingContainer bindings = (DCBindingContainer) JSFUtils.resolveExpression("#{" + pBindingContianer + "}");
    if (bindings == null)
    throw new RuntimeException("Binding container '" + pBindingContianer + "' not found");
    OperationBinding op = bindings.getOperationBinding(pOpName);
    if (op == null)
    throw new RuntimeException("Operation '" + pOpName + "' not found");
    return op;
    * Get List of ADF Faces SelectItem for an iterator binding with description.
    * Uses the value of the 'valueAttrName' attribute as the key for
    * the SelectItem key.
    * @param pIterator ADF iterator binding
    * @param pValueAttrName name of value attribute to use for key
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @param pDescriptionAttrName name of the attribute for description
    * @return ADF Faces SelectItem for an iterator binding with description
    public static List<SelectItem> selectItemsForIterator(DCIteratorBinding pIterator, String pValueAttrName, String pDisplayAttrName, String pDescriptionAttrName)
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r: pIterator.getAllRowsInRange())
    selectItems.add(new SelectItem(r.getAttribute(pValueAttrName), (String) r.getAttribute(pDisplayAttrName), (String) r.getAttribute(pDescriptionAttrName)));
    return selectItems;
    * Get List of ADF Faces SelectItem for an iterator binding.
    * Uses the value of the 'valueAttrName' attribute as the key for
    * the SelectItem key.
    * @param pIterator ADF iterator binding
    * @param pValueAttrName name of value attribute to use for key
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @return ADF Faces SelectItem for an iterator binding
    public static List<SelectItem> selectItemsForIterator(DCIteratorBinding pIterator, String pValueAttrName, String pDisplayAttrName)
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r: pIterator.getAllRowsInRange())
    selectItems.add(new SelectItem(r.getAttribute(pValueAttrName), (String) r.getAttribute(pDisplayAttrName)));
    return selectItems;
    * Get List of ADF Faces SelectItem for an iterator binding.
    * Uses the rowKey of each row as the SelectItem key.
    * @param pIteratorName ADF iterator binding name
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @return ADF Faces SelectItem for an iterator binding
    public static List<SelectItem> selectItemsByKeyForIterator(String pIteratorName, String pDisplayAttrName)
    return selectItemsByKeyForIterator(findIterator(pIteratorName), pDisplayAttrName);
    * Get List of ADF Faces SelectItem for an iterator binding with discription.
    * Uses the rowKey of each row as the SelectItem key.
    * @param pIteratorName ADF iterator binding name
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @param pDescriptionAttrName name of the attribute for description
    * @return ADF Faces SelectItem for an iterator binding with discription
    public static List<SelectItem> selectItemsByKeyForIterator(String pIteratorName, String pDisplayAttrName, String pDescriptionAttrName)
    return selectItemsByKeyForIterator(findIterator(pIteratorName), pDisplayAttrName, pDescriptionAttrName);
    * Get List of ADF Faces SelectItem for an iterator binding with discription.
    * Uses the rowKey of each row as the SelectItem key.
    * @param pIterator ADF iterator binding
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @param pDescriptionAttrName name of the attribute for description
    * @return ADF Faces SelectItem for an iterator binding with discription
    public static List<SelectItem> selectItemsByKeyForIterator(DCIteratorBinding pIterator, String pDisplayAttrName, String pDescriptionAttrName)
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r: pIterator.getAllRowsInRange())
    selectItems.add(new SelectItem(r.getKey(), (String) r.getAttribute(pDisplayAttrName), (String) r.getAttribute(pDescriptionAttrName)));
    return selectItems;
    * Get List of ADF Faces SelectItem for an iterator binding.
    * Uses the rowKey of each row as the SelectItem key.
    * @param pIterator ADF iterator binding
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @return List of ADF Faces SelectItem for an iterator binding
    public static List<SelectItem> selectItemsByKeyForIterator(DCIteratorBinding pIterator, String pDisplayAttrName)
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r: pIterator.getAllRowsInRange())
    selectItems.add(new SelectItem(r.getKey(), (String) r.getAttribute(pDisplayAttrName)));
    return selectItems;
    * Find the BindingContainer for a page definition by name.
    * Typically used to refer eagerly to page definition parameters. It is
    * not best practice to reference or set bindings in binding containers
    * that are not the one for the current page.
    * @param pPageDefName name of the page defintion XML file to use
    * @return BindingContainer ref for the named definition
    private static BindingContainer findBindingContainer(String pPageDefName)
    BindingContext bctx = getDCBindingContainer().getBindingContext();
    BindingContainer foundContainer = bctx.findBindingContainer(pPageDefName);
    return foundContainer;
    * @param pOpList
    public static void printOperationBindingExceptions(List pOpList)
    if (pOpList != null && !pOpList.isEmpty())
    for (Object error: pOpList)
    _LOGGER.severe(error.toString());
    * Programmatic invocation of a method that an EL evaluates to.
    * The method must not take any parameters.
    * @param pEl EL of the method to invoke
    * @return Object that the method returns
    public static Object invokeEL(String pEl)
    return invokeEL(pEl, new Class[0], new Object[0]);
    * Programmatic invocation of a method that an EL evaluates to.
    * @param pEl EL of the method to invoke
    * @param pParamTypes Array of Class defining the types of the parameters
    * @param pParams Array of Object defining the values of the parametrs
    * @return Object that the method returns
    public static Object invokeEL(String pEl, Class[] pParamTypes, Object[] pParams)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
    MethodExpression exp = expressionFactory.createMethodExpression(elContext, pEl, Object.class, pParamTypes);
    return exp.invoke(elContext, pParams);
    * Sets the EL Expression with the value.
    * @param pEl EL Expression for which the value to be assigned.
    * @param pVal Value to be assigned.
    public static void setEL(String pEl, Object pVal)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
    ValueExpression exp = expressionFactory.createValueExpression(elContext, pEl, Object.class);
    exp.setValue(elContext, pVal);
    * Evaluates the EL Expression and returns its value.
    * @param pEl Expression to be evaluated.
    * @return Value of the expression as Object.
    public static Object evaluateEL(String pEl)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
    ValueExpression exp = expressionFactory.createValueExpression(elContext, pEl, Object.class);
    return exp.getValue(elContext);
    }

  • Urget Help --- Please give me the core java code that connects to UNIX ser

    Can anyone provide the core java code that connects UNIX server after verifying credentials and allow to implements UNIX commands through java program?

    no, you don't want to do that.
    You want to connect yourself, which Java is quite capable of doing, rather than go through some 3rd party client program that's not only specific to a particular operating system but not guaranteed to be installed at any particular machine or if it is to be installed in such a way that you can start it from your Java program.
    And then there's the little matter of figuring out the external API to use that program in the way you intent to (if it has one).

  • How can I get the XSLT source code?

    How can I get the XSLT source code?

    Actually, I want to parse customer reviews for academic purpose.
    I'm trying to follow the links in the customer reviews zone.
    For example:
    In the following page
    http://www.amazon.com/gp/product/customer-reviews/B000LU8A7E/sr=1-1/qid=1180473311/ref=cm_cr_dp_all_helpful/102-2890495-8864146?ie=UTF8&n=1065836&qid=1180473311&sr=1-1#customerReviews
    in the "customer reviews" section, there is a link "next" that gets the next 10 reviews.
    The thing is that I don't know how to imitate its action using java and actually, I'm not sure if it is possible to do that using software.
    I tried to look at the source code that I got using the previous java code I posted and I see that the next link always has the following href attributes "http://www.amazon.com/gp/product/customer-reviews/B000LU8A7E"
    I tried to see if there is any javascript that tells the page which 10 reviews to get but with no success.
    So if anyone knows how to imitate the next link action using software that will sure help me a lot.
    Thanks in advance

  • How can i find the value category code in CJVC

    Hi Gurus
    how can i find the value category code in CJVC and which tables its stored.can any one tell me.please please

    Read TPIK3 in an internal table, then search COEP-KSTAR in this table, with KSTAR between TPIK3-KSTRF and TPIK3-KSTRT, and other keys like Controlling Area and application/component (eg "PS" in project-system as in CJVC or "PM" in Maintenance as in IW33, multiple application use this table). You can also use a FM like PS_FIND_ACPOS_FOR_KSTAR.
    Regards,
    Raymond

  • How can we implement the currency translation in a query definition

    How can we implement the currency translation in a query definition and should it modified for each and every type of currencies

    hi rama krishna
    i think u can not get any translation in Query. this is only for het the report as it is there in tables. if u want to write a report take a help of the Abaper
    hope u goit,assign points if u ok for this
    thanks
    subbu

  • How can i request the actual time code of digital video recorder, i am using RS232 interface for asking actual time code of digital video recording

    how can i request the actual time code of digital video recorder, i am using RS232 interface for asking actual time code of digital video recording

    If you have an RS-232 interface to the digital video recorder, it may be that you can send a command to the video recorder in order to get the time code sent back to your application - you would then read this as a string and then incorporate this data into your program.
    The best source of help will be any documentation you have relating to the serial (RS-232) interface with the digital video recorder. This documentation should have commands that you can send to the recorder and expected response strings that you should get back from the device. This task should be straightforward but can often be frustrating without documentation about the video recorder. This will not be something that you can "guess" - past experience in writing serial communication ap
    plications has shown that a good manual is your best friend.
    Failing this if you have any source code for example programs that have already been written to communicate with the recorder, you might be able to extract the relevant ASCII strings and use them within your application. This is true whether you are using LabVIEW or a text-based language.
    Jeremy

  • How can I pull the BUKRS (company code) value, for a X_USER (sy-uname) inpu

    HI Experts,
    Pls. clarify that, How can I pull the BUKRS (company code) value, for a X_USER (sy-uname) as input?
    ThanQ.

    Check with USRM1 Table
    give user name (Uname ) and you get company code (BUKRS)
    also check with other tables : USRM* in SE11
    Thanks
    Seshu

  • How do I get the restriction pass code off ? I have forgotten the code.

    How do I get the restriction pass code off ? I have forgotten the code.

    I think you mean a restore to factory defaults/new iPad. See:
    iTunes: Backing up, updating, and restoring iOS software

  • How do I disable the "open java script' message box alert?

    How do I disable the 'open java script' message box message box alert?

    Bee Hong-
    What App is showing the message?  If it is Safari, go to Settings-Safari-JavaScript and turn it ON.
    If it is a different App, see if that App is in Settings and has a JavaScript option.
    Fred

  • How can i reset the for digit code?

    how can i reset the for digit code?

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    Forgotten Restrictions Passcode Help
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    Also, see iTunes- Restoring iOS software.

Maybe you are looking for