How to check whether a field contains at least one numeric value

how to check whether a field contains at least one numeric value..

Hi,
I hope that this code will works.
constants:
   c_digit_grp        TYPE char11         VALUE '0123456789',        " Digit group
* Data Declaration
data :
  str   type string.
* if you want check entire string and pass entire string
if  str CA c_digit_grp.
* write your logic ---this block will execute atleast one numeric value exists in the string
Endif.
Regards
Bhupal Reddy

Similar Messages

  • How to Check whether incoming field is Alpha or Nuemeric in Mapping

    Hi all,
    I have the logic like this
    If the incoming Location code value is totally Alpha means i have to concatenate  Location code and the last three digits of Delivery No. else pass the location code as it is
    Regards

    Hi Vamsi,
    use this UDF it will work fine ,i tested in eclipse
       Fist pass the two arguments as input to UDF one is LocationCode and Delivery No
       (String LCode,String DevNo,Container.)
    if (LCode.matches("[a-zA-z]")) {*
    Sring Out = LCode+Dev.substring(0,3);
    return Out;
    else
    return LCode;
    let me know the length of Delivery Number,if it is constant value then you need to chnage the substing function index.

  • 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.

  • How to check if a field is hidden or disabled?

    I have implemented a progress bar, however, it counts all the fields in the form including hidden and disabled fields as well. I need to figure out how to check whether a field is hidden or disabled, and not count them for the progress bar. Please help!

    Try this (javascript):
    if (field.presence == 'visible' && field.access == 'open') {
         include in count...

  • I need to add check whether 21 fields of a internal table are empty or not.

    Hello,
    I need to add check whether 21 fields of a internal table are empty or not.How can we write a code for the same wand what would be the correct syntax for it.
    I tried entering all the fields in the IF loop with AND condition but its giving syntax error.Perhaps this is because the lenght of the IF condition would be more than the allowed one.

    Hi,
    After the select quiery.
    If not itab is initial.
    Message 'Table is not empty'    type 'I'.
    Endif.
    Regards,
    Jagadish.

  • How to judge whether the chars contain only number and letter

    how to judge whether the chars contain only number and letter, for example :
    'AEs4386' is valid , but '‘´‘¼ew78' is not
    thanks for your help !

    Hi,
    try the following:
    data: l_test(36) type c.
    concatenate sy-abcde '0123456789' into l_test.
    l_test contains all letters all numbers now
    translate YourVariable to upper case.
    YourVariable contains only upper case letters
    check YourVariable co l_test. " or use if instead of check
    YourVariable contains only letters or numbers
    regards
    Siggi

  • R12.1.1 staging complete! How to check whether the stage is Good

    Hi Gurusl,
    I have completed staging R12.1.1 for Hp unix B.11.31. I want to know how to check whether the stage is good for installation or whether it is corrupted. Is there any metalink note or script from where we can check it. Ur help will be highly appreciated. Thanks in advance
    regards,

    Hi,
    Please refer to (Note: 802195.1 - MD5 Checksums for R12.1.1 Rapid Install Media).
    Regards,
    Hussein

  • How to check whether transport path exist between two systems in sld??

    Hi,
         I have two systems namely 'A' and 'B' and created business systems for both of them.Then i created transport path between the two systems.How i check whether what i have done is right in SLD.

    <b>WRT to CMS</b>
    am not sure with this but u can try:
    1. Start CMS: http://<host>:<J2EE Engine http port>/webdynpro/dispatcher/sap.com/tcSLCMS~WebUI/Cms.
    2. Goto lansdscape configurator and check there
    Message was edited by:
            Prabhu  S

  • How to check whether follow on document is created for sc or po,is there any table or fm available?

    How to check whether follow on document is created for sc or po,is there any table or fm available?

    Hello Venu
    Check FM: BBP_PD_SC_GETDETAIL and BBP_PD_PO_GETDETAIL table E_HEADER_REL
    Check this: SRM Shopping cart and PO tables link
    Regards

  • How to check whether there r new txt files in a folder n file creation date

    How to check whether there r new text files in a specified folder and what is the date of creation of the text file.........?

    Hi
    I have been searching for a solution to find the date of creation of a file for over 6 months now but haven't found it. So I presume that it is not possible though I havent found any authentication of my assumption in any document.
    Cheers!
    Shailesh

  • How to check a checkbox field value in fw9 PDF form

    Hi,
    I got a PDF given form IRS (http://www.irs.gov/pub/irs-pdf/fw9.pdf). While creating a widget to this pdf form to sign it, I merged the custum data to those PDF form fields using API setMergeFields.
    All the data fields are merged fine except the checkboxes. I tried by passing the values to the merge_fields array as 'On', '1', 'checked', 'checkbox(checked)' but no luck
    What is wrong here in checking the chexbox field in this fw9 PDF or How to check a checkbox field in a form?
    Thank you,

    Hi Simon,
    I re-added and edited the fields of fw9 form by pdf printer. While doing so, I made fields as ready only so that, the data cannot be edited in the form through the widget but will be merged the data to fields only be the code. Wherein Im using the widget only for signature but not for form filling.
    Here, Im able to merge my custom data to all fields while creating widget but not to the fields of checkboxes. The checkboxes fields which are made ready-only are not allowing me to merge the value as checked by the API.
    Please help me,
    Thanks you,

  • How to identify whether a multiline container is empty or not in Workflow?

    Hi Experts,
    Does any1 know how to identify whether a multiline container
    is empty or not in a workflow?
    Thanks.
    Points wil be rewarded.
    Vincent

    Dear Vincent,
    You can get the report name for the Business Object which contains the multi-line container, from the BO itself. Put a break-point in the report and try executing the workflow. The multiline container is like an internal table in the report. See if the internal table is initial while execution.
    Regards,
    Michael.

  • How to check whether calendar is being used in any of the sap application

    Hello All,
    We are having few factory calendars. However some of the calendar having valid to year 2010. Can you please let me know how to check whether these calendar is being used in any of the sap application/module
    kindly reply as early as possible
    Regards
    Girish

    Hi RKS
    yesterday BLOG by our SUMMER WANG helps every SRM consultant to debug the PO error
    /people/summer.wang/blog/2010/05/11/trouble-shooting-of-srm-po-transfer-error
    Good work Summer wang !!
    Muthu

  • How to check Whether the File is in Progress or used by some other resource

    Hi All,
    I am retrieving a file from the FTP server using Apache commons FTP.
    I need to check whether the file is fully retrieved or in progress.
    for now i can able to use the file which is partially retrieved. it is not throwing any file sharing exception or i am unable to find whether it is in progress.
    How to check whether the file is in progress ? or The file is accessed by some other resource ?
    Pls Help me.
    Thanks,
    J.Kathir

    Hi Vamsi,
    Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .
    In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.
    The file adapter will wait for its turn and then write the files.
    Regards
    joel
    Edited by: joel trinidade on Jun 26, 2009 11:06 AM

  • How to check whether my sol man installation is on sol man 7.0 or?

    Hellol All,
    Can anyone help me How to check whether my sol man installation is on sol man 7.0 or sol man 7.0 EHP1.
    Thank you,
    Srihari

    Hi,
    Your system status should tell you that. Any logged in screen of your solution manager system --> Status. Component Version should be as "SAP EHP 1 for SAP Solution Manager 7.0" to be Ehp1 or "SAP Solution Manager 7.0"
    Hope this answers your question.
    Feel free to revert back.
    -=-Ragu

Maybe you are looking for

  • Spaces in between images ; textbox help

    in my dreamweaver HTML page, after i insert say like, 5 images, they clump all together, and i'm unable to separate them (like how i'd be able to do them in microsoft powerpoint) is there anyway that will enable me to freely shift around these images

  • Unable to check download status on nokia browser o...

    i have nokia 5233..nd the nokia browser has a downloads section in the options, where one can check the status of downloaded items whether they are downloaded or are currently downloading. My problem is, when i download something, i cannot open the d

  • Moving presets from old Mac.

    I just got a new computer. I re-downloaded Lightroom 2 from my Adobe purchase history. Now I need to be able to access my old presets and library. How do I move these over? NEED HELP ASAP.

  • Cannot upgrade adobe flash player (failed to initialize), shockwave flash does not appear as a plug in

    various web sites stated that I needed to update adobe flash player. I clicked on link and followed instructions, then received the message "installation encountered errors - failed to initialize". So far, I have uninstalled previous versions of flas

  • Plug ins / new garageband

    hey guys. where can i find my plug ins in the new GB? they used to be in the column on the right hand side, now i cant find them, please help? i cant change my guitar tone or drum tone anymore