A numeric or not

hello,
i need to check a constantes of 2 character if it's a NUMBER or not ; is there a MF or a method wich do this.
thank you for help.

data: var type C value '02'.
if var+0(1) ca sy-abcde and var+1(1) ca sy-abcde.
write: its not a character.
endif.

Similar Messages

  • Simple Java Question - How to test if a given string is numeric or not

    Hi Experts,
    I have written one Java program. It fetches user ID from UME. The code is as below:
    Iterator itr = role.getUserMembers(true);
    while (itr.hasNext()) {
    String uniqId = (String) itr.next();
    IUser thisUser = myUserFactory.getUser(uniqId);
    wdComponentAPI.getMessageManager().reportSuccess("here "+thisUser.getUid() );
    Used ID is thisUser.getUid() . I have to find out all user IDs which are numeric.
    Do we have any standard Java program (API) to find out whether thisUser.getUid()  is numeric or not.
    Regards,
    Gary

    Hi
    Just try to parse this string to integer or long number and catch the NumberFormatException.
    Somthing like:
    try
       Integer.parseInt(userIdString);
    catch(NumberFormatException e)
      //do sume thing when user id is not number
    good luck

  • Check if an item's value is numeric or not

    Hello all,
    does anybody know if there exists a funtion in PLSQL to check wether a string is numeric or not? How can this get implemented?
    regards patrick

    Thanks Peter, I was not asumming that null was a number...
    A got a little modification to the code, that considers null as number (if you want so, if not... just replace "length(nvl(strTMP, 0))" with length(strTMP) ) and accept the decimals and negatives as numbers...
    DECLARE
    FUNCTION is_number(str IN VARCHAR2)
    RETURN BOOLEAN IS
    dummy NUMBER;
    strTMP varchar(100);
    BEGIN
    strTMP := translate(str, '1-.,', '1');
    --Validating only digits
    for i in 1..length(nvl(strTMP, 0)) loop
    dummy := TO_NUMBER(substr(strTMP,i,1));
    end loop;
    --Enforcing number meaning, here 1.2.3 and -126-3 will not pass
    dummy := TO_NUMBER(str);
    RETURN TRUE;
    EXCEPTION
    WHEN VALUE_ERROR
    THEN
    RETURN FALSE;
    END is_number;
    BEGIN
    IF is_number('a') THEN
    dbms_output.put_line('a is a number');
    else
    dbms_output.put_line('a is not a number');
    END IF;
    IF is_number('343E3') THEN
    dbms_output.put_line('343E3 is a number');
    else
    dbms_output.put_line('343E3 is not a number');
    END IF;
    IF is_number(null) THEN
    dbms_output.put_line('null is a number');
    else
    dbms_output.put_line('null is not a number');
    END IF;
    IF is_number(100) THEN
    dbms_output.put_line('100 is a number');
    else
    dbms_output.put_line('100 is not a number');
    END IF;
    IF is_number('-1234') THEN
    dbms_output.put_line('-1234 is a number');
    else
    dbms_output.put_line('-1234 is not a number');
    END IF;
    IF is_number('12.34') THEN
    dbms_output.put_line('12.34 is a number');
    else
    dbms_output.put_line('12.34 is not a number');
    END IF;
    IF is_number('1.2.3.4') THEN
    dbms_output.put_line('1.2.3.4 is a number');
    else
    dbms_output.put_line('1.2.3.4 is not a number');
    END IF;
    IF is_number('-12-3.4') THEN
    dbms_output.put_line('-12-3.4 is a number');
    else
    dbms_output.put_line('-12-3.4 is not a number');
    END IF;
    END;
    Just a little bit more work...
    Regards,
    Mike

  • Numeric column not sorting correctly

    I have a datagrid that is populated with square foot numbers.
    When sorted, it sorts by the first numeral and not the total
    number. How can I set the column as number and not char?

    Hi Swimmer4110,
    The lookup type column sort function is working in my environment(RTM version number 15.0.4420.1017), you can create a new simple list with for a test, see if it could be reproduced, or be an isolate issue.
    Also check if list view has sorted by some columns.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Get "javascript(void)" error on numerous, but not all websites

    I'm getting a "javascript(void)" message in my status bar on numerous, but not all websites, accompanied by an inability to utilize FF on these sites; for instance, my company email. It'll log in and load the inbox, but will not open anything that has a hyperlink (read:anything off the primary top page). My only change in the past forever, has been uninstalling noscript (it was blocking EVERYTHING and I simply wasn't able to understand a lot of the functionality).
    I've checked all the blocks and settings til I'm blue in the face, but I do not see what the deal is that's causing my issue.
    == URL of affected sites ==
    http://

    Hello Robert.
    First of all, and although possibly not related to your problem, I will remind you that the version of Firefox you are using at the moment as been discontinued and is no longer supported. Furthermore, it has known bugs and security problems. I urge you to update to the latest version of Firefox, for maximum stability, performance, security and usability. You can get it for free, as always, at [http://www.getfirefox.com getfirefox.com].
    As for your issue, you may be having a problem with some extension or plugin that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?

  • How to check value is numeric or not

    hi how to check whether a value is numeric or not.
    example.  data : x type n.
              x = 12345.
    Now how to check whether X contains numeric value or not.

    Hi,
         If your type is 'N' there is no way that 'X' can have any value apart for numberics (i.e. 0 - 9).
    You can also check that as follows.
    Data: num_list(10) type c value '0123456789',
          x type n.
    X = '12345'.
    This is more useful if your X is of type C.
    if X CO num_list.
    Its only numeric
    else.
    its contains non numeric
    endif.
    Regards,
    Sesh

  • Why is my numeric keyboard not working on windows 7 via boot camp?

    What ever I use the numeric keypad on the Apple Wired Keyboard on Windows 7 boot camp. It does not work. I have to use the number on the above of my letter case part. I tried using the numeric keys on calculator or games. It functions more like fn, home, page down, page up. WTH? Why is it functioning like the keys between the numeric keypad and keyboard? The drivers installed just fine and I got all the windows updates along with apple updates. I even went to keyboard options in boot camp control panel and it still does not work.

    Here is your answer - just found it on MacRumors as I was experiencing the same problem. Ready - got a pen and pencil available: Hit "Clear" lol, yup, that is your on off button for the numeric pad. :-) Be sure to share with others.
    The "Clear" Button is located above the number  7. 65431354684318643516879 <---- numerica keypad fun.

  • Numeric pad not working correctly mainly in Microsoft Word

    I have an Apple keyboard with an integrated numeric pad integrated on the right.
    Since a while I have a problem that some of the keys on the numeric pad do not work anymore. The + does not work at all and the * toggles show/hide ¶.
    It is not in all programmes, Microsoft Word has the problem but Filemaker Pro does not.
    I tried an other KB same result.
    Any ideas how to fix this?

    smithrj wrote:
    It may be a mechanical issue. The keyboard may have issues. Do you have a spare keyboard to troubleshoot and narrow the problem down?
    Hi Ray
    If you look n my original post you will see I covered that.
    +I tried an other KB same result.+
    So answer is yes.

  • Want  to check whether input field in selection-screen is numeric or not

    i have a select -option in  selection-screen  in which user enters a value.i just want to check if this value is numeric then it should  be 18 positions prefixed with zeroes if numeric like 000000000000400000  and needs to be left justified if not numeric like G0032-BTI.
    i check the fourm also but it didn't helped me.
    i m using the code.
    SELECT-OPTIONS : S_MAT FOR CDHDR-OBJECTID,
    LOOP AT S_MAT.
    if  S_MAT ca sy-abcde  .
      shift s_mat left deleting leading space.
    else.
        SHIFT s_mat RIGHT DELETING TRAILING SPACE.
        TRANSLATE s_mat USING '0'.
    ENDIF.
    endloop.
    can anybody help.
    <REMOVED BY MODERATOR>
    thanks
    Edited by: Alvaro Tejada Galindo on Jan 17, 2008 4:00 PM

    I have a solution for you! Try this code below, just copy/paste "as-it-is".
    TABLES: cdhdr.
    DATA: gv_type TYPE dd01v-datatype.
    SELECT-OPTIONS : s_mat FOR cdhdr-objectid.
    AT SELECTION-SCREEN.
      LOOP AT s_mat.
        CLEAR gv_type.
        IF NOT s_mat-low IS INITIAL.
          CALL FUNCTION 'NUMERIC_CHECK'
            EXPORTING
              string_in = s_mat-low
            IMPORTING
              htype     = gv_type.
          IF gv_type NE 'NUMC'.
            MESSAGE e016 WITH 'Not Numeric'.
          ELSE.
            SHIFT s_mat-low LEFT DELETING LEADING: '0', space.
            CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
              EXPORTING
                input  = s_mat-low
              IMPORTING
                output = s_mat-low.
            MODIFY s_mat TRANSPORTING low.
          ENDIF.
        ENDIF.
        IF NOT s_mat-high IS INITIAL.
          CALL FUNCTION 'NUMERIC_CHECK'
            EXPORTING
              string_in = s_mat-high
            IMPORTING
              htype     = gv_type.
          IF gv_type NE 'NUMC'.
            MESSAGE e016 WITH 'Not Numeric'.
          ELSE.
            SHIFT s_mat-high LEFT DELETING LEADING: '0', space.
            CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
              EXPORTING
                input  = s_mat-high
              IMPORTING
                output = s_mat-high.
            MODIFY s_mat TRANSPORTING high.
          ENDIF.
        ENDIF.
      ENDLOOP.
    I hope this solves your problem.
    Cheers,
    Sougata.

  • Changing file name: Numerical sequence not good!

    Im doing imports where I assign a new name to images with numerical sequence after it.
    Problem is LR only lets me start from 1 and not 001.
    Therefor when the files get into the hundreds, the files wont display correctly in Bridge.
    Can you make LR do the sequence starting with 001?

    Absolutely, it can do this.
    In the import dialog's filename box, pull down the list and choose "Edit" to edit your filename preset. You will then be able to create a custom preset with a three digit sequence number.
    I've done exactly this myself.

  • Numeric keypad not working

    The numeric keypad no longer functions with my Apple keyboard when trying to input numbers with Excel or AppleWorks. It has functioned in the past. The screen just freezes. Not sure what might have caused the change. Trying a different known working keyboard with keypad does not work either.
    Would doing a SMU reset help?
    Any suggestions?
    Disk Utilities corrected permissions but the problem persists.

    Thanks for the hint, I found the following:
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh1714.html
    My numeric keypad doesn't work
    The way the numeric keypad works depends on your computer, the keyboard you're using, the application you're working in, and whether the Num Lock key is engaged. Usually, the numeric keypad is used to enter numbers in a document, but in some applications you might be able to use the keypad to navigate (move around in) your document.
    Press the Num Lock key to switch between the ways the numeric keypad functions.

  • Execute query  run fine with numeric data not give result on string data

    Hi master
    Sir I use under blow code for execute query
    sir when I use numeric data then run fine but when I use character data then not give any result
    with numeric run fine
    DECLARE
         DD VARCHAR2(15);
    BEGIN
         DD:=10;
    set_block_property('emp', default_where, 'where DEPTNO='||DD);
    go_block('emp');
    execute_query;
    set_block_property('emp', default_where, '');
    END;
    With character not give any result
    DECLARE
         DD VARCHAR2(15);
    BEGIN
         DD:='SALESMAN';
    set_block_property('emp', default_where, 'where RTRIM(EMPNO)='||DD);
    go_block('emp');
    execute_query;
    set_block_property('emp', default_where, '');
    END;
    Please give me any idea

    bro it is not working on string format coz of the missing quotes. e.g. 'smith' or smith. so the quoted string will be compared. in set_block_property u have to include extra quotes on the variable. e.g.
    set_block_property('emp',default_where,'where ename='''||:emp.ename||'');
    or with conditional statement
    set_block_property('emp',default_where,'where ename='''||:emp.ename||''' and dname='''||dept.deptno||'');
    there i included two extra qoutes before joining ename and in the an extra quote to complete to string. if u would like to debug at runtime to show if the qouted string condition is proper then assign the where clause to a variable and message it up.
    like
    myvariable:='where ename='''||:emp.ename||'';
    message(myvariable);
    message(myvariable);
    set_block_property('emp',default_where,myvariable);
    after the string is quoted properly the execute query will work fine, also use the function upper or lower to compare strings.
    zaibi.

  • Hp pavilion dv7 notebook numeric keypad not working

    The numeric keypad on my hp pavilion dv7 notebook does not work.  I can't get the num lock to work or any of the number keys to respond.

    Hi,
    While this could be a hardware issue, it's always worth trying the following.
    Open windows Control Panel, open Device Manager, expand Keyboards, right click the entry 'Standard PS/2 Keyboard' and select Uninstall.
    Shutdown the notebook.
    Then unplug the AC Adapter and then remove the battery.  Hold down the Power button for 30 seconds.  Re-insert the battery and plug in the AC Adapter.
    Tap away at the esc key as you start the notebook to launch the Start-up Menu and then select f10 to enter the bios menu.  Press f5 to load the defaults ( this is sometimes f9, but the menu at the bottom will show the correct key ), use the arrow keys to select 'Yes' and hit enter.  Press f10 to save the setting and again use the arrow keys to select 'Yes' and hit enter.
    Note:  If the keyboard doesn't work when trying to access or navigate the Bios Menu, then this is probably a hardware fault.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Numerical keyboard not working yosemite

    Hey All,
         I bought my iMac last year, and I also bought an Apple numerical keyboard at the same time. I was not happy with the one the computer came with. When I updated to Yosemite, my Numerical keyboard no longer works unless I plug it into my 2010 Toshiba laptop.
         This is a Problem.
         Does anyone know how to fix this permanently?
         Thanks,
         Jennifer

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Numeric Keypad not working with Forms6i and Netscape4.7 with Linux ??

    Hello everybody.
    trying to make things work, just found that can't make work numeric keypad while using Netscape 4.7 with forms in Linux.
    Does someone can help me??
    Thanks in advance..
    Oxiel

    That's bizarre. I don't think there are any OS X settings that will solve your problem. I would first check to make sure the "Num Lock" key on your keyboard is not set to disable your number pad. Then have a look at the Logitech support website. It's possible you need to download a driver or a patch of some sort. Or your problem might be covered in a FAQ or a knowledge base article there.

  • NUMERIC KEYBOARD NOT WORKING

    MY NUMERIC KEYPAD IS NOT WORKING

    Hello @KIRTHI,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I understand that the numeric keypad is not working on your notebook computer, and I would be happy to assist you in this matter!
    To return the functionality to your numeric keypad, I recommend following the steps in this document on Notebook keyboard troubleshooting (Windows 8). 
    Please re-post with the results of your troubleshooting, and I look forward to your reply!
    Regards
    MechPilot
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks” for helping!

Maybe you are looking for