Control an Integer field Length without using Validation ??

Hi,
I have Couple of fields where I need to configure them as Integers.
Now each one has a fixed length that i need to limit to.
But when i create a field of type: integer, i cannot select teh length!!!
To achive this the idea i have is to write a validation which checks length..
But can i achive it without going for a validation on each field???
PS: I am aware that TEXT field can limit the length But it also allows me to enter text values, my requirement clearly says that to allow users to only enter Numeric values..
Did anyone face a similar Case?
Kind Regards
Eva

Hi Eva,
I didn't try in the system, but I feel there are two solutions to achieve your requirement (*of course in both cases you will need to write a simple validation)
Solution 1 : When field is defined as "Integer" in Console.
lets take an example, you want to restrict an integer field with a limit of max 4 characters.
Maximum value of a 4 character integer can be "9999". So, you can put a simple validation to compare the field value with 9999. if the value is less then this means fields values is less than 4 characters, else more than 5 characters.
In this case Your validation expression in expression editor will be:
FIELD NAME<= "9999"
Solution 2 : When field is defined as "Text" in Console.
In this case you can restrict the maximum field length through Console. But you will also need to write a validation to ensure that user is not entering any alphabets or special characters in this field.
In this Case you can use below validation:
HAS_ALL_CHARS(FIELD NAME, "0","9")
This will ensure that field has all characters between 0 and 9 and doesn't hold any special character or alphabets.
In Both cases you will need to set  "Automatic Execution" property as "Error". Also please do not manually type any function or value in expression editor. use drop down for fields, operators, functions etc.  and enter numeric values using the first blank box before dimension list.
Kindly revert if you face any issues.
-Shiv

Similar Messages

  • Sort Rowset field values without using rowset.sort or sortscroll

    Hi dudes,
    any one tell me the different ways to sort a rowset values ie, single field or more than one field without using Rowset.sort or Sortscroll() method. i tried some ways but not get the optimum solution.

    My first question to you would be why you want alternatives for Rowset.sort or Sortscroll.
    Your question doesn't describe your true issue or motive to search for alternatives for delivered PeopleTools Apis & Buildin Functions.

  • Cannot process a Fixed Field Length file using the File Adapter (Sender)

    Hi -
    I have checked throughout these posts and blogs but I still have not been able to find a solution to my issue.  When using the File Adapter (Sender) I get a Conversion initialization failed with "xml.keyfieldName", no value found.  Why would I require a key field when I am using fixed field lenghts?  The file is comprised of 2 structures - 1 header and multiple details (see below).  There are no key fields in the flat file that I would be able to use.  Any suggestions?
    011000390      Customer Americas        20080605164317 000000000000000800000008000000000016000000                              
    12345678          100500       100500       Supplier 1                         0000000000030000002008040400                    
    12345678          100501       100501       Supplier 2                         0000000000052000002008042100 
    The File Adapter is configured as follows:
    Document Name = Rfchke00
    Document Namespace = 'my namespace'
    Recordset Name = Rfchke00
    Recordset Structure = Dtachkh,1,Dtachkp,*
    Recordset Sequence = Ascending
    Recordsets per Message = 1
    Key Field Type = String (Case-Sensitive)
    Dtachkh.fieldFixedLengths = 15,25,8,6,1,8,8,8,15,3,31
    Dtachkh.fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11
    Dtachkh.processFieldNames = fromConfiguration
    Dtachkp,fieldFixedLengths = 18,13,13,35,15,3,8,2,21
    Dtachkp,fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9
    Dtachkp,processFieldNames = fromConfiguration
    Thanks,
    Dave

    Hi,
    you can use the module from which u can convert your structure to
    H011000390 Customer Americas 20080605164317 000000000000000800000008000000000016000000
    D12345678 100500 100500 Supplier 1 0000000000030000002008040400
    D12345678 100501 100501 Supplier 2 0000000000052000002008042100
    Please note the extra H,D in the struture added by the module.
    You can then use them as your key fieldValues.. The module should be deployed in Visual Admin and then can be used in the Module tab of your adapter CC
    While writing the content conversion after that please dont forget about the added new characters
    Please note also that i can find that the word supplier kept repeating in all the Dtachkp records
    Please use that
    Also if you feel that the field is of 13 characters and that would cause a problem dont worry... create a dummy field eg split tht 13 to two fields and use the common one as key field Value and identifier... as i see in ure case its like 500 Supplier , 502 Supplier . u can split the first 4 char and the remaing 9 char are key field value.
    try this out
    Rgds
    Aditya

  • Query using field MWSKZ without using BSEG

    Hi,
    I'm trying to create an Infoset (t-code SQ02) that will contain the field MWSKZ (Tax on sales/purchases code).
    This field is located in the table BSEG and I get the message: «Table BSEG cannot be used in a join» when I try to create an infoset using BSEG.
    Is MWSKZ (Tax on sales/purchases code) located in any other table?
    Thanks,
    Julien

    BSIK, BSAK, BSID, BSAD.
    But I'm not sure how useful these tables will be in a JOIN.
    Rob
    Edited by: Rob Burbank on Apr 23, 2009 2:53 PM

  • Increase of Field length. & vendor data @ sales documents

    Dear all,
    a. I want to increase the Sales employee - Remarks (field) length from 50 characters to 200 characters.
    Can we increase the length of standard field's without using SDK? If yes, tell me how to do?
    b. I am creating 2 UDF's @ marketing documents. - Title level
    At first UDF - I want to see all the vendor master data (vendor codes) by formatted search
    At the secound field  - the address of the relevant Ship to r bill to address of vendor has to be filled down - as soon as i selected the vendorcode on the above field.
    Can we map the UDF's as per the above requirement - with out using SDK & by using formatted search.
    If - we can do with formatted search - help me of how to do & send me the query.
    Thanks & Regards
    ganesh

    Ganesh,
    The SAP database field lengths cannot be changed.
    Reg the Formatted Search of Vendor Codes for the first UDF.  The SQL would be like
    SELECT T0.CARDCODE FROM [DBO\].[OCRD\] T0 WHERE T0.CARDTYPE = 'S'
    YES, it is possible to trigger the FMS on the second UDF when the Vendor Code is filled in the firt UDF.
    I am not clear with what you mean by the following
    At the secound field - the address of the relevant Ship to r bill to address of vendor has to be filled down - as soon as i selected the vendorcode on the above field.
    The Address information is in CRD1 table and you can use the first UDF's values in the WHERE clause of the SELECT statement in your second FMS
    example:
    SELECT T0.STREET, T0.CITY, .... FROM [DBO\].[CRD1\] T0 WHERE T0.CARDCODE = $\[ORDR.U_USERFIELD] AND T0.ADRESTYPE = 'B'
    CHANGE U_USERFIELD1 with the name of your Vendor Code UDF
    T0.ADRESTYPE = 'B' ..........FOR BILLING ADDRESS
    T0.ADRESTYPE = 'S' ..........FOR SHIPPING ADDRESS
    Suda

  • Get table control field length

    in table control i have a field with with char length 15  but i have to give a validation if lenght not equal to 6 giv error messgage with out changin the field length of table control
    i used    
                    DESCRIBE FIELD gi_pmpb_bchid-batchid LENGTH ln IN CHARACTER MODE.
                     IF ln <> 6.
                         MESSAGE e013(zc8isms).
                      ELSE.
    but here length is coming as 15 only even if i enter 6 digits in field on TC
    plz help

    DESCRIBE returns the attributes of a data object. Length operators, like STRLEN, on the other hand, return a length of the data content.
    if strlen( <mytable-fieldname> ) gt 6.
    etc...
    or lv_len = strlen( <mytable-fieldname> ).
    if lv_len (of type i) gt 6.
    etc...
    put this in code, press F1 on STRLEN for informative help on finding lengths, whether field or table.

  • Field length validations

    Hi All,
    In my application, I have to give a set of inputs...and will get the output on the basis of range set. If I dont give any input, then also BAPI will fetch all the data.
    I have to set length validations(fixed, maximum) without using simple type.
    How this can be achieved ?
    Thanks,
    Nikhil

    hi Rocio, It works. But i'm doing the validation for a column in my table. So, i want the red mark to be in the right row (right now, its always in the last row). Also, i want to stop any other actions, navigations etcs when this validation fails even for a single row. How could i achieve this? Here is my code. I have written my code in wdModify view as i felt thats the best place to make the validation work in every instance.
    if (wdContext.nodeVn_ContactPersonaDetails().size() > 0) {
                        for (int size = 0;
                             size < wdContext.nodeVn_ContactPersonaDetails().size();
                             size++) {
                             String attrValue =
                                  wdContext
                                       .nodeVn_ContactPersonaDetails()
                                       .getVn_ContactPersonaDetailsElementAt(size)
                                       .getVa_lastName();
                             if (attrValue == null) {
                                  IPrivateCreateCustomerInputView
                                       .IVn_ContactPersonaDetailsElement neCnt =
                                       wdContext.currentVn_ContactPersonaDetailsElement();
                                  wdThis
                                       .wdGetAPI()
                                       .getComponent()
                                       .getMessageManager()
                                       .reportInvalidContextAttributeException(
                                            neCnt,
                                            wdContext
                                                 .nodeVn_ContactPersonaDetails()
                                                 .getNodeInfo()
                                                 .getAttribute(
                                                 "va_lastName"),
                                            "Last Name field must be filled!",
                                            false);
                                  break;

  • Length of a string without using any built-in functions

    code that returns the length of a string without using any built-in functions.
    thanks
    Sam

    A string is internally represented by a character array.  An array of characters will reside on the stack, not the heap.  Yes, we always learned that String is a reference type, but what goes on in your memory might still surprise you...
    A struct is internally represented by only it's private properties, sequentially on the stack.
    So basically, what I thought is happening by messing with the structlayout: is only tricking our programming a bit into thinking that the top X bytes on the stack represent a chararray, while actually we put them there as a string.
    Wrong. True. And wrong.
    A string is internally represented by, in that order, an array length, a string length, the chars. None of them resides on the stack.
    An array is internally represented by, in that order, an array length and the chars. None of them resides on the stack.
    When you use the FieldOffset attribute to handle the string as a char array, you don't get anything right:
    - the Length returned is the "array length" of the string, which is equal to the string length + 1.
    - the chars returned by the array indexer are shifted by 2 chars (the length of the "string length" field).
    You can use the FieldOffset to make that work, but it needs a little bit more work.
    unsafe static int Test()
    string myString = "This string may contain many string inside this string";
    string testString = "string";
    int countResult = 0;
    fixed (char* myChars = new StringToChar { str = myString }.chr, testChar = new StringToChar { str = testString }.chr)
    // The 2 first chars of the array are actually the string length.
    int myCharsLength = myChars[1] << 16 | myChars[0];
    int testCharLength = testChar[1] << 16 | testChar[0];
    for (int i = 0; i < myCharsLength - testCharLength + 1; i++)
    if (myChars[i + 2] == testChar[2])
    for (int j = 1; j < testCharLength; j++)
    var c = testChar[7];
    if (myChars[i + 2 + j] != testChar[j + 2])
    goto endOfCharAnalyses;
    countResult++;
    endOfCharAnalyses:
    continue;
    return countResult;

  • Button action bypass validation without using Immediate=true

    I have a Form in a page, and a "Query" button to popup a dialog for user to search some information, and help user to fill-in some fields.
    I want the "Query" button to ignoral all the validations in the Form (e.g.: required fields). I tried to set the Immedate for the button, but I found I cannot set any inputText value inside ReturnListener event-handler with Immedate is true.
    Is there anyway to have a button to action, and bypass all the validation without using Immediate=true?
    Thanks,
    Samson Fu

    Hi,
    if you are on JDeveloper 11g, have a look at the skipValidation property on the ADF binding and read: http://oracle.com/technology/products/jdev/tips/fnimphius/ppr_subform/index.html
    You can implement a similar approach
    Frank

  • Does anyone know how the cutout filter works and is there a way of achieving the same effect without using filters to get more control over final look?

    does anyone know how the cutout filter works and is there a way of achieving the same effect without using filters to get more control over final look?

    Several ways to get similar results.  Image > Adjustments > Posturize with low values similar to what you'd use n Cutout.  This is the most flexible way I can think of as you keep the image in RGB mode with layers intact.  A more radical approach would be to reduce bit depth using Indexed Colour.  You'll need to experiment with settings, try changing Forced to Primaries, and Matte to Foreground Color.  There's no going back from this route, although you can change the mode back to RGB to re-enable layers, adjustment layers etc.
    A nice thing about the Filter gallery filters is that you can change the layer to a Smart object with all the control that gives you.
    Now if only this forum could filter out bizarre content.

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

  • How to set item values without using fields in branch's ACTION block?

    Okay, I will try to say this in a easy way so it is not weird.
    I have created a button, SAVE, that has a Branch of branch type: Branch To Function Returning A Page. This is my code for the branch:
    if :P2008_NAP_SUPPORTING_MATERIALS = 'Yes' then
    return '2092';
    else
    return '2040';
    end if;
    The code for this type of branch is stored in the ACTION block of the Branch page. The ACTION block for a Branch of branch type: Branch To Function Returning A Page is different than the ACTION block for a Branch of branch type: Branch To Page Or URL.
    I need to set some item values with some specific values, which I can do with a branch type: Branch To Page Or URL. This is not possible with the branch type: Branch To Function Returning A Page. The ACTION block is totally different.
    How can I set some values on say Page 2040 from Page 2008 without using fields in the branch's ACTION block?
    Thank you in advance,
    Maggie

    Andy and Scott,
    I love seeing different perspectives in solving problems, it opens my eyes to new ways of looking at/using the tools (reserved words and 'Function returning a Page', etc.).
    One of my pet peeves has been that on branches I was limited to only 10 variables to be passed (I know, who would want more - but there was an instance where I had to pass more), and an even more frustrating time when using report Column Linking, which limits me to 3 variables.
    At least with the Branch linking I can use your suggestion Andy and add the variable setting statements into the function. I am assuming of course (and I should be able to) that I will be able to set more that 10 variables in a IF condition prior to the RETURN statement. This method will be much more understandable, for me, when looking through the branch at a later time to see what is happening, than an URL link where all the variable are strung out 'in a line' so to speak.
    I will still need to use URL Target branching on Links contained within a Column Attribute when I need to pass more than 3 variables, of which I have several places where I do this.
    Thomas

  • Variable message length without field separator to file receiver adapter

    Hi,
    I have a XML document as below
    <MT_O_FF>
    <ROW>
         <HEADER>        </HEADER>
         <QMGR>                       </QMGR>
        <MESSAGE> TEST MESSAGE </MESSAGE>
    </ROW>
    </MT_O_FF>
    I know the field lengths of <HEADER> and QMGR but MESSAGE has variable length data. We don't want field separator between HEADER, QMGR and MESSAGE. The file should be created as below (text file)
                                          TEST MESSAGE
    The above blanks in front of TEST MESSAGE data needs to be there in the file. The problem I am facing is as <MESSAGE> is variable length and the file should not have field separator, is there any way we can create text file using file adapter?
    If I use xml.fieldFixedLengths as below, as long as data in MESSAGE is less then 40000 then the file is created with data. If the length is more then 40000 then the file is getting created but the data in MESSAGE is getting truncated. The maximum length adapter allows me to use 40000.
    xml.fieldFixedLengths=10,20,40000
    xml.fieldNames=HEADER,QMGR,MESSAGE
    xml.fieldTooShortHandling=ignore
    Thanks in advance for your help.

    HI,
    the parameter fieldTooShortHandling = ignore should solve your purpose.
    Ignore means that the system applies the value completely, regardless of it being too long. Subsequent columns are moved correspondingly.
    Thanks
    Swarup

  • How to create logical standby database without using Oracle Grid Control

    Hi All,
    I want to create Logical standby database on 11gr2 on RHEL 5 without using oracle Grid Control.
    I already have a primary database as well as physical standby database.
    What i want to create a logical standby database as well on the same machine where physical standby database is running.
    So anyone of you help me out to do that
    Thanks in advance

    Hi,
    Creating a Logical Standby Database
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#SBYDB00300
    Regards,
    Tom

  • How to Set multiple Global Variables without using Controls or Indicators

    I have to set many Global Variables (i.e. declare and initialize them) in a subVI in order to pass them to various other subVI's. The only way I know how to do it in LabView is to create a Globals.vi on which you create a control or indicator for EACH Global Variable. That's fine if you have only a few variables. But I have close to a hundred Global Variables (which come from a configuration file for a large program) and clearly it is impractical and cumbersome to create a control for each global variable. In Agilent Vee, there is a simple function called "Set Variable" that sets the data value of a global variable. Then in other module, you simply use the "Get Variable" function to get back the v
    ariable and its value.
    In LabView you can use the "Invoke Node / Set Control Value" and "Get Control Value" properties to achieve the same thing. But as mentioned above, you need to create a control for each global variable and that is a big pain in my case, with many global variables. Furthermore, the global variables are read from a Configuration Text File to this VI. Is there a way to do it without using the control? Thank you in advance for any help.

    Actually you could create the same sort of facility in LV. All you have to do is create a LV2-style global that behaves as follows:
    To write a value to it, you supply a value name and the value. These pieces of data are save internally in seperate arrays.
    To read a value, you supply a value name. The VI looks up this name in the value name array to return an index into the value array. Output the value you find.
    Frankly though, it sounds like what you really need is not hundreds of globals, but a good way to manage configuration data.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • I would like to know how do I get my toolbars back.

    How do I get my toolbar back to have the ability to refresh, print, rage radio, etc.

  • No air play in macbook pro mid 2012

    I have mountain lion, and I bought apple tv, but there is no mirroring with option,  I bought it july 2012! What should I do?

  • Partitioning a Hardware RAID

    OK, I have already searched the net to no avail, im hoping someone here will be able to help me. I currently have an external 300gb HD with 2 partitions, one is a bootable backup and the other is storage. I have recently realized that if this drive w

  • MacBook won't start from CD

    My MacBook won't startup from it's CD. Instead, it ejects the disk. If ANYOE has a solution to this probloem, PLEASE respond below. Thanks, Nathan.

  • Jdeveloper Patch for Ebusiness Suite 11.5.10

    Dear Members, I am confused regarding the JDeveloper patch i need to download from metalink pertaining to our version of e business suite and OA Frame Work. OA Frame work version we have is : Product/Component Version OA Framework - 11.5.10 4RUP Orac