Plz help in exception handling

Hello
I am trying to do this exception handling in string to numeric conversion. Everything is working fine except when i enter any number with letters f and d on exception handling doesnt work like for example if i enter 5f or 4 d progam is working fine, but it supposed to show that it is error.
here is the code:
class AlsMark implements ActionListener
        public void actionPerformed(ActionEvent ae)
           try {
            double amount=0;
            amount=Double.parseDouble(tfConvert.getText());
            amount=amount*0.168;
            lbResult.setText(tfConvert.getText()+" mark is "+Double.toString(amount)+" euro");
            validate();
            catch (NumberFormatException nfe)
                System.out.println(tfConvert.getText()+" is not an integer");
               // tfConvert.setText("0");
                JOptionPane.showMessageDialog(null,"Please enter a decimal value","Error",JOptionPane.ERROR_MESSAGE);
    }

The Double.parseDouble() method will accept f (float) and d (double) letters.
Try with:
class AlsMark implements ActionListener
        public void actionPerformed(ActionEvent ae)
           try {
            double amount=0;
            amount=(double)Integer.parseInt(tfConvert.getText());
            amount=amount*0.168;
            lbResult.setText(tfConvert.getText()+" mark is "+Double.toString(amount)+" euro");
            validate();
            catch (NumberFormatException nfe)
                System.out.println(tfConvert.getText()+" is not an integer");
               // tfConvert.setText("0");
                JOptionPane.showMessageDialog(null,"Please enter a decimal value","Error",JOptionPane.ERROR_MESSAGE);

Similar Messages

  • Exception Handling in Java .. Help

    Hi folks I needed some help in exception handling ...
    I know that I could go like this
    public class MyClass
         public static void main(String args[])
              try
              System.out.println(1/0);
              catch(java.lang.Exception e)
                   e.printStackTrace();
    Now what if i want to throw an error for example in C++ we would go like
    try
    throw 1;
    throw 0;
    throw 'A';
    catch (int i) //If exception is of integer type ... you may overload it
    cout << "Integer value thrown and caught \n";
    catch (...) //Unexpected error
    cout << "Some other unexpected exception \n";
    How could i impliment a code such as the above in Java using throw...
    Thanks again folks...

    1. When you post code, use code tags to make it readable. Copy/paste from your original source in your editor (NOT from your earlier post here), highlight the code, and click the CODE button. Use the Preview tab to see how your post will work.
    2. [http://download.oracle.com/javase/tutorial/essential/exceptions/]

  • Jaxrpc compilation exception(plz Help very Urgent Plz)

    Hello there....
    while deploying a simple webservice using deploytool i m getting this error while the application that is being deployed is not even using ejbs....
    i m trying to compile the example given on the forum by Qusay H. Mahmoud, so plz help me to get out from this......
    Thank u ....alll
    distribute: C:\Sun\AppServer\apps\Add.war
    deployment started : 0%
    Deploying application in domain failed; Error while running ejbc -- Fatal Error from EJB Compiler -- jaxrpc compilation exception
    ; requested operation cannot be completed
    !!! Operation Failed !!!
    !!! With The Following Failure Messages !!!
    Deploying application in domain failed; Error while running ejbc -- Fatal Error from EJB Compiler -- jaxrpc compilation exception
    ; requested operation cannot be completed
    Error while running ejbc -- Fatal Error from EJB Compiler -- jaxrpc compilation exception
    [Completed (time=24.0sec, status=13)]
    **********************************************************************

    I had a similar problem with Sun App Server.If you can check the domain/log/Server.log.It explains a valid endpoint address is missing in the deployment.To do this open the deployment tool and click the Implementation class in the tree(Bean Shaped).
    You can see a endpoint tab within which you need to configure the Endpoint address.
    The deployment went fine after this.
    Good Luck !!!

  • I recently buyed totally unlocked sprint iphone which was legally contract free and i am using that phone in india but i am not able to send sms .everything is working fine except sending sms. i have tried everything plz help me !!

    i recently buyed totally unlocked sprint iphone which was legally contract free and i am using that phone in india but i am not able to send sms .everything is working fine except sending sms. i have tried everything plz help me !! i have tried everything i.e. reset iphone /hard reset/network setting reset /sms service no i have also changed but i am still not able to send sms.. please help me as i am really worried .. thank you !!

    I had the same problem.  Kept getting message of waiting for activation or check network connections.  I also tried every solution out there and nothing worked.  This did though:  I download the newest version of itunes (through Internet Explorer - Google Chrome wouldn't work).  It pulled in my entire library thank goodness and then I plugged my iphone 4s into the computer.  I let itunes find it, did a complete backup in icloud, then did a restore.  Entire process took a couple of hours, but I now have imessage and facetime back.  I was about ready to give up on Apple and go get a different phone ~

  • Plz help me how con i handle

    Respected Sir/madem'
    i m new to java.So i don't know how can i handle this problem.plz guide me
    my problem is i m using mysql connector to access my database and made the class (MyConnection.class) that establish the connection but i do not want to give my class that establish a connection to client. i have to store this class on the server for security and use this class in my program to connect to database.
    How can i use class or any file that was stored on server.
    Plz help me i don,t know what ccn i do.

    Chipomasi wrote:
    How do i delete my chat history.
    Please help.
    Hi @Chipomasi,
    You can delete your Chat history by going to Tools>Options in the desktop client; click on the IM and SMS tab; click on IM settings; then show advanced settings; then you can clear the history and modify how long chat history goes back.
    Note that this will not delete the other user's chat history with you, only yours.
    Anthony
    This post was by Anthony- I do not work for Microsoft!
    If this solved your issue - Mark it as a solution! If you like my post - Please add Kudos!
    Spotify Community Profile - Anthony
    Feel free to PM me - Here

  • MySQL Boken Pipe Exception...Plz Help Me Urgently

    Hello Friends....
    When I shifted my Java application which has MySQL(Linux has MySQL - 4.1.21-standard version. ) as a backend on Linux Platform I encountered following exception...
    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: Broken pipe
    STACKTRACE:
    java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2692)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2621)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1552)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2994)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:936)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1030)
    at ServerThread.run(ServerThread.java:98)
    ** END NESTED EXCEPTION **
    its working fine when I tested it on Windows patform with MySql 5.0 as backend.
    Plz Help me. I get struck on thi sproblem from last 2 days.
    //PremInd
    Message was edited by:
    Prem_India
    Message was edited by:
    Prem_India

    Thanks for your response....
    I'm developing chat application. In my server side code I called a thered which listen for all request for that user. The exception is occured in thread. Here is sanpshot of code...
    public class ServerThread extends Thread
    // Variable Declaration
    public ServerThread( Server server, Socket socket, String acntName, String opratorID )
        this.server = server;
        this.socket = socket;
        this.accName1 = acntName;
        this.oprID1 = opratorID;
        try
              Class.forName("com.mysql.jdbc.Driver").newInstance();                
            con = DriverManager.getConnection("jdbc:mysql://localhost/livechatdb","root","");
        catch(Exception ee)
             System.out.println("Break in ServerThread Cons "+ee);
        start();
      public void run()
        String savacc="";
        try
          DataInputStream din = new DataInputStream( socket.getInputStream() );
          DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
          String message;              
          while (true)
            System.out.println("Thread Runnnnnning..");
            message = din.readUTF();           
            System.out.println("~~~~ "+message);
           if(message.startsWith("^%%^"))
                   StringTokenizer stok = new StringTokenizer(message,"~");
                   String rmv1 = stok.nextToken();
                   String cID1 = stok.nextToken();
                   String accNm1 = stok.nextToken();
                   String oprID1 = stok.nextToken();
                   String deptNm1= stok.nextToken();              
                   String IPAddress1 = stok.nextToken();
                   String oprName1 = stok.nextToken();
                   PreparedStatement pStmt1;
                     rs.close();
                   try
                           System.out.println(" Line 9999 99999 ");         
                           pStmt1 = con.prepareStatement("Select status from Customer where custID = ? and accName= ? ");
                            pStmt1.setString(1,cID1);
                            pStmt1.setString(2,accNm1);                      
                           rs = pStmt1.executeQuery();       
                          System.out.println(" Line 100 1000 1000000  ");
                           while(rs.next())
                                  String stat = rs.getString("status");
                                  if(stat.equals("Chat Request"))
                                        /* set status to chatting in Cutomer table */
                                        String strStatus = "Chatting : "+oprName1;                                    
                                        pStmt = con.prepareStatement("Update Customer set status = ? where custID = ? and accName= ? ");
                                        System.out.println (" Line 107              107           107");
                                        pStmt.setString(1,strStatus);                                   
                                        pStmt.setString(2,cID1);
                                   pStmt.setString(3,accNm1);                                                                                    
                                 int i = pStmt.executeUpdate();
                                 System.out.println (" Line 112              112           112 "+i);
                                 dos.writeUTF("^%%^"+"~"+"Y"+"~"+IPAddress1);
                                 server.sendUpdateChatOperTbl(deptNm1,accNm1,cID1,"*",strStatus);                                                            
                                  else
                                        dos.writeUTF("^%%^"+"~"+"N"+"~"+IPAddress1);
                 catch (Exception ex)
                        System.out.println (" Line 131  131   131  "+ex);
           else if(message.startsWith("!O!"))  //chat opr connect
                            // other stuff
    After this line exception occured System.out.println(" Line 9999 99999 "); & it catch at this line System.out.println (" Line 131 131 131 "+ex);
    Thanks.
    Waiting for Reply...

  • Adding "window to a container:illegal argument exception".error plz help

    Thanks to Mr.Andrew and sun for developing the following code for a
    mediaplayer which is implemented in jmf.This is working in core java. But
    when i have converted it to Applet it compiles but an error adding "window
    to a container:illegal argument exception".code is given below plz point
    me where is the error;
    import javax.media.*;
    import java.text.DecimalFormat;
    import java.awt.*;
    import java.awt.FileDialog;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class nwa extends WindowAdapter{
    frameclass frame;
    public nwa(frameclass frame){
    this.frame=frame;
    public void windowClosing (WindowEvent e)
    //User selected close from System menu.
    //Call dispose to invoke windowClosed.
    frame.dispose ();
    public void windowClosed (WindowEvent e)
    //if (player != null)
    //player.close ();
    System.exit (0);
    class frameclass extends JFrame
    frameclass(){
    nwa n=new nwa(this);
    this.addWindowListener(n);                    
    public class PlayerApplet extends JApplet
              implements
    ActionListener,ControllerListener,ItemListener, KeyListener
    frameclass frame=new frameclass();
    Player player;
    Component vc, cc;
    JProgressBar volumeBar;
         JButton fastRewind;
         JButton fastForward;
         JButton play;
    int sizeIncrease = 2;
    boolean invokedStop = false;
         /** Big */
         int progressFontSize=30;
    boolean first = true, loop = false;
    String currentDirectory;
    public void init(){
    JMenu m = new JMenu ("File");
    JMenuItem mi = new JMenuItem ("Open...");
    mi.addActionListener (this);
    m.add (mi);
    m.addSeparator ();
    JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem ("Loop", false);
    cbmi.addItemListener (this);
    m.add (cbmi);
    m.addSeparator ();
    mi = new JMenuItem ("Exit");
    mi.addActionListener (this);
    m.add (mi);
    JMenuBar mb = new JMenuBar ();
    mb.add (m);
    frame.setJMenuBar (mb);
    setSize (200, 200);
         final JPanel p = new JPanel(new GridLayout(1,0,5,5));
              p.setBorder(new EmptyBorder(3,5,5,5) );
              fastRewind = new JButton("<html><body><font size=+"+
    sizeIncrease+ "><<");
              fastRewind.setToolTipText("Fast Rewind");
              fastRewind.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             skipBack();
                        } else {
    JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file
    first!"));
              fastRewind.addKeyListener(this);
              p.add(fastRewind);
              JButton stop = new JButton("<html><body><font size=+"+
    sizeIncrease+ ">&#9632;");
              stop.setToolTipText("Stop");
              stop.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        invokedStop = true;
                        //player.stop();
                        sp();
              stop.addKeyListener(this);
              p.add(stop);
              play = new JButton("<html><body><font size=+"+
    sizeIncrease+ ">>");
              play.setToolTipText("Play");
              play.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             player.setRate(1);
                             st();
                        } else {
    JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file
    first!"));
              play.addKeyListener(this);
              p.add(play);
              fastForward = new JButton("<html><body><font size=+"+
    sizeIncrease+ ">>>");
              fastForward.setToolTipText("Fast Forward");
              fastForward.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             skipForward();
                        } else {
    JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file
    first!"));
              fastForward.addKeyListener(this);
              p.add(fastForward);
              p.addKeyListener(this);
              frame.add(p,BorderLayout.CENTER);     
              add(frame);
    // pack ();
    setVisible (true);
    public void start(){
    st();
    public void stop(){
    sp();
    public void destroy(){
    player.stop();
    player.deallocate();
    public void actionPerformed (ActionEvent e)
                   if (e.getActionCommand().equals("Exit"))
                   // Call dispose to invoke windowClosed.
                   frame.dispose ();
                        return;
         FileDialog fd = new FileDialog (frame, "Open File",
    FileDialog.LOAD);
         fd.setDirectory (currentDirectory);
         fd.show ();
         // If user cancelled, exit.
              if (fd.getFile() == null)
         return;
    currentDirectory = fd.getDirectory ();
              if (player != null)
         player.close ();
         try
         player = Manager.createPlayer (new MediaLocator
    ("file:" +
    fd.getDirectory() +
    fd.getFile()));
         catch (java.io.IOException e2)
    System.out.println (e2);
    return;
         catch (NoPlayerException e2)
    System.out.println ("Could not find a player.");
    return;
              if (player == null)
         System.out.println ("Trouble creating a player.");
         return;
    first = false;
    frame.setTitle (fd.getFile ().toString());
    player.addControllerListener (this);
    player.prefetch ();
    public void controllerUpdate (ControllerEvent e)
    if (e instanceof ControllerClosedEvent)
    if (vc != null)
    remove (vc);
    vc = null;
    if (cc != null)
    remove (cc);
    cc = null;
    return;
    if (e instanceof EndOfMediaEvent)
    if (loop)
    player.setMediaTime (new Time (0));
    player.start ();
    return;
    if (e instanceof PrefetchCompleteEvent)
    player.start ();
    return;
    if (e instanceof RealizeCompleteEvent)
    vc = player.getVisualComponent ();
    if (vc != null)
    add (vc);
    cc = player.getControlPanelComponent ();
    if (cc != null){
         this.add (cc, BorderLayout.SOUTH);
                        this.show();
    public void keyReleased(KeyEvent ke) {
    int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyTyped(KeyEvent ke) {
         int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyPressed(KeyEvent ke) {
              int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
              }else if (keycode==KeyEvent.VK_UP) {
                   st();
              }else if (keycode==KeyEvent.VK_DOWN) {
                   sp();
    public void skipForward() {
    double secs=5;
    double playersecs = player.getMediaTime().getSeconds();
    Time settime = new javax.media.Time(playersecs + secs);
    player.setMediaTime(settime);
    public void skipBack() {
              double secs1=5;
    double playersecs1 = player.getMediaTime().getSeconds();
    Time settime1 = new javax.media.Time(playersecs1 - secs1);
    player.setMediaTime(settime1);
         public void st() {
         player.start();
         public void sp() {
         player.stop();
    public void itemStateChanged (ItemEvent e)
    loop = !loop;
    When i comment add(frame) this error goes but i got a null poiter
    exception
    Plz help
    manu

    Hi Andrew,
    Thanks for ur reply.Sorrry that my code not included in the code block.
    My problem have been solved partly.Now playerapplet is working properly.It can play files from local machine(through open menuitem from file menu) as well as local network (through url menuitem from file menu).
    There is no requirement to play file from internet at present.
    I have given arrow keys to forward/backward/open/close.
    I have now completed my first part of project.Now i have to start the second part ie Controlling arrow keys using a joystick like instrument.The instrument and driver will be provided by my co. and the user is using only this device.Plz help me how to do that.
    The code is given below
    import javax.media.*;
    import java.text.DecimalFormat;
    import java.awt.*;
    import java.awt.FileDialog;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    <APPLET CODE=PlayerApplet.class
    WIDTH=320 HEIGHT=300>
    </APPLET>
    class nwa extends WindowAdapter
         frameclass frame;
         Player player;
         public nwa(frameclass frame,Player player)
          this.player=player;
          this.frame=frame;
         public void windowClosing (WindowEvent e)
          //User selected close from System menu.
          //Call dispose to invoke windowClosed.
          frame.dispose ();
          public void windowClosed (WindowEvent e)
              if (player != null)
                   player.stop();
                player.close ();
                   player.deallocate();
          System.exit (0);
    class frameclass extends JFrame
    Player player;
         frameclass(Player player)
         nwa n=new nwa(this,player);
         this.addWindowListener(n);                    
    public class PlayerApplet extends JApplet
               implements ActionListener,ControllerListener,ItemListener, KeyListener
               Player player=null;
               frameclass frame=new frameclass(player);
                 Component vc, cc;
                 Container f;
                 JProgressBar volumeBar;
                 JButton fastRewind;
              JButton fastForward;
              JButton play;
              int sizeIncrease = 2;
              boolean invokedStop = false;
              /** Big */
              int progressFontSize=30;
                 boolean first = true, loop = false;
                 String currentDirectory;
                 public void init()
                          f=frame.getContentPane();
                         JMenu m = new JMenu ("File");
                         JMenuItem mi = new JMenuItem ("Open...");
                         mi.addActionListener (this);
                         m.add (mi);
                         m.addSeparator ();
                         mi = new JMenuItem ("URL");
                         mi.addActionListener (this);
                         m.add (mi);
                         m.addSeparator ();
                         JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem ("Loop", false);
                         cbmi.addItemListener (this);
                         m.add (cbmi);
                         m.addSeparator ();
                         mi = new JMenuItem ("Exit");
                         mi.addActionListener (this);
                         m.add (mi);
                         JMenuBar mb = new JMenuBar ();
                         mb.add (m);
                         frame.setJMenuBar (mb);
                         setSize (500, 500);
                           JPanel p = new JPanel(new GridLayout(1,0,5,5));
                        p.setBorder(new EmptyBorder(3,5,5,5) );
                        fastRewind = new JButton("<html><body><font size=+"+ sizeIncrease+ "><<");
                        fastRewind.setToolTipText("Fast Rewind");
                        fastRewind.addActionListener( new ActionListener(){
                             public void actionPerformed(ActionEvent ae) {
                                  if (player!=null) {
                                       invokedStop = false;
                                       skipBack();
                                  } else {
                                       JOptionPane.showMessageDialog(play,
                                       new JLabel("Open a sound file first!"));
                        fastRewind.addKeyListener(this);
                        p.add(fastRewind);
                        JButton stop = new JButton("<html><body><font size=+"+ sizeIncrease+ ">&#9632;");
                        stop.setToolTipText("Stop");
                        stop.addActionListener( new ActionListener(){
                                  public void actionPerformed(ActionEvent ae) {
                                       invokedStop = true;
                                       sp();
                        stop.addKeyListener(this);
                        p.add(stop);
                        play = new JButton("<html><body><font size=+"+ sizeIncrease+ ">>");
                        play.setToolTipText("Play");
                        play.addActionListener( new ActionListener()
                                  public void actionPerformed(ActionEvent ae) {
                                       if (player!=null) {
                                            invokedStop = false;
                                            player.setRate(1);
                                            st();
                                       } else {
                                            JOptionPane.showMessageDialog(play,
                                            new JLabel("Open a sound file first!"));
              play.addKeyListener(this);
              p.add(play);
              fastForward = new JButton("<html><body><font size=+"+ sizeIncrease+ ">>>");
              fastForward.setToolTipText("Fast Forward");
              fastForward.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             skipForward();
                        } else {
                             JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file first!"));
              fastForward.addKeyListener(this);
              p.add(fastForward);
              frame.getContentPane().add(p,BorderLayout.CENTER);
              frame.setVisible (true);
              frame.pack();
              frame.setResizable(false);
      public void stop(){
      sp();
      public void destroy(){
       player.stop();
        player.deallocate();
      public void actionPerformed (ActionEvent e)
              if (e.getActionCommand().equals("Exit"))
                             // Call dispose to invoke windowClosed.
                             player.stop();
                             player.close();
                             player.deallocate();
                             frame.dispose ();
                                  return;
              if (e.getActionCommand().equals("Open..."))
                             FileDialog fd = new FileDialog (frame, "Open File",
                                         FileDialog.LOAD);
                              fd.setDirectory (currentDirectory);
                              fd.show ();
                              // If user cancelled, exit.
                              if (fd.getFile() == null)
                             return;
                              currentDirectory = fd.getDirectory ();
                                   if (player != null){
                                       player.close ();
                                       player.deallocate();
                         try
                  player = Manager.createPlayer (new MediaLocator
                                               ("file:" +
                                               fd.getDirectory() +
                                               fd.getFile()));
                              catch (java.io.IOException e2)
                            System.out.println ("file not found :"+e2);
                            return;
                              catch (NoPlayerException e2)
                            System.out.println ("Could not find a player.");
                            return;
                    if (player == null)
                   System.out.println ("Trouble creating a player.");
                   return;
                    first = false;
                    frame.setTitle (fd.getFile ().toString());
                    player.addControllerListener (this);
                    player.prefetch ();
                   return;
              if (e.getActionCommand().equals("URL"))
                             FileDialog fd = new FileDialog (frame, "Open File",
                                         FileDialog.LOAD);
                         fd.setDirectory (currentDirectory);
                         fd.show ();
                         // If user cancelled, exit.
                              if (fd.getFile() == null)
                             return;
                         currentDirectory = fd.getDirectory ();
                              if (player != null){
                                       player.close ();
                                       player.deallocate();
                   try
                        URL url = new URL ("file://"+fd.getDirectory()+fd.getFile());
                    MediaLocator mediaLocator = new MediaLocator (url);
                        player = Manager.createPlayer (mediaLocator);
                   catch (java.io.IOException e2)
                  System.out.println ("file not found :"+e2);
                  return;
                    catch (NoPlayerException e2)
                  System.out.println ("Could not find a player.");
                  return;
                    if (player == null)
                   System.out.println ("Trouble creating a player.");
                   return;
          first = false;
          frame.setTitle (fd.getFile ().toString());
          player.addControllerListener (this);
          player.prefetch ();
              return;
       public void controllerUpdate (ControllerEvent e)
          if (e instanceof ControllerClosedEvent)
              if (vc != null)
                  frame.getContentPane().remove (vc);
                  vc = null;
              if (cc != null)
                  frame.getContentPane().remove (cc);
                  cc = null;
              return;
          if (e instanceof EndOfMediaEvent)
              if (loop)
                  player.setMediaTime (new Time (0));
                  player.start ();
              return;
          if (e instanceof PrefetchCompleteEvent)
              player.start();
              return;
          if (e instanceof RealizeCompleteEvent)
            if (vc != null)
                  remove (vc);
                  vc = null;
              if (cc != null)
                  remove (cc);
                  cc = null;
              vc = player.getVisualComponent ();
              if (vc != null)
                  frame.getContentPane().add(vc,BorderLayout.NORTH);
              cc = player.getControlPanelComponent ();
              if (cc != null){
                       frame.getContentPane().add (cc, BorderLayout.SOUTH);
                     frame.setVisible(true);
                     frame.pack();
    public void keyReleased(KeyEvent ke) {
    int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyTyped(KeyEvent ke) {
         int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyPressed(KeyEvent ke) {
              int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
              }else if (keycode==KeyEvent.VK_UP) {
                   st();
              }else if (keycode==KeyEvent.VK_DOWN) {
                   sp();
    public void skipForward() {
    Time settime;
    double secs=5;
    double playersecs = player.getMediaTime().getSeconds();
    double duration = player.getDuration().getSeconds();
              if((playersecs+secs) < duration){
                      settime = new javax.media.Time(playersecs + secs);
                      player.setMediaTime(settime);
              }else {
                        player.setMediaTime(new Time(duration));
    public void skipBack() {
              double secs1=5;
              double secs2=0;
              double playersecs1 = player.getMediaTime().getSeconds();
              Time settime1;
              if((playersecs1 - secs1) > secs2){
                      settime1 = new javax.media.Time(playersecs1 - secs1);
                      player.setMediaTime(settime1);
              }else {
                        player.setMediaTime(new Time(0));
         public void st() {
         player.start();
         public void sp() {
         player.stop();
       public void itemStateChanged (ItemEvent e)
          loop = !loop;
    With Thanks
    manuEdited by: mm_mm on Nov 27, 2007 11:09 PM

  • OPEN out_cur FOR        SELECT  exception handling help

    Here is the stored procedure for reading a data based on the input, if no data then return null ref cursor and proper error message.
    I am not sure, i am handling proper exception handling ? Please help me to complete this item.
    Thanks.
    PROCEDURE testing
    module IN VARCHAR2,
    module_id IN VARCHAR2,
    out_cur OUT SYS_REFCURSOR,
    out_error_no OUT NUMBER
    BEGIN
    out_error_no := 0;
    CASE
    WHEN module = 'a' AND module_id = 'b' THEN
    BEGIN
    OPEN out_cur FOR
    SELECT id,
    mime_type,
    file_length,
    file_name ,
    uploadeddate,
    created_user ,
    status_name
    FROM l_table_cnt
    WHERE id = module_id;
    EXCEPTION
    WHEN OTHERS THEN
    OPEN out_cur_file_cursor FOR
    SELECT
    NULL id,
    NULL mime_type,
    NULL file_length,
    NULL file_name,
    NULL uploadeddate,
    NULL created_user,
    NULL status_name
    FROM dual
    WHERE 1= 0;
    out_error_no := 2;
    RAISE_APPLICATION_ERROR(-20024,'No Document ');
    END;

    Venkadesh wrote:
    The correct way is to just open the ref cursor and pass it back and then the receiving code that is going to use that cursor handles whether there is any code in it or not. can you please explain with simple exampleIs it really that difficult?
    Ok...
    Here's the procedure to return a ref cursor...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure get_rc(p_deptno in number, p_rc out sys_refcursor) is
      2  begin
      3    open p_rc for 'select * from emp where deptno = :1' using p_deptno;
      4* end;
    SQL> /
    Procedure created.Now we have some application that wants to consume a ref cursor... in this case the application is SQL*Plus, but it could be Java or .NET etc.
    It declares it's local reference to the ref cursor...
    SQL> var r refcursor;then calls the procedure to get a ref cursor reference assigned...
    SQL> exec get_rc(10, :r);
    PL/SQL procedure successfully completed.Now, the application itself determines if there is any data when it comes to actually perform the fetches on it...
    SQL> print r;
         EMPNO ENAME      JOB              MGR HIREDATE                    SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09-JUN-1981 00:00:00       2450                    10
          7839 KING       PRESIDENT            17-NOV-1981 00:00:00       5000                    10
          7934 MILLER     CLERK           7782 23-JAN-1982 00:00:00       1300                    10in the above case it had data, so it displayed it.
    So what if there isn't any data...
    SQL> exec get_rc(90, :r);
    PL/SQL procedure successfully completed.
    SQL> print r;
    no rows selected
    SQL>SQL*Plus (the application that calls the procedure) is the one that has determined that there was not data when it came to fetch it (using the print statement in this case). And when it found there was no data it handled it itself (in this case printing the message "no rows returned").
    The procedure doesn't have to do any overhead of determining if there is data going to be returned or not, because it's not it's responsibility and completely unnecessary. The calling application can easily determine if there is data or not when it starts to try and fetch it.

  • Exception Handling -- Help pls.

    This is the function that calculates cost taking deatils from two other tables .could you help me how handle exception for the second select statement, Which will have no value at some stage and also it will return multiple values.
    CREATE OR REPLACE FUNCTION get_cost_value
    (provis_id number,fyr_id number)
    return number
    as
    commi_id number;
    costperunit number;
    units_p number;
    weeklycost number;
    cost number := 0;
    weeks number;
    pro_s_date date;
    pro_e_date date;
    v_flag varchar2(1);
    begin
    begin
    select actual_start_date, actual_end_date
    into pro_s_date,pro_e_date
    from provisions
    where
         identifier = provis_id;
    exception
    WHEN no_data_found THEN
         v_flag := 'N';
    END;
    [b]for x in
    (select identifier, units_provided
    from cost_commitments
    where
    provis_identifier = provis_id)
    loop
    commi_id := x.identifier;
    units_p := x.units_provided;
    if v_flag != 'N'
    then
    costperunit := to_number(get_rate_value(pro_s_date,provis_id,commi_id));
    weeks := num_weeks(pro_e_date,fyr_id);
    cost := units_p * costperunit * weeks;
    else
    cost := 0;
    end if;
    return cost;
    end loop;
    end;
    /*EXCEPTION
    WHEN no_data_found THEN
    v_flag := 'N';*/

    Isn't it what you need ?
    SQL> var flag char(1);
    SQL> var dept number;
    SQL> exec :flag := 'Y';
    PL/SQL procedure successfully completed.
    SQL> exec :dept := 10;
    PL/SQL procedure successfully completed.
    SQL> declare
      2   cnt number;
      3  begin
      4   for v in (select empno from emp where deptno = :dept) loop
      5    cnt := 1;
      6   end loop;
      7   if cnt is null then
      8    raise no_data_found;
      9   end if;
    10  exception
    11    when no_data_found then
    12     :flag := 'N';
    13  end;
    14  /
    PL/SQL procedure successfully completed.
    SQL> print flag
    FLAG
    Y
    SQL> exec :dept := 100;
    PL/SQL procedure successfully completed.
    SQL> declare
      2   cnt number;
      3  begin
      4   for v in (select empno from emp where deptno = :dept) loop
      5    cnt := 1;
      6   end loop;
      7   if cnt is null then
      8    raise no_data_found;
      9   end if;
    10  exception
    11    when no_data_found then
    12     :flag := 'N';
    13  end;
    14  /
    PL/SQL procedure successfully completed.
    SQL> print flag
    FLAG
    NRgds.

  • Pls help..Constructor,setter, getter and Exception Handling Problem

    halo, im new in java who learning basic thing and java.awt basic...i face some problem about constructor, setter, and getter.
    1. I created a constructor, setter and getter in a file, and create another test file which would like to get the value from the constructor file.
    The problem is: when i compile the test file, it come out error msg:cannot find symbol.As i know that is because i miss declare something but i dont know what i miss.I post my code here and help me to solve this problem...thanks
    my constructor file...i dont know whether is correct, pls tell me if i miss something...
    public class Employee{
         private int empNum;
         private String empName;
         private double empSalary;
         Employee(){
              empNum=0;
              empName="";
              empSalary=0;
         public int getEmpNum(){
              return empNum;
         public String getName(){
              return empName;
         public double getSalary(){
              return empSalary;
         public void setEmpNum(int e){
              empNum = e;
         public void setName(String n){
              empName = n;
         public void setSalary(double sal){
              empSalary = sal;
    my test file....
    public class TestEmployeeClass{
         public static void main(String args[]){
              Employee e = new Employee();
                   e.setEmpNum(100);
                   e.setName("abc");
                   e.setSalary(1000.00);
                   System.out.println(e.getEmpNum());
                   System.out.println(e.getName());
                   System.out.println(e.getSalary());
    }**the program is work if i combine this 2 files coding inside one file(something like the last part of my coding of problem 2)...but i would like to separate them....*
    2. Another problem is i am writing one simple program which is using java.awt interface....i would like to add a validation for user input (something like show error msg when user input character and negative number) inside public void actionPerformed(ActionEvent e) ...but i dont have any idea to solve this problem.here is my code and pls help me for some suggestion or coding about exception. thank a lots...
    import java.awt.*;
    import java.awt.event.*;
    public class SnailTravel extends Frame implements ActionListener, WindowListener{
       private Frame frame;
       private Label lblDistance, lblSpeed, lblSpeed2, lblTime, lblTime2, lblComment, lblComment2 ;
       private TextField tfDistance;
       private Button btnCalculate, btnClear;
       public void viewInterface(){
          frame = new Frame("Snail Travel");
          lblDistance = new Label("Distance");
          lblSpeed = new Label("Speed");
          lblSpeed2 = new Label("0.0099km/h");
          lblTime = new Label("Time");
          lblTime2 = new Label("");
          lblComment = new Label("Comment");
          lblComment2 = new Label("");
          tfDistance = new TextField(20);
          btnCalculate = new Button("Calculate");
          btnClear = new Button("Clear");
          frame.setLayout(new GridLayout(5,2));
          frame.add(lblDistance);
          frame.add(tfDistance);
          frame.add(lblSpeed);
          frame.add(lblSpeed2);
          frame.add(lblTime);
          frame.add(lblTime2);
          frame.add(lblComment);
          frame.add(lblComment2);
          frame.add(btnCalculate);
          frame.add(btnClear);
          btnCalculate.addActionListener(this);
          btnClear.addActionListener(this);
          frame.addWindowListener(this);
          frame.setSize(100,100);
          frame.setVisible(true);
          frame.pack();     
        public static void main(String [] args) {
            SnailTravel st = new SnailTravel();
            st.viewInterface();
        public void actionPerformed(ActionEvent e) {
           if (e.getSource() == btnCalculate){
              SnailData sd = new SnailData();
           double distance = Double.parseDouble(tfDistance.getText());
           sd.setDistance(distance);
                  sd.setSpeed(0.0099);
              sd.setTime(distance/sd.getSpeed());
              String answer = Double.toString(sd.getTime());
              lblTime2.setText(answer);
              lblComment2.setText("But No Exception!!!");
           else
           if(e.getSource() == btnClear){
              tfDistance.setText("");
              lblTime2.setText("");
       public void windowClosing(WindowEvent e){
                   System.exit(1);
        public void windowClosed (WindowEvent e) { };
        public void windowDeiconified (WindowEvent e) { };
        public void windowIconified (WindowEvent e) { };
        public void windowActivated (WindowEvent e) { };
        public void windowDeactivated (WindowEvent e) { };
        public void windowOpened(WindowEvent e) { };
    class SnailData{
       private double distance;
       private double speed;
       private double time;
       public SnailData(){
          distance = 0;
          speed = 0;
          time = 0;
       public double getDistance(){
          return distance;
       public double getSpeed(){
          return speed;
       public double getTime(){
          return time;
       public void setDistance(double d){
          distance = d;
       public void setSpeed(double s){
          speed = s;
       public void setTime(double t){
          time = t;
    }Pls and thanks again for helps....

    What i actually want to do is SnailTravel, but i facing some problems, which is the
    - Constructor,setter, getter, and
    - Exception Handling.
    So i create another simple contructor files which name Employee and TestEmployeeClass, to try find out the problem but i failed, it come out error msg "cannot find symbol".
    What i want to say that is if i cut below code (SnailTravel) to its own file(SnailData), SnailTravel come out error msg "cannot find symbol".So i force to put them in a same file(SnailTravel) to run properly.
    I need help to separate them. (I think i miss some syntax but i dont know what)
    And can somebody help me about Exception handling too pls.
    class SnailData{
       private double distance;
       private double speed;
       private double time;
       public SnailData(){
          distance = 0;
          speed = 0;
          time = 0;
       public double getDistance(){
          return distance;
       public double getSpeed(){
          return speed;
       public double getTime(){
          return time;
       public void setDistance(double d){
          distance = d;
       public void setSpeed(double s){
          speed = s;
       public void setTime(double t){
          time = t;

  • JSP send mail exception,plz help

    Hi,
    I have written code for mail program in jsp but it gives "javax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketException: Connection reset "
    what will be the reason for this plz help.
    thanks

    restart your machine then it s will be corrected...i mean socketexception
    i have found my problem...its a problem about delaying emails like spam protection...ur mail server and and script must run on the same ip...and so my problem solved...
    maybe there is a trick for delaying emails even they dont run under the same ip but i dont know..!

  • Exception Handler Error: Source File Error please help me out

    Hai i have simply added a text field and a button and i am trying to submit the data entered in text field to the database by pressing button.
    It is compiling and running successfully. but when i press the button it is showing that exception handler : Source File error.

    Could you post initial part of the exception displayed in the Error Page. With out it, it is difficult to say what is happening!
    - Winston
    http://blogs.sun.com/winston

  • Abap code.........Plz help me

    Hi all,
    My requirement is
    1. Users will be using the file upload Tcode in BW ( This TCode access will be authorized to specifi users)
    2. ABAP Program need to place the file in the specified folder. Use the Z_FLATFILE_UPLOAD as a start. Copy to New program and work witht he New program
    3. The ABAP program should be able to sent Trigger event after placingt he file to start the Process Chain, in which The flat file should be able to load to the ODS.
    4. On Successful completion of the Process chain, the specific user group should be able to recive the email Message that the uploaded file has been loaded and avaible for reporting.
    The ABAP program should be able to handle the follwing:
    1. If the File Format is not correct the user should get an error message that the file is not in the expected format.
    2. Once the File upload complete, user should see the message that the file uploaded correctly.
    3. on Successful completion of the FileUpload, The program should trigger event.
    and the program Z_FLATFILE_UPLOAD is given below
    REPORT Z_FLATFILE_UPLOAD message-id zx .
    PARAMETERS: FILE_NM LIKE RLGRAP-FILENAME obligatory.
    PARAMETERS: P2 LIKE RLGRAP-FILENAME
    DEFAULT '/Userdata/IFIN/0557'.
    DATA: INRECORD_COUNT TYPE i,
    OUTRECORD_COUNT TYPE i.
    DATA : MASK(20) TYPE C VALUE ',. ,..'.
    DATA: BEGIN OF ITAB OCCURS 0,
    RECORD(3000),
    END OF ITAB.
    AT selection screen help and F4 statements
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE_NM.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = ' '
    DEF_PATH = FILE_NM
    MASK = MASK
    MODE = 'O'
    TITLE = 'File Select'
    IMPORTING
    FILENAME = FILE_NM
    EXCEPTIONS
    INV_WINSYS = 04
    NO_BATCH = 08
    SELECTION_CANCEL = 12
    SELECTION_ERROR = 16.
    IF FILE_NM = ' ' AND SY-SUBRC = 12.
    SET CURSOR FIELD 'FILE_NM'.
    MESSAGE I000(ZX) with 'File Selection cancelled.'
    'Please select a valid file to proceed'.
    ELSEIF SY-SUBRC NE 0.
    MESSAGE E000(ZX) WITH FILE_NM.
    EXIT.
    ENDIF.
    START-OF-SELECTION.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILENAME = FILE_NM
    TABLES
    DATA_TAB = ITAB.
    if sy-subrc <> 0.
    message i000(ZX) with 'Upload Failed'.
    LEAVE LIST-PROCESSING.
    endif.
    *editor-call for input_rec.
    OPEN DATASET P2 FOR output IN text mode encoding default.
    IF SY-SUBRC <> 0.
    message i000(ZX) with 'COULD NOT OPEN THE FILE'.
    LEAVE LIST-PROCESSING.
    ENDIF.
    INRECORD_COUNT = 0.
    OUTRECORD_COUNT = 0.
    LOOP AT ITAB. .
    INRECORD_COUNT = INRECORD_COUNT + 1.
    TRANSFER ITAB-RECORD TO P2.
    OUTRECORD_COUNT = OUTRECORD_COUNT + 1.
    ENDLOOP. "itab
    END-OF-SELECTION.
    CLOSE DATASET P2.
    IF SY-SUBRC <> 0.
    message e000(ZX) with 'COULD NOT OPEN THE FILE'.
    ENDIF.
    WRITE: / '# of records read ', INRECORD_COUNT,
    / '# of records transfered', OUTRECORD_COUNT.
    WRITE:/ 'upload filename', FILE_NM.
    WRITE:/ ' aix filename', P2.
    after this code i need to trigger my event can any onle tell me the steps after this program and the code also please
    thanks in advance
    Sri
    points will be assigned

    Hey,
    This forum is used to get some ideas/tips when you stcuk at some point during the development. This is not a place to send your work & expecting somebody to do it for you.
    see similar funny thread
    plz help me

  • Exception Handling in Message Mapping and Alert

    Hello,
    1. Pls let me know the concept of Exception Handling and Alerts.
    2. Pls provide some blogs for Exception Handling in Message Mapping.
    3.What are Alerts and how it help us in XI. Pls provide some blogs for Alert
    4.How are Alerts and Exception Handling can be related say for some scenario
    Regards

    Hi,
    Plz check out these blogs of Sravya on Error Handling:
    /people/sravya.talanki2/blog/2006/11/22/error-handling-framework-xiout-of-the-box-episode-1
    /people/sravya.talanki2/blog/2006/11/23/error-handling-framework-xiout-of-the-box-episode-2
    Also check this SAP Presentation:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9418d690-0201-0010-85bb-e9b2c1af895b
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    Error Handling :
    http://help.sap.com/saphelp_nw04/helpdata/en/56/b46c3c8bb3d73ee10000000a114084/frameset.htm
    Alerts:
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    http://help.sap.com/saphelp_nw04/helpdata/en/56/d5b54020c6792ae10000000a155106/content.htm
    BPM:
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    Working with acknowledgements
    regards

  • 'FTP_R3_TO_SERVER' giving sy-subrc = 3 plz help me points must be given

    Dear   ,
    when i am trying to send data in internal table of type charterter declared below(i.e iresult) to FTP SERVER program giving the DATA ERROR = 3 when 'FTP_R3_TO_SERVER'  fuction module is exected and file it not creating in ftp server . plz help me pointS must be given .
    the FTP_CONNECT ,FTP_COMMAND function modules are executing properly giving handle 1 and its sy-subrc = 0 .
    when 'FTP_R3_TO_SERVER'  is executed it is giving SY-SUBRC = 3 ( DATA ERROR ) i.e it is failing to out internal table data in FTP SERVER . PLZ HIDE ME ITS URGENT .
    THIS IS CODE I USED .
      DATA :     BEGIN OF iresult OCCURS 5,
            rec(450),
           END OF iresult,
      DATA  :
              dest LIKE rfcdes-rfcdest VALUE 'SAPFTP',
              compress TYPE c VALUE 'N',
              host(64) TYPE c.
      DATA: hdl TYPE i.
      DATA: BEGIN OF result OCCURS 0,
            line(100) TYPE c,
            END OF result.
      DATA : key TYPE i VALUE 26101957 ,
             dstlen TYPE i,
             blob_length TYPE i.
      host = p_host .
      DESCRIBE FIELD p_password LENGTH dstlen IN CHARACTER MODE.
      CALL 'AB_RFC_X_SCRAMBLE_STRING'
        ID 'SOURCE'      FIELD p_password    ID 'KEY'         FIELD key
        ID 'SCR'         FIELD 'X'    ID 'DESTINATION' FIELD p_password
        ID 'DSTLEN'      FIELD dstlen.
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = p_user
          password        = p_password
          host            = host
          rfc_destination = dest
        IMPORTING
          handle          = hdl
        EXCEPTIONS
          not_connected   = 1
          OTHERS          = 2.
      IF sy-subrc = 0.
        CONCATENATE 'cd' ftppath INTO ftppath SEPARATED BY space .
        CALL FUNCTION 'FTP_COMMAND'
          EXPORTING
            handle        = hdl
            command       = ftppath
          TABLES
            data          = result
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
        IF sy-subrc = 0 .
          CLEAR result .
          REFRESH result .
          CALL FUNCTION 'FTP_COMMAND'
            EXPORTING
              handle        = hdl
              command       = 'ascii'
            TABLES
              data          = result
            EXCEPTIONS
              command_error = 1
              tcpip_error   = 2.
          IF sy-subrc = 0 .
            DESCRIBE TABLE iresult LINES lines.
            blob_length =  lines * width .
            clear : lines.
    Delete the existing file
         CONCATENATE 'del' ftpfile INTO delfile SEPARATED BY SPACE.
          CALL FUNCTION 'FTP_COMMAND'
            EXPORTING
              handle        = hdl
              command       = delfile
            TABLES
              data          = result
            EXCEPTIONS
              command_error = 1
              tcpip_error   = 2.
    *End of deleting the existing file
            CALL FUNCTION 'FTP_R3_TO_SERVER'
              EXPORTING
                handle        = hdl
                fname         = ftpfile
                blob_length   = blob_length
              TABLES
                blob          = iresult
              EXCEPTIONS
                TCPIP_ERROR   = 1
                COMMAND_ERROR = 2
                DATA_ERROR    = 3
                OTHERS        = 4.
            IF sy-subrc <> 0 .
              WRITE 'Error in writing file to ftp' .
            ELSE.
              WRITE 'File downloaded on the ftp server successfully'.
            ENDIF.
          ENDIF.
        ELSE.
          WRITE : 'Path on ftp not found : ' , ftppath .
        ENDIF.
        CALL FUNCTION 'FTP_DISCONNECT'
          EXPORTING
            handle = hdl.
        CALL FUNCTION 'RFC_CONNECTION_CLOSE'
          EXPORTING
            destination = 'SAPFTP'
          EXCEPTIONS
            OTHERS      = 1.
      ELSE.
        WRITE 'Could not connect to ftp' .
      ENDIF.
    ENDFORM.                    " FTPFINANCEACCESS_DOWNLOAD
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'PASSWORD'.
          screen-invisible = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Edited by: manoj kv on Feb 21, 2008 7:51 AM
    Edited by: manoj kv on Feb 21, 2008 10:31 AM
    Edited by: manoj kv on Feb 23, 2008 5:22 AM
    Edited by: manoj kv on Feb 23, 2008 2:59 PM

    Dear ,
    i exected RSFTP005 program and i got this below output .
    SAPFTP check
    Check RFC destination SAPFTP...
    ... OK.
    Ping RFC destination SAPFTP...
    ... OK.
    Check RFC destination SAPFTPA...
    ... OK.
    Ping RFC destination SAPFTPA...
    ... OK.
    in our previous discussion u told me that "You will get that file is not in proper format or it might be empty i.e. structure dose not support "
    plz tell me how u r telling that file will not get in proper order and which structure does not support .
    my client given issue that whole data storing in single line .
    plz do the needful help. points must be rewarded  .
    thanking u .
    Edited by: manoj kv on Feb 25, 2008 5:56 AM
    Edited by: manoj kv on Feb 26, 2008 9:38 AM
    Edited by: manoj kv on Feb 28, 2008 8:04 AM

Maybe you are looking for

  • How can i remove them from my purchased(no hidden them)and my account for ever?

    hello I got a few free app before and did not download them completely and dont want to do this, but they stay in my purchased and start automatly when i connect to itunes store and going to crazy me How can i remove them from my purchased(no hidden

  • How do I set a password for my network?

    I want to password protect my network which is shared over Airport Express. How do I create and apply a password so my internet connection can be used only by people who know the password?

  • How do I change the date format?

    Sorry, but I'm new to Oracle! I'm using "sqlplusw" to build my SQL statements. When I return columns that are date fields, I get the DD-MON-YY format. I want dates to be returned in "YYYY-MM-DD HH24:MI:SS". My DBA won't change the date format on the

  • Apps Install Location Doesnt do anything?

    I had CS6 installed on my machine in the C drive (125GB SSD) This was done with the very first cloud installer. I uninstalled it as I have a new SSD that I want my apps to be installed on. I just want my OS on the C drive. I donwload the cloud manage

  • Cannot import some of my pictures (import failed, contains no valid data)

    I have about 100 photos on my Blackberry Curve 8300 which I tried to import into iPhoto 08 (7.1.3) today. It imported 18 and could not import the rest. The first error message was something like file contains invalid data or no valid data. After I re