Check field

I have an Item on screen with data type char,
When user input as numeric I will display lov using search key customer number
but if user input as character I will display lov using seach key customer name
Are there a function to know that user input as number or alpha ?
ex. when user input 23456 -> I want to catch it as anumeric,
when user input ABCD ->I want to catch it as character.
Anybody can help ??? I use form61
Thank.

I think you can create a function to achieve it.
If the following function returns null (meaning exception is raised) then input has character in it otherwise number is returned. Hope this Helps.
create or replace function isnumber
(p_num in varchar2)
return number
as
x number;
begin
x := to_number (p_num);
return x;
exception
when others then
return null;
end isnumber;

Similar Messages

  • Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    1. Use the mouse to select the field and then press the space bar.
    2. A null string is the same as zero. What is the result for division by zero?

  • CHECK FIELDS functionality

    Hello From google, i came to know that, CHECK FIELDS functionality is not available for SAP WebDynPro for ABAP in perspective of Interactive Forms, its availabel only for SAP WebDynPro JAVA stack. But, as per our busienss requirements, i need to have the similar functionality on our form, 1) Do i need to write the script explicitly on the form? 2) To get CHECK FIELDS validation functionality for all the fields on the form (its around 67 subForms and 158 fields) in one shot ( meaning, user pressess it at the end after filling all the fioelds on the form), then, where i need to write my code/script, is it on the form as script? 3) If so, at wht level i have ti write, is it each subForm level? or each PAGE level? or MASTER PAGE level? Thank you

    Hi,
    Presuming it is an interactive form, it would be faster and relatively easier if you could have a single validate button on your abap web dynpro screen and perform all validations (since you have backend connectivity too, you could validate against master data) in ABAP itself..
    Regards...Amith

  • Check field to InfoObject

    Hi,
    How to check field to InfoObject mapping, i mean how to identify particular field is exactly matching with corresponding InfoObject.
    For example, when i searched in Business content(BW) for Document number..lot of InfoObjects has come..so, how to choose Exact InfoObject for R/3 field BELNR (Document number from BSEG table)..
    Please provide solution...
    i am very thankful to you....
    Its urgent....so, pls..pls

    BI - SE16 Table - RSOSFIELDMAP - F7
    You will see :
    OLTPSOURCE
    LOGSYS
    OBJVERS
    FIELDNM = BELNR ( for example )
    IOBJNM
    CONVERSION
    Width of Output List
    Maximum No. of Hits
    Execute
    You will get a list of datasources where the ECC field exists -> Double Click on it -> You will the infoobject - IOBJNM

  • Check field data type

    Hey,
    Im trying to determin the value of a JTextField.
    I want to test if the data in the field is either
    a) a String
    b) a Date
    c) a numeric
    How would i do this?
    Any example code of tutorials would be great
    thanks in advance
    Dave

    you're advocating exception handling for this?
    advocating expecting exceptions? normally if
    someone suggested this, I'd dismiss it as amateur
    ramblings, but I know that doesn't apply to you. what
    gives?Simplicty. To find out whether it's a valid int, you could of course use a regex to check for sign and all-digits,and then check the amount of digits for the maximum length - and if the String is as long as MAX_VALUE (or MIN_VALUE), you'll need to check each digit whether its equal or smaller than MAX_VALUE's.
    And then you parseInt() it.
    And for dates, it will be even worse.
    So you're going to write a hell of a lot of code that ends up doing what you'd do anyway, and in once case you have neat although avoidable "error" handling, while in the other case you're left with a lot of work, potential bugs and people cursing at you.
    If you're really a purist, a NumberFormatException should never occur. But I'm at least a bit more pragmatic.

  • Authorization Check Field Name

    Hi,
    Do we need to specify all field names when coding authorization check in abap?

    Hi,
    Plz go through this...
    AUTHORITY-CHECK OBJECT object
    ID name1 FIELD f1
    ID name2 FIELD f2
    ID name10 FIELD f10.
    Explanation of IDs:
    object Field which contains the name of the object for which the authorization is to be checked.
    name1 ... Fields which contain the names of the name10 authorization fields defined in the object.
    f1 ... Fields which contain the values for which the f10 authorization is to be checked.
    AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f (see SAP authorization concept).
    You must specify all authorizations for an object and a also a value for each ID (or DUMMY ).
    The system checks the values for the ID s by AND-ing them together, i.e. all values must be part of an authorization assigned to the user.
    If a user has several authorizations for an object, the values are OR-ed together. This means that if the CHECK finds all the specified values in one authorization, the user can proceed. Only if none of the authorizations for a user contains all the required values is the user rejected.
    If the return code SY-SUBRC = 0, the user has the required authorization and may continue.
    The return code is modified to suit the different error scenarios.
    The return code values have the following meaning:
    4 User has no authorization in the SAP System for such an action. If necessary, change the user master record.
    8 Too many parameters (fields, values). Maximum allowed is 10.
    12 Specified object not maintained in the user master record.
    16 No profile entered in the user master record.
    24 The field names of the check call do not match those of an authorization. Either the authorization or the call is incorrect.
    28 Incorrect structure for user master record.
    32 Incorrect structure for user master record.
    36 Incorrect structure for user master record.
    If the return code value is 8 or possibly 24, inform the person responsible for the program. If the return code value is 4, 12, 15 or 24, consult your system administrator if you think you should have the relevant authorization. In the case of errors 28 to 36, contact SAP, since authorizations have probably been destroyed.
    Individual authorizations are assigned to users in their respective user profiles, i.e. they are grouped together in profiles which are stored in the user master record.
    Instead of ID name FIELD f , you can also write ID name DUMMY . This means that no check is performed for the field concerned.
    The check can only be performed on CHAR fields. All other field types result in 'unauthorized'.

  • Check field values wad

    Hi everyone,
    I'm working on a template in wad and I have to check whether the user has choosen values in different dropdown boxes or not. How do I do this? I tried different things with the command wizzard and javascript but don't know how to implement this.
    Thanks for your help!
    Regards
    Tim Jaschik

    Hi,
    thank's for your answers, but my problem won't be solved by a customer exit in cmod. I will explain the situation a little bit more detailed:
    - the user starts a web template (I created this in bex web application designer)
    - in this template, there are five queries, each one shows the masterdata of an attribute in an dropdown field (0material, 0customer, ...
    - after the user has choosen all five values, he clicks on a button, this button starts a planning function...
    BUT before the planning function starts, I wan't to check, whether all dropdown fields are filled or not. If the user has forgotten to choose a value from one ore more fields, the planning function should not start and the template should give the user a message, which dropdown box  has the be filled.
    So I'm not in the sap-context, this is a simple javascript problem. But I don't know how to implement this javascript solution in wad, to check the values of the dropdown boxes and give back a message to the user...
    Regards
    Tim Jaschik

  • Check fields at save

    Hi cprojects experts,
    My requirement is to check if a project role contains one or more BP when the user clicks the save button (if not i'd like to display an error message). I've tried badi DPR_ATTRIBUTES (methods  VERIFY_ATTRIBUTES, CHECK, CHANGE_CHECK) and DPR_EVENTS (with filter ON_IF_DPR_COMMON_CHANGED). Unfortunately the badi implementations get triggered each time a field is changed.
    Is there another badi which only gets triggered at click at the save button? Or is there a possibility to find out if the save button was clicked using the above mentioned badis?
    I appreciate any hint!
    Kind Regards
    Wolfgang Brunneder

    Hi Wolfgang,
    a customer own subsystem should be  the 'modification free' soluation for your case. Please take a look th example codes
    CL_DPR_DEMO_SUBSYSTEM, which you can abort the save and raise error.
    I think, for your case the method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~PREPARE_TO_SAVE is relevant.
    Regarding how to create a customer subsystem.
    I think, what important is to create a Z class, which implement the both interface IF_DPR_APPL_PLUG_IN_SUBSYSTEM &
    IF_DPR_APPL_BOOTSTRAP_MEMBE, and adjust the parameter SR_INSTANCE with your own class name. After then the program will search all the active class, which implemented the interfaces and call one after another.
    Kind regards,
    Zhenbo

  • Check field symbols plzzz

    hiii i'm new to field symbol .  can you pleaseee look at the code below and advise if it's ok after append do i need to unassign field symbol like when using work area i need to clear after every append
    note: the i_data_file will be use elsewhere
    refresh i_data_file.
    LOOP AT i_file_upload ASSIGNING <fs_upfile>.
    Retrieving the first row of the excel file
        IF v_firstrow IS INITIAL.
          v_firstrow = <fs_upfile>-row.
        ENDIF.
      Reset the values for the next row
      and inserting each record in table
        IF <fs_upfile>-row NE v_firstrow.
          APPEND <fs_datafile> TO i_data_file.
          v_firstrow = <fs_upfile>-row.
        ENDIF.
        CASE <fs_upfile>-col.
          WHEN 1.
            <fs_datafile>-werks = <fs_upfile>-value. "Plant
          WHEN 2.
            <fs_datafile>-matnr = <fs_upfile>-value. "Company code
          WHEN 3.
            <fs_datafile>-bwdat = <fs_upfile>-value. "Date
          WHEN 4.
            <fs_datafile>-losgr = <fs_upfile>-value. "Qty
          WHEN 5.
            <fs_datafile>-kst003 = <fs_upfile>-value. "Price total
          WHEN 6.
            <fs_datafile>-kstar = <fs_upfile>-value. "Cost element
          WHEN OTHERS.
        ENDCASE.
      ENDLOOP.
    Inserting the last record of the excel file
      APPEND <fs_datafile> TO i_data_file.

    hi
    good
    check this link which ll give you detail idea about the field symbol,
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb387a358411d1829f0000e829fbfe/content.htm
    thanks
    mrutyun^

  • Check fields when approve or deny

    Hello,
    Can any one please check for me if there is something wrong or if I miss any thing in the statement below which causes it to not working right. User fills the form and submit it to the manager, when the manager approve/deny then he/she should fills the other fields. If they miss one then a pop up message will tell them that they need to fill that field which is highlighed.
    if 
    (AWS_ACTION.rawValue == "Deny" && (form1.Wellness_Page1.denied_reason.rawValue == null || form1.Wellness_Page1.denied_reason.rawValue == "" ) ){
    app.alert("Please select deny, enter your name and today's date for denial. ");
    form1.Wellness_Page1.denied_reason.mandatory
    = "error"; // make the comments field mandatory
    form1.Wellness_Page1.SupDeny.mandatory
    = "error"; // make the fields mandatory
    form1.Wellness_Page1.sup_signature.mandatory
    = "error"; form1.Wellness_Page1.SupDate.mandatory
    = "error"; xfa.event.cancelAction
    = true; // This line will prevent submitting the form
    else {(AWS_ACTION.rawValue == "Approve" )
    app.alert("Please select approve, enter your name and today's date for approval. ");
    form1.Wellness_Page1.SupApprove.mandatory
    = "error"; // make the fields mandatory
    form1.Wellness_Page1.sup_signature.mandatory
    = "error"; form1.Wellness_Page1.SupDate.mandatory
    = "error"; xfa.event.cancelAction
    = true; // This line will prevent submitting the form
    Please advise.
    Thanks, Han

    This might be just the formatting of the post but the line;
    else {
    (AWS_ACTION.rawValue == "Approve" )
    should be
    else {
    if (AWS_ACTION.rawValue == "Approve" )
    That is you'll need the "if" keyword.
    Hope that helps
    Bruce

  • Check field in a select-opton

    Hi, is there anyone that can help me to solve this problem?
    I have 2 seach field in a report,
    Filed 1 and field 2
    The user put in a value in field 1, the search in field 2 i dependet of what the user have put in into field 1, so, when the user press PF4 in field 2, different value will show up (dependent of value in field 1).
    That is no problem if the user press enter between or run the program but if he/she fill in value in field 1 and then directly press PF4 in field 2, there is no value in the SO-table from field 1.
    How to check the value?? Please help...
    BR//

    Hi,
    I don't see a real need to create a search help in this case. Here's the sample code which demonstrates the usage of the above Function Module. Besides, the FM itself has very good documentation. I would encourage you to go ahead and read that.
    REPORT  ZANAND_TEST.
    parameters: p_1 type n,
                p_2 type i.
    data:  field_value type DYNFIELDVALUE.
    at selection-screen on value-request for p_2.
      perform read_field using    'P_1'
                         changing field_value.
      message i398(00)  with FIELD_VALUE .
    *&      Form  read_field
    *       text
    *      -->P_FIELD_NAME   text
    *      <--P_FIELD_VALUE  text
    form read_field  using    value(p_fieldname)
                     changing p_field_value.
      data: dyname like d020s-prog value 'ZANAND_TEST',
            dynumb like d020s-dnum value '1000'.
      data: begin of dynpfields occurs 3.
            include structure dynpread.
      data: end of dynpfields.
      move p_fieldname to dynpfields-fieldname.
      append dynpfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = dyname
                dynumb               = dynumb
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynpfields
           exceptions
                invalid_abapworkarea = 01
                invalid_dynprofield  = 02
                invalid_dynproname   = 03
                invalid_dynpronummer = 04
                invalid_request      = 05
                no_fielddescription  = 06
                undefind_error       = 07.
      read table dynpfields index 1.
      move dynpfields-fieldvalue to p_field_value.
    endform.                    " read_field
    You might want to comment out the PERFORM statement and observe the current behaviour of your report.
    Regards,
    Anand Mandalika.

  • Check fields after 'COMPLETE' in iw32 Tcode.

    Hello Experts ,
    I push in button 'COMPLETE' in iw32 tcode  , and i get screen with some fields  like  "VIQMEL-AUSVN" and "VIQMEL-AUSBS"
    and i want to check this fields , i didnt find user exit that suit to this target , can any have idea how can i do this ?
    Thanks for the help,
    Avi.

    This form image was created using a Toshiba MFP and had form fields added with Acrobat. There appears to be a font problem. I saved the form in Acrobat Pro Extended 9. When I opened the form in Reader 9 I was asked to install Japanese fonts since the form uses the KozMinPrN6-Regular font.
    After dismissing the install request, the form fields behaved predictibly in Reader 9 (with the exception of requesting 10MB of Japanese fonts).
    Steve

  • Which table could check 'field description' for one IDOC segment.

    Hi,
    Let's take am example of IDOC segment E1EDL20. If i put 'E1EDL20' in T-code: SE11.
    Then i could display its structure with full field list.
    But you could find that there is 'Blank' in 'field short description'...
    May i know which table could check the field short description???
    Thank you!

    Hi,
    Probaly the name is not maintained in your logon language. Nevertheless you can check the name of all the tables in the table DD02T.
    Regards,
    Marcin

  • Check Field of MARA for a MASK

    Hi,
    how can i check if a field in MARA has a special mask.
    I want to check MARA-ZEINR for n nnn nnn nnn (n=numeric).
    My select-statement is like this:
    Select * from mara where mara-zeinr <> space.
    check MARA-ZEINR = mask(n nnn nnn nnn).
    endselect.
    How can i do this?
    Thanks.
    Regards, Dieter

    Hi Dieter,
    Please try this.
    DATA: WA_STRING_IN(15)  TYPE C,
          WA_STRING_OUT(15) TYPE C,
          WA_HTYPE          TYPE DD01V-DATATYPE.
    SELECT * FROM MARA WHERE MARA-ZEINR <> SPACE.
       CLEAR: WA_STRING_IN,
              WA_STRING_OUT,
              WA_HTYPE.
       WA_STRING(1)   = MARA-ZEINR(1).
       WA_STRING+1(3) = MARA-ZEINR+2(3).
       WA_STRING+4(3) = MARA-ZEINR+6(3).
       WA_STRING+7(3) = MARA-ZEINR+10(3).
       CALL FUNCTION 'NUMERIC_CHECK'
          EXPORTING
             STRING_IN    = WA_STRING_IN
          IMPORTING
             STRING_OUT   = WA_STRING_OUT
             HTYPE        = WA_HTYPE.
       IF WA_HTYPE = 'NUMC'.
          WRITE: / MARA-ZEINR, 'WITH MASK(N NNN NNN NNN)'.
       ELSE.
          WRITE: / MARA-ZEINR, 'WITHOUT MASK(N NNN NNN NNN)'.
       ENDIF.
    ENDSELECT.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Need to check field

    I know almost nothing about WD Java
    But i am using an WD Java application, of which one tab contains a drop down fileld.
    But when i click on drop down it shows nothing but in have maintained required data in SPRO.
    Now i need to check that to which ABAP Table this drop down Field is linked?
    Please tell me how to navigate to see that fileld's properties?
    Thanks in advance

    Check the web dynpro context node bind with drop down. check the correctponding table in RFC. Node is nothing but a table in the RFC backend if model is used.

  • Appraisal template - need to check fields

    Hi all,
    In my appraisal templates I need to check that the some of three different fields in three different VB have a sum of 100%. Do you knwo which BAdI I need to implement, and how it works?
    In an other field, I need to"hide" the difference between GOOD and VERY GOOD and in both case shows GOOD/VERY GOOD. Same questions : do you know the BAdI (or maybe another way...) I need to implement, and how this BAdI works ?
    Thanks by advance,
    De Coster Brice

    Hi Brice,
    You need to have use the HRHAP and HRHAP_BASIC tables for getting that details.
    Have an inner join between these two tables where the join condition would be your document id (32 char long - HAP_APPRAISAL_ID) and get your template id (8 char long -ELEMENT_ID) from the HRHAP_BASIC table.
    wher clause should be like this.
    PLAN_VERSION = 01
    ROW_IID = 0000 or 0001 (slightly doubtful about 0001, mostly i think its 0000).
    Get the help from your ABAPer on the query.
    Hope this helps you.
    Regards,
    Subbu

Maybe you are looking for

  • OS X 10.5.6 versus Windows Server 2000 SFM

    We have recently deployed a number of Macintosh (Mac Pros and iMacs) running OS X 10.5.6. When copying a directory to a Windows Server 2000 running Services for Macintosh, the directory permission are not duplicated and, more problematically, cannot

  • Function only visible to a specific class

    Hi All I am implementing a tree hierachy with a classes call 'Tree" and "Node". Inside the Node class, I have a function call "setName" for setting the name of the node. This function will only ever be used by Tree for setting the name of the nodes i

  • HOW TO CHANGE QTY IN P.O ?

    Dear All ,                       user had made a P.O for qty 2.0 ton out of which 0.99 ton has been rcvd , here is no tick on del comp.l ind , now user wants to change the qty from 2.0TON to 2.998 TON as he is in change mode of P.O but qty field is G

  • RH9 Search highlighting color won't stick

    When you use the Search feature and select "Highlight search results" the default color is gray. The word or phrase you're searching for displays in gray in all the topics in your search results. From a usability standpoint, gray is a really bad colo

  • Table Maintenance : display only in testing environment

    Hi All, I have a Z table , for which I have created a maintenenace dialog screen and finally assigned this to a transaction code. The transaction code calls the maintenenace screen in a proper manner.  My requirement is that in testing environment, t