Fm to Remove chars from tel num

Is there a function module that will delete all special characters and non numeric characters from a telephone number?

Hi ,
This can be easily achieved using a logic.
compare the given data with the string '0123456789'  and ifin comparison you find anything apart from this delete this value.
Sample logic
m_valid = '0123456789'
  m_strlen = STRLEN( phone_number ).
  DO m_strlen TIMES.
    m_char = phone_number+m_pos(1).
    IF m_valid NS m_char.
      phone_number+m_pos(1) = ' '.
    ENDIF.
    m_pos = m_pos + 1.
  ENDDO.
after this condense ur string to remove the spaces.
Regards,
Anuij

Similar Messages

  • Help removing char from midpoint of string using deleteCharAt()

    How do you properly remove a char from a String at its midpoint? My attempt is on Line 80 and it does not want to work.
    I am using [http://java.sun.com/j2se/1.3/docs/api/java/lang/StringBuffer.html|http://java.sun.com/j2se/1.3/docs/api/java/lang/StringBuffer.html] as a reference for deleteCharAt()
    Am I on the right track or should I try something else?
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class Palindromes extends JFrame implements ActionListener
         JPanel centerPanel = new JPanel();
         JLabel enterDataLabel = new JLabel("  Enter a word or phrase with no punctuation: ");
         JTextField enterDataField = new JTextField(15);
         JLabel displayLabel = new JLabel("");
         JLabel spacer = new JLabel("");
         JButton submitButton = new JButton("Check");
         JButton clearButton = new JButton("Clear");
         public static void main(String[] args) throws IOException
              try
                   UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
              catch(Exception e)
                   JOptionPane.showMessageDialog(null,"The UIManager could not set the Look and Feel for this application.","Error",JOptionPane.INFORMATION_MESSAGE);
              Palindromes f = new Palindromes();
               f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
             f.setSize(300,120);
               f.setTitle("Playing with Palindromes");
               f.setResizable(false);
               f.setVisible(true);
         public Palindromes()
              Container c = getContentPane();
              c.setLayout((new BorderLayout()));
            centerPanel.setLayout(new GridLayout(6,1));
                   centerPanel.add(spacer);
                   centerPanel.add(enterDataLabel);
                   centerPanel.add(enterDataField);
                   centerPanel.add(displayLabel);
                   centerPanel.add(submitButton);
                   centerPanel.add(clearButton);
                   submitButton.addActionListener(this);
                   clearButton.addActionListener(this);
                   c.add(centerPanel, BorderLayout.CENTER);
                   addWindowListener(
                         new WindowAdapter()
                             public void windowClosing(WindowEvent e)
                                    int answer = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit?", "Palindromes", JOptionPane.YES_NO_OPTION);
                                     if (answer == JOptionPane.YES_OPTION)
                                          System.exit(0);
         public void actionPerformed(ActionEvent e)
               String arg = e.getActionCommand();
              if(arg == "Check")
                   String word = enterDataField.getText();
                   int wordSize = word.length();
                  int midpoint = wordSize/2;
                   deleteCharAt(midpoint);
                   StringBuffer lastHalf = new StringBuffer(word.substring(midpoint));
                   StringBuffer firstHalf = new StringBuffer(word.substring(0,midpoint));
                   if (lastHalf == firstHalf)
                        displayLabel.setText(word + " is a palindrome!");
                   else
                        displayLabel.setText(word + " is NOT a palindrome!");                    
              if (arg == "Clear")
                   enterDataField.setText("");
                   displayLabel.setText("");
    }

    Looce wrote:
    80 |               deleteCharAt(midpoint);
    82 |               StringBuffer lastHalf = new StringBuffer(word.substring(midpoint));
    83 |               StringBuffer firstHalf = new StringBuffer(word.substring(0,midpoint));line numbering courtesy of GNOME's text editor(replying to self)
    deleteCharAt is an instance method of StringBuffer, so you need to have one to work with. Suggestion: drop lines 82/83 and use String result = new StringBuffer(word).deleteCharAt(midpoint).toString();

  • How can i remove comments from the "tell your frie...

    How can I remove comments from the "tell your friends how you're doing" section?

    Please do a Skype reset.
    Exit Skype : From the system tray >> right click on the skype icon and click "Quit"
    Press WinKey+R
    Type: %appdata% and press Enter.
    Rename the folder "Skype" to "Old_Skype"
    Run Skype.
    You will need your password to re-log on, and re-set any options from default
    Regards,
    Tamim
    Location - Dhaka | Bangladesh - Standard Time Zone: GMT/UTC + 06:00 hour
    If one of my replies has adequately addressed your issue, please click on the “Accept as Solution” button. If you found a post useful then please "Give Kudos" at the bottom of my post, so that this information can benefit others.

  • How to remove the Char.from one Operating Concern

    Hi Guys,
    How to remove the Char. from one Operating Concern.
    I have created one Char. (WWDOC) and moved to Operating Concern (OOCC). Operating Concern is in red status.
    Now, i want to remove that new assigned Char. (WWDOC)from the operating concern (OOCC). I did't find any option in the menu also.
    Appreciate your help.....
    T&R
    VVR

    Hi Sasi,
    Iam not able to push back that char. from my operating concern. In help it is given you have to delete the data contents in the table before pushing back. Please let me know if any other option available.
    Thanks for your reply.
    VVR

  • HT4972 how to remove jailbreak from my iphone4 (5.1)? .. i want the original setting like a new iphone..please tell?

    how to remove jailbreak from my iphone4 (5.1)? .. i want the original setting like a new iphone..please tell?

    To do this you will have to do a restore using iTunes but since you are on ios 5.1 you should just update to 5.1.1 in itunes. Warning this will remove the jailbreak

  • Can anyone tell me how to remove iphoto from screensaver????

    Can anyone tell me how to remove iphoto from screensaver and all photos it has put into screensaver?

    Hi Ann,
    please check this document to determine the correct space for your question:
    Find Topic Spaces on SCN (Forums)
    If you need help moving it, let me know!
    Thanks,
    Kristen

  • Can someone please tell me how to remove norton from my Mac.i am using osx 10.5.8

    Can someone please tell me how to remove norton from my Mac.i am using osx 10.5.8

    Norton Removal Tool (Symantec Uninstaller):
    http://www.symantec.com/business/support/index?page=content&id=TECH103489&locale =en_US

  • How do u remove something from an array (char)

    (sorry im have just started to learn java.)
    if (Character.isWhitespace(inputTextArray[inputTextArray.length - 1]))
    inputTextArray[inputTextArray.length - 1] = null;
    how can i remove the value out of the position of the array im in.

    Once you've created an array, its size is fixed forever, so you cannot remove elements from it.
    What you will need to do is to construct a new array that contains the same text, but with the white space ommitted. Since you won't know how big the new array is until you've gone through the first one, you need something whose size is not fixed at the beginning.
    Given that you're dealing with text, I'd suggest you take a look at StringBuffer.
    Sylvia.

  • How can i remove pictures from my droid turbo without having to use the touch screen on the phone at all?

    how can i remove pictures from my droid turbo without having to use the touch screen on the phone at all?  my screen is cracked and i am waiting on a replacement phone.  as far as i can tell in order to access the phone storage through my computer, i have to use the touchscreen to enable it so that the computer will see it as a camera.  I can't do that as the top half of the touschscreen is unresponsive.  any suggestions?  teaches me to use the backup services offered in the future, but i still need a short term solution for this time.

        I'm sorry to hear your screen is cracked spence425. I know its difficult to use the phone while its damaged. I'm happy you are receiving a replacement device. Have you saved any of your pictures and other data to the cloud? Here is a link about the cloud http://vz.to/1mF0GIx . Unfortunately, you will be unable to remove any data from the phone if the screen is unresponsive but if you are looking to transfer data to your new phone, it would have needed to be saved via the cloud first. Keep us posted.
    Kinquana_VZW
    Follow us on Twitter @vzwsupport

  • How to remove objects from pics using LR...

    I am not a professional photographer and I do not have a whole lot of photo editing knowledge. I started out several years ago using Photoshop elements 5 and eventually learned how to do several things like moving objects around or removing them from a photo, or moving someone's face into a different picture if their eyes were closed and lots of nice editing features. I loved it and still love it. My laptop was getting really old and slow so I just recently purchased a new computer which has windows 8 on it. I loaded my photoshop elements and cannot get it to open or work properly and am wondering if it's because of the windows 8 operating system. So I then decided to purchase a new photo editing software. I decided (quickly.. too quickly) to purchase adobe lightroom just because it had very good reviews online. Now I have several pictures that need to be edited for Christmas and I cannot find any "lasso tool" or any thing similar right now.. I was so used to using the layers and features from the PE and now my heart is broken because I feel so lost and maybe broke at the same time!! This program is soooo different than what I was used to using but I don't even know if I can do the same things with it. EXAMPLE: there is an air conditioner unit in one of the photos I've taken and I was planning on removing it from the picture. Also I was aiming on moving a face over from another picture because of some closed eyes.. Someone please tell me, is this program capable of doing these things or can I only play with the lighting in this? Will I have to spend more of my $$ to get another Photoshop elements to get the features I use?

    These tasks are tasks for Photoshop or Photoshop Elements, not for Lightroom, which is more an image data base.

  • How can I remove malware from my computer?

    I can't go to google mail page. I can't search words with any browser because nothing happen. I think it is malware. I tried spy bot-SD. But no result. Please tel me how can remove malware from my computer.

    Try running malwarebytes, if that doesn't work.
    Simply restore your system to the checkpoint before this happened. It's easy, On Windows 7, I just had to do it to get rid of the rogue program 'Antimalware Doctor'. Go to Start > ALL Programs > Accessories > System Tools > System Restore click next and select the restore point prior to the time the infection occurred. Mine took only 5-7 minutes to run.
    If you don't have Windows 7, you still can get to the System Restore by finding the location of your Accessories, normally System Restore is under this.

  • How can I remove pictures from my ipod touch that were downloaded from my computer?

    Hi... How can I remove pictures from my IPod  (4th generation) that were downloaded from my

    If the pictures were synced from a computer to the iOS device then they are removed the same way.  Connect the device to the computer.  Tell iTunes what to sync and sync.

  • How do i remove tibsearch from my macbook air, i have tried the suggestions of removing plug-ins but i can't seem to get rid of it

    Hi, can anyone tell me how to remove tibsearch from my macbook air, i have tried removing the plug-ins as suggested etc, but nothing seems to work.
    Thanks

    Did you turn off extensions, too? Safari Preferences > Extensions tab

  • HOw Can I remove faces from the URL

    I know that it's in the web.xml file but as soon as i remove the faces part from the file nothing works. Someone please tell me how to properly remove "faces" from the url. Example http:.//localhost:8080/croot/Page1.jsp
    Thanks in advance

    I know that it's in the web.xml file but as soon as i remove the faces part from the file nothing works. Someone please tell me how to properly remove "faces" from the url. Example http:.//localhost:8080/croot/Page1.jsp
    Thanks in advance

  • Error removing data from MDS using WLST

    I'm new at MDS so i want to remove some data which I inserted in the wrong structure....sounds quite easy. After some looking around I should be able to do this using a deployment plan and WLST. I chose the last one as I am not realy familiar yet with deployment plans. I connect with my server and started WLST did the following:
    wls:/offline> connect ('weblogic', 'mypassword' , 't3://localhost:8001')
    Connecting to t3://localhost:8001 with userid weblogic ...
    Successfully connected to managed Server 'soa_server1' that belongs to domain 'MY_DOMAIN'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    wls:/MY_DOMAIN/serverConfig> deleteMetadata(application='soa-infra', server='soa-server1', docs='/apps/deploy/*')The outcome was:
    Location changed to custom tree. This is a writable tree with No root.
    For more help, use help(custom)
    and after a while it closed the WLST connection. Can anyone tell me how I can remove data from my repository or what is going wrong here?
    Thanks in advance

    Hi,
    I think you were getting this error because you had your server name incorrect : soa-server1 instead of soa_server1. Also it might be possible that soa-infra is installed on the different server.
    Regards,
    Neeraj Sehgal

Maybe you are looking for

  • Find duplicate values in a table based on combination of two columns.

    In table which have millions of records - I have a Table B under Schema A and i have to find the duplicate records in a table. My Table B uses the combination of columns to identify the unique values. Scenario is something like this- One SV_Id can ha

  • JTabbedPane, JPane PROBLEM

    Hi!, I have a several problem with JApplet, this is the code: import javax.swing.*; import javax.swing.border.*; import java.awt.event.*; import java.applet.*; import java.io.*; import java.awt.*; public class NuevoApplet extends JApplet{ JMenuBar me

  • Jdeveloper unable to read "extension base" element

    We have a 3rd Party ERP system and using their web services to connect via BPEL. After we import the WSDL in Jdeveloper and try to create variables for input and output payload, we are not seeing the elements that are using "extension base" property.

  • Iphone not uploading from itunes

    Hi, my iphone 4 syncs apps and contacts, however my music and podcasts etc in itunes is not coming across to the phone during the sync.  Can anyone assist?  I have reloaded the phone and lost all music now, although it is all in my itunes library sti

  • Error changing data type to date in column containing blanks

    I am pulling data from an OLAP cube into PowerPivot. My data set contains several date columns wich are formatted as YYYY-MM-DD string values. After successfully importing the data, I am trying to set the data type of these columns to date. Apparentl