Limiting Field Input length

Dear Experts
I have a problem on basic set up of the system.
My question is: If the maximum length of a field is 20 charcters, can I limit users to enter a maximum of 10 characters in stead of 20? If so, how to do it ? I would like the solution that could be applied to all fields that require user input
Thanks for any response
Regards
Elton

Hi
Use this code : I have written for the Item Name same way u can use for Card Name by changing the code little bit:
Declare @ItemName nvarchar(100)
if @object_type = '4' And (@transaction_type ='A' Or @transaction_type = 'U')
Begin
      Select @ItemName = ItemName from OITM Where ItemCode = @list_of_cols_val_tab_del
      if LEN(@ItemName) > 10
           Begin
           Set @error = -1
           Set @error_message = 'Item Name can not be more than 10 characters'
           End     
End
Giri

Similar Messages

  • Field name lengths

    The field name lengths in the Citadel database are approaching 80 characters when Citadel adds the total path to each field. I am saving data from a process running on computer #1 to computer #2. I am using OPC and to select the analog input values require an extremely long length to the field names.
    i.e.
    "\\Dispatchbd1\Freq_Process\FreqOPC.'OPC DAQ Items'.'Analog Input'.'PHS Narrow Freq'" is just one of my field names. When you have 75 values in a database that you want to look at this long name gets discouraging. Any help would be appreciated.

    Hi Wapa,
    You are right the names are a bit long. Citadel stores the absolute names (includes computer and process name), to make sure the names are unique. For example if process1 and process2 have both Pot1 and you are storing the data to the same database, unless you log it with a process name and computer name you would get a conflict - (if there is just Pot1 you would not know from which process).
    So, the computer and process parts are always there. The Item name has to be also included, but you have more choise there. The member ('OPC DAQ Items'.'Analog Input'.''PHS Narrow Freq') can be aliased to anything you want (and is valid). Go to the Edit database - select the item in the second window - select the datatype - type in alias (for example item1) - check the log to
    historical database and hit save (you are going to get a warning - don't worry about it, just make sure the alias (item1) you typed is is not already an existing item - because of the folder structure exposed by DAQ OPC you'll be fine).
    Now instaed of using "\\Dispatchbd1\Freq_Process\FreqOPC.'OPC DAQ Items'.'Analog Input'.'PHS Narrow Freq'" you can go with "\\Dispatchbd1\Freq_Process\FreqOPC.item1" - you can stop loggin the original member.
    If you need to go even shorter, you can create an expression object for every member you want to log and then log the expression. Then you get to something like:
    "\\Dispatchbd1\Freq_Process\Exp1"
    I hope this helps.
    Martin

  • How to increase maximum input length of a short text object in SE63

    Hi All,
    In se63 translation transport when a object name is provided for short text translation, fields like technical information, modified/ Decision Required and maximum input length are displayed, how can maximum input length of a text can be increased if we want to enter more characters than specified in the maximum input length field.
    Regards,
    Shruthi

    Increase the length of the source field, which you are translating..
    Cheers!
    Mishra

  • Limitation on Alias length

    Hi,
    Is there a limitation on the length of Alias in Essbase 9.3 ?
    Thanks

    I think the limit is still 80 characters on an alias.

  • How do I validate one field's length based on another field's selection?

    I am creating a form for our offices where I need to check one field for length of a serial number based on the answer to a previous field's selection.  Depending on the product selection, the serial number has two different lengths.  Both fields are marked as required, but I want to make sure that we receive the full serial number for our product.  Previous forms were done on paper and instructions were for the last 4 digits only which now we want the full serial number.  One product has a 12 digit number and the other is 6.
    I'm guessing that I need a validation script in the serial number field, but I am not a JavaScript coder and haven't found the right thing when searching.  Any help would be great!
    Thanks!

    Never trust your users to follow what you expect them to do... That often leads to mistakes and problems later on.
    I would reset the s/n field when a selection is made in the drop-down. To do so set the drop-down field to commit the selected value immediately and add code as its custom validation script:
    this.getField("Serial Number").value = "";
    To validate the s/n field you can use something like this as that field's custom validation script (of course, you'll need to adjust the field names and values to match the actual ones in your file):
    event.rc = true;
    if (event.value) {
         var selection = this.getField("Dropdown1").valueAsString;
         if (selection=="1" && event.value.length!=6) {
              app.alert("Error! The s/n must be 6 digits long.");
              event.rc = false;
         if (selection=="2" && event.value.length!=12) {
              app.alert("Error! The s/n must be 12 digits long.");
              event.rc = false;

  • Storing a field of length 500 char in a database table

    I want to create a ztable in which I need  to store the data of length more than 256 , so please let me know , how can we create the field of length 500 chars..
    I have tried using STRING and LCHR , but it's not working.
    Thank You,
    Ankur Goyal

    Hi,
    Try creating the field like this
    1. Create a new data element with required description.
    2. While creating data element select 'Built-in type' radio button under Data Type tab. Specify Data type as STRING and press enter. You need not specify Length (or you can provide 500 here, I suggest not to specify field length as it leads to short dump if you enter text more than 500 chars in it).
    Note: Once you press enter you can see an information message 'No length restriction'.
    3. Save and activate the data element.
    4. Use the data element for your text field in your custom table.
    Important:
    The text field with size >255 chars should not be a key field, neither you should select 'Initial values' option while defining field.
    I have tried this and it worked.
    Hope this helps.
    Thanks,
    Venkat

  • How to extract field name, length, descrip & field type out of repository

    How can I  extract field name, length, descrip & field type out of repository?  Or is it possible?

    Hi Victor,
    To get any info about any field you should know the code of that field that we specify in console while  creating field.
    Using this code you will get property whatever you defined in consloe.
    RepositorySchemaEx repositoryschema= MetadataManager.getInstance().getRepositorySchema(usrCtx);
    where usrctx is usersession context that you create to access yr repository
    FieldProperties fProp = repositoryschema.getField(tableName,fieldCode);
    where tablename is tablecode in which field belong
    field code is code of field that you define in console for that field
    if you check with frop then it will show  the general properties like type etc.
    suppose yr field of type text field then you can acces all properties that is coomon as well that is respective to text type field.
    FixedWidthTextFieldProperties textField = ( FixedWidthTextFieldProperties) fProp
    if you have other field type then that use thta properties . you will get in java api docs on help.sap.com whatever the properties MDM supporting.
    Hope ot helps  you get the solution
    thanks,
    sudhanshu

  • I/O field (input field) xyz has no accessible label ?

    I have a selection screen which has several radio buttons as the code below. I checked code by using code inspector and it issued error messages "I/O field (input field) xyz has no accessible label". How do I fix this? thanks
    SELECTION-SCREEN BEGIN OF BLOCK status
                     WITH FRAME
                     TITLE text-006.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS dy_ofn LIKE rihea-dy_ofn  FOR TABLE diaufk.
    SELECTION-SCREEN COMMENT 3(11) text-001 FOR FIELD dy_ofn.
    PARAMETERS dy_iar LIKE rihea-dy_iar FOR TABLE diaufk.
    SELECTION-SCREEN COMMENT 16(10) text-002 FOR FIELD dy_iar.
    PARAMETERS dy_mab LIKE rihea-dy_mab FOR TABLE diaufk.
    SELECTION-SCREEN COMMENT 29(10) text-003 FOR FIELD dy_mab.
    PARAMETERS dy_his LIKE rihea-dy_his FOR TABLE diaufk.
    SELECTION-SCREEN COMMENT 42(10) text-004 FOR FIELD dy_his.
    SELECTION-SCREEN COMMENT 52(10) text-005 FOR FIELD selschem.
    PARAMETERS selschem LIKE tj48t-selid FOR TABLE diaufk.
    SELECTION-SCREEN PUSHBUTTON 73(5) p_addr USER-COMMAND addr
    FOR TABLE diaufk.
    PARAMETERS dy_adrfl NO-DISPLAY FOR TABLE diaufk.
    SELECTION-SCREEN COMMENT 79(30) ad_icon FOR TABLE diaufk.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK status.

    Hi,
    If an input field is located next to a selected radio button and its label, you must show this field as being ready for input.
    o If an input field is located next to a non-selected radio button and its label, you must show this field as inactive. Chapter 3.4 discusses why this is necessary.
    u2022 Do not place more than one element on the right of the label. If more than one element is placed after the label, then screen readers cannot read the following relationships correctly:
    o Relationship between a checkbox and a label
    o Relationship between a radio button and a label
    o Relationship between an input field and a label.
    Also, Please go through this document:
    http://www.sapdesignguild.org/resources/Accessibility_Guideline_ABAP_external_Version.pdf

  • Loading amount field of length 22,9

    Hi,
    My requirement is to load an amount field with length 22 and 9 decimal places.
    If it is possible then how ?
    Thanks in Advance

    Not that I know of. Lets wait and see if some body has any tricks up thier sleeves to make this work.

  • DESCRIBE FIELD t001 LENGTH anz_fe in   which mode ??

    Hi all,
    I am in Unicode Project. For the statement mentioned below, i have to use IN Character mode or IN BYTE mode ??
    DESCRIBE FIELD t001 LENGTH anz_fe
    Thanks in Advance.
    Sriram

    data: l_type type c,
    l_number type i.
    describe field t001 type L_TYPE components L_NUMBER.
    Message was edited by:
            Muthurajan Ramkumar

  • Table Maintance for fields having length 3000

    Hi,
    How to create Table Maintance generator for Table fields having length 3000, expecting quick reply
    Thanks in advance,
    Srinivas M

    Hi
    In that Tcode
         Slection date:  It is only on e field.(BUDAT).
    This field declared using select options satement internally.
    U should give range of dates.
    If it is helpful rewards points.
    Regards
    Pratap.M

  • Making field input editable after giving error msg from table event 01

    Hi All,
    I have a requirement of giving error msg and making that row or the particular field input editable by writing code in table event 01 i.e before saving any record in a z-table i have to chk some condition for a column value and if that condition fails then i have to give error msg and make that column input editable.
    I have created a routine for event 01 and written the code to give error msg. But my problem is that column is not becoming input editable. Could you pls tell me how can i make that field editable?
    Thanks in advance.

    Hi Piyali,
    Use SET PARAMETER & GET PARAMETER ID  .
    You will get it.
    Best Regards,
    Pravin

  • ORA-28232: invalid input length for obfuscation toolkit

    hi,
    i am facing this error when i enterd more then 8 charecter in the input string.
    ORA-28232: invalid input length for obfuscation toolkit
    why i cant user more then 8 charecter for password.?

    Rajnish Chauhan wrote:
    hi,
    i am facing this error when i enterd more then 8 charecter in the input string.
    ORA-28232: invalid input length for obfuscation toolkit
    why i cant user more then 8 charecter for password.?
    28232, 0000, "invalid input length for obfuscation toolkit"
    // *Cause:  Length of data submitted for encryption or decryption is not a
    //          multiple of 8 bytes.
    // *Action: Make sure that the length of the data to be encrypted or decrypted
    //          is a multiple of 8 bytes.since you did not share with us exactly what you did, we can say exactly what you did wrong.
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8

    Hello!
    I have encrypted/decrypted one String with DES. I tried to do so on one computer and it seams to work fine. But what I realy want is to encrypt 3 String: username, id, and password, and send them to server. On server I want to decrypt them, and use them to check in database if the person exist. I save this 3 String in an ArrayList, and use ObjectInput/OutputStream to send and receive. Here is some of my code(I hope it is enough for you to help me solve this problem,othervice I will send more).
    I get this error: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
    public class CryptDecryptString {
    public byte[] cryptString( String password) throws UnsupportedEncodingException, InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException{
    byte [] plainTextPassword = password.getBytes("UTF-8");
    System.out.println(new String(plainTextPassword,"UTF-8"));
    //SecureRandom sr = new SecureRandom();
    String nyckeln = "HELLOHEJ";
    byte rawKeyData[] = nyckeln.getBytes();
    DESKeySpec dks = new DESKeySpec(rawKeyData);
    SecretKey key = SecretKeyFactory.getInstance("DES").generateSecret(dks);
    Cipher cipher=Cipher.getInstance("DES");
    cipher.init(Cipher.ENCRYPT_MODE, key);//, sr);
         System.out.println("\nStart encryption:");
    cipher.init(Cipher.ENCRYPT_MODE,key);
         byte[] cipherTextPassword=cipher.doFinal(plainTextPassword);
         System.out.println("Finish encryption:");
         System.out.println(new String(cipherTextPassword));
    return cipherTextPassword;
    }// end cryptString
    public byte[]decryptString(byte[] cipherTextPassword) throws InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException {
    String nyckeln = "HELLOHEJ";
    byte rawKeyData[] = nyckeln.getBytes();
    DESKeySpec dks = new DESKeySpec(rawKeyData);
    SecretKey key = SecretKeyFactory.getInstance("DES").generateSecret(dks);
    Cipher cipher=Cipher.getInstance("DES");
         System.out.println("\nStart decryption:");
    cipher.init(Cipher.DECRYPT_MODE,key);
         byte[] plainTextPassword=cipher.doFinal(cipherTextPassword);
         System.out.println(" Finnish decryption:");
         System.out.println(new String(plainTextPassword,"UTF-8"));
    return plainTextPassword;
    }// end decryptString
    {public boolean TryLogin(String uname, String insID, String pass) throws Exception{
            connect();
            //sendOutStream = new DataOutputStream(socket.getOutputStream());
            sendOutStream = new ObjectOutputStream(socket.getOutputStream());
            InputStream inpuStream;
            inpuStream = socket.getInputStream();
            BufferedReader in= new BufferedReader(new InputStreamReader(inpuStreamtext s));
            CryptDecryptString cryptString = new CryptDecryptString();
          String krypteradeUname = cryptString.cryptString(uname);
           String krypteradeInsID = cryptString.cryptString(insID);
            String krypteradePass = cryptString.cryptString(pass);
            ArrayList<String> loggInPersonInfo= new ArrayList<String>();
                                   loggInPersonInfo.add(krypteradeUname);
                                   loggInPersonInfo.add(krypteradeInsID);
                                   loggInPersonInfo.add(krypteradePass);
                                   Object[] elements = loggInPersonInfo.toArray();
    for(int i=0; i < elements.length ; i++)
    System.out.println(elements);
    sendOutStream.writeObject(loggInPersonInfo);
    sendOutStream.close();
    sendOutStream.flush();
    System.out.println("Skickade information...");
    int line = in.read();
    if(line > 0){
    user_id = line;
    return true;
    }else{
    return false;

    Here is the rest of code
    public void CheckLogin() throws SQLException, IOException, InterruptedException, InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, Exception{
    /**InputStream inpuStream;
    inpuStream = client.getInputStream();
    BufferedInputStream in= new BufferedInputStream(inpuStream);//(new BufferedReader(inpuStream));
    inpuStream = client.getInputStream();
    ObjectInputStream objectIn = new ObjectInputStream(inpuStream);
    ArrayList<String> personLoggIn = new ArrayList<String>();
    String krypteradeUname;
    String krypteradeInsID ;
    String krypteradePass ;
    personLoggIn = null;
    personLoggIn = (ArrayList<String>)objectIn.readObject();
    for (int i=0;i<personLoggIn.size();i++) {
    krypteradeUname=personLoggIn.get(0);
    krypteradeInsID =personLoggIn.get(1);
    krypteradePass = personLoggIn.get(2);
    System.out.println(i);
    inpuStream.close();
    CryptDecryptString decryptString = new CryptDecryptString();
    byte[] byteUname = decryptString.decryptString((krypteradeUname.getBytes()));
    String username = new String(byteUname);
    byte[] byteInsID = decryptString.decryptString((krypteradeInsID.getBytes()));
    String instanceID = new String(byteInsID);
    byte[] bytePassword = decryptString.decryptString((krypteradePass.getBytes()));
    String password = new String(bytePassword);
    Please help!
    Thanks!

  • Creation of a product description field of length 250 car. used for search?

    Hi all,
    we need to create a specific description field for products  with a length of 250 (the standard description is too short at 40 car, =>table COMM_SHTXT) . That field should also be added to the search criteria.
    What would be the best solution for this creation , given that the field must exist also in ECC SD from where the product is replicated to CRM :
    -creation of a Z-append to the product table in ECC (table MARA?) and a corresponding include in the product table in CRM (COMM_PRODUCT) ?
    -creation of an attribute in ECC (or Z-append) and creation of a "set attribute" in CRM (i.e transaction COMM_ATTRSET), but there are warning in CRM when you create an attribute of length > 132.
    -using the standard Texts (no limitation of lenght) attached to products : is a search possible on these texts?or too complicated/poor performance ?
    Regarding the display in CRM UI, is it possible to display all the 250 caracters  if the field is a customized "set attribute" or a Z-append? It seems that it is not possible to display a string field on more than one line in the UI configuration, or even, on more than 8 columns in an assignment block?
    thanks for your help
    Ludovic

    well, I have found at least how to replace the error message (length of max 75 car  for PC UI) . Instead of trying to edit manually table T100C, there is an entry in customizing SPRO (cross appl/SAP Product/basic settings/Define Characteristics of System Messages
    ) which allows to customize standard messages , and so change from Error to Warning.

Maybe you are looking for

  • Zoom Level Setting Does not Stay Constant

    HP Pavilion dv7-6163us Entertainment Notebook PC The zoom level is set at 125 but keeps changing as I go to different screens.  It bounces to 150  and I have to cycle it thru 100 and then 125.  It will not stay at 125 and  I cannot find a solution to

  • Dynamic Filter Capabilities

    Hello, We are trying to write a query that will allow an end user to select a "BOM" number from a selection field, and based on the "BOM" number selected, allow the user to select from the available dates where this BOM has been changed.  I wrote the

  • BAPI to calcualte pricing(Condition)

    Hi, I would like to know is there any BAPI available to calculate pricing for quotation(Maintain Quotation) I have done enough of search by exploring BAPI like PO create, PO change, No bapi is available to maintain quotation Please suggest and this i

  • Possible fix for when podcasts suddenly stop working

    Just an FYI about a fix for a problem which a lot of other people seem to have had over the years, without a solution. My own podcast was working fine for a year (I used iTunes 10 & 11 in Windows 7) and then suddenly I couldn't refresh it  or stream

  • Open a file in safari crashes

    when I go to upload a file by selecting file / open file. It begins to load Imovie project library and safari freezes. Is there any way I can make it so that when I go to upload a file. As in trying to upload pictures to facebook that it opens Iphoto