How to Limit the user to enter in Array

Hii Friends'
I am having 1 array control in front panel .In which the user will enter the values.... now actually in real time i will visible upto 20 elements in the array control ...But the user have to enter only 5 elements in the array ....how to restrict them......... 

Will the array ever containg more than 5 elements?  If so, would you want to have more than 5 elements to be shown?   If you could have 6 elements shown, would you want the user to still be restricted to only editing the first 5?
You can resize your array on the front panel so that only 5 elements are shown.  Then right click on the array, Visible Items, and remove the check mark from index display.  Now they are restricted to seeing 5 elements and have no means of indexing the array on the front panel to get to any others.
If your use case is more complicated than that, then you will need to explain it more so that a programmatic way can be devised to allow or disallow editing of other elements.

Similar Messages

  • How to restrict the user to enter only numeric values in a input field

    How to restrict the user to enter only numeric values in a input field.
    For example,
    i have an input field in that i would like to enter
    only numeric values. no special characters,alphabets .
    reply ASAP

    Hi Venuthurupalli,
    As valery has said once you select the value to be of type integer,once you perform an action it will be validated and error message that non numeric characters are there will be shown. If you want to set additional constraints like max value, min value etc you can use simple types for it.
    On the project structure on left hand side under local dictionary ->datatypes->simple types create a simple type of type integer
    The attribute which you are binding to value property ;make its type as simple type which you made
    Hope this helps you
    Regards
    Rohit

  • How to rescrict the user to enter a manual condition type once in pricing

    Hi All,
    We are using a condition type ZSP1 in our pricing procedure. I want that the user should be able to enter the condition type only once during pricing.
    eg Suppose the user has entered ZSP1 as 100 in the sales order , then he should not be able to enter ZSP1 again in the pricing. Only one entry should be allowed for the condition type ZSP1
    Please respond if you need any further clarification.
    Regards
    Adity

    Hi,
      you can Restrict the entry of Condition type Twice with Following User Exit
    USEREXI
                             USEREXIT_PRICING_PREPARE_TKOMK
    USEREXIT_PRICIN
    we have Implemented for one our Client

  • How to force the user to enter a value in the prompt

    Is there a way to force the user to enter a value in the prompt before they run the report?
    We have a customer specific dashbaord. The user has to enter a customer number in Dashbaord prompt on a first page of the dashboard. We store that value in a presentation variable. That presenatation variable value is being referenced in all the other pages of the dashabord. If the user does not enter a values in the first page and directly navigates to the other pages on the dashbaord, the reports on the other pages start to run for all the customers. Is there a way to force the customer to enter a value in the prompt before running any of the reports on the dashboard?
    Thanks!

    by Answer prompts, do you mean Column prompt?
    I can not use Column prompt in this senario as the user should not have to enter the same customer number over and over again when he navigates from one page to another on the same dashboards. If there is a way to default the column prompts then this would be an acceptable solution.
    I have already defaulted the prompt to a value as suggested in hte blog, but the issues occurs when the user erases the defaulted value. Is there are way to set the default value within the report?
    Can you please explaing mroe about option 3 regarding Java Script. Also please let me know what other options there are so that I can check whether they will fit my needs.
    Thank you very much!

  • How can i limit the user to enter only A to Z and space in JFormattedText

    dear
    i want to use JFormatedTextField in two manners
    1.Limit the no of charecters.means in a text field only 20 charecters r allowed.
    2.and also check the enterd charecter must be a to z and space not other chareters r allowed.
    3.same for numbers means 0 to 9 and decimal.
    how can i do by using the JFormated TextFilef.

    Probably lacks in some cases but what the hell.
    * Filename:           JSMaskedTextField.java
    * Creation date:      22-mei-2004
    * Author:                Kevin Pors
    package jsupport.swingext;
    import java.awt.event.KeyEvent;
    import java.util.Arrays;
    import javax.swing.JTextField;
    * A masked textfield is a textfield which allows only a specific mask of
    * characters to be typed. If characters typed do not occur in the mask
    * provided, the typed character will not be 'written' at all. The default mask
    * for this <code>JSMaskedTextField</code> is <code>MASK_ALPHA_NUMERIC</code>
    * @author Kevin Pors
    * @version 1.32
    public class JSMaskedTextField extends JTextField {
        /** Masking for alphabetical lowercase characters only. */
        public static final String MASK_ALPHA_LCASE = "abcdefghijklmnopqrstuvwxyz ";
        /** Masking for alpha-numeric characters (lcase/ucase) only. */
        public static final String MASK_ALPHA_NUMERIC = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ";
        /** Masking for alphabetical uppercase characters only. */
        public static final String MASK_ALPHA_UCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ ";
        /** Masking for numbers only. */
        public static final String MASK_NUMERIC = "0123456789";
        /** Masking for hexadecimals. */
        public static final String MASK_HEXADECIMAL = "0123456789ABCDEF";
         * An array of keyevent constants defining which keys are always to be
         * allowed, no matter what.
        private final int[] ALWAYS_ALLOWED = new int[] { KeyEvent.VK_BACK_SPACE,
                KeyEvent.VK_DELETE, KeyEvent.VK_UP, KeyEvent.VK_DOWN,
                KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT, KeyEvent.VK_SHIFT,
                KeyEvent.VK_HOME, KeyEvent.VK_END};
        /** Boolean specifying whether casing should be ignored. */
        private boolean ignoringCase = true;
        /** Specifying whether the maskin is enabled */
        private boolean isMaskingEnabled = true;
        /** The mask for the textfield. */
        private String mask = MASK_ALPHA_NUMERIC;
         * Creates a default number field.
        public JSMaskedTextField() {
            super(null, null, 0);
            Arrays.sort(ALWAYS_ALLOWED);
         * Creates a number field, with a specified number of columns.
         * @param columns The columnnumber.
        public JSMaskedTextField(int columns) {
            super(null, null, columns);
            Arrays.sort(ALWAYS_ALLOWED);
         * Creates a JSMaskedTextField with a masking.
         * @param mask The masking to be used.
        public JSMaskedTextField(String mask) {
            super(null, null, 0);
            Arrays.sort(ALWAYS_ALLOWED);
            setMask(mask);
         * Gets the masking for this masked textfield.
         * @return Returns the mask.
        public String getMask() {
            return this.mask;
         * Gets whether this JSMaskedTextField should be ignoring casing.
         * @return Returns if the component should be ignoring casing.
        public boolean isIgnoringCase() {
            return this.ignoringCase;
         * Checks whether masking is enabled. Default should be true.
         * @return Returns true if masking is enabled, false if not.
        public boolean isMaskingEnabled() {
            return this.isMaskingEnabled;
         * Sets whether it should be ignoring casing when checking for alpha-chars.
         * @param ignoringCase The ignoringCase to set.
        public void setIgnoringCase(boolean ignoringCase) {
            this.ignoringCase = ignoringCase;
         * Sets the masking for this textfield. The masking will determine which
         * characters can be typed. If the characters in de <code>mask</code> do
         * not occur in the typed character, it won't be typed.
         * @param mask The mask to set.
        public void setMask(String mask) {
            this.mask = mask;
         * Sets the masking enabled. If <code>false</code> this component will
         * behave just like a normal textfield.
         * @param isMaskingEnabled true if masking should be enabled.
        public void setMaskingEnabled(boolean isMaskingEnabled) {
            this.isMaskingEnabled = isMaskingEnabled;
         * Sets text of this textfield. If the blah blah.
         * @see javax.swing.text.JTextComponent#setText(java.lang.String)
        public void setText(String text) {
            for (int i = 0; i < text.length(); i++) {
                if (getMask().indexOf(text.charAt(i)) < 0) { // does not occur
                    return;
            super.setText(text);
         * @see javax.swing.JComponent#processKeyEvent(java.awt.event.KeyEvent)
        protected void processKeyEvent(KeyEvent e) {
            if (!isMaskingEnabled()) {
                return;
            char typed = e.getKeyChar();
            int code = e.getKeyCode();
            for (int i = 0; i < ALWAYS_ALLOWED.length; i++) {
                if (ALWAYS_ALLOWED[i] == code) {
                    super.processKeyEvent(e);
                    return;
            if (typed == KeyEvent.VK_BACK_SPACE) {
                super.processKeyEvent(e);
            if (isIgnoringCase()) {
                String tString = new String(typed + "");
                String ucase = tString.toUpperCase();
                String lcase = tString.toLowerCase();
                if (getMask().indexOf(ucase) < 0 || getMask().indexOf(lcase) < 0) {
                    e.consume();
                } else {
                    super.processKeyEvent(e);
                    return;
            } else { // not ignoring casing
                if (getMask().indexOf(typed) < 0) {
                    e.consume();
                } else {
                    super.processKeyEvent(e);
    }

  • How to restrict the user to enter the item in purchase order?

    I want to restrict user to enter the item in purchase order.
    How can i do this?
    Please help
    Abhishek

    Hi,
       You may create a transaction variant for ME21N in SHD0 transaction. Make the item field as output only as shown below:
    Result:
       You may check the doc: Learning SHD0 with Example
    Regards,
    AKPT

  • How to force the users should enter records in detail block.

    Hi members,
    we have a master-detail form. ex like DEPT (master), EMP(detaisl multi record). after entering new dept, i want the users shoudl not leave with out EMP entries for that new dept. how can we achieve this.
    thanks in advance

    In Pre-insert trigger of Master block just check if there are any records in the detail block before commiting the record. If not found then Raise A Excepiton.

  • How to limit the user to access the survey only one time

    ?

     Is there an example for this?
    Yes:
    I don't know anything about the "DSC module" but if YOU handle the control, then YOU can intercept the event and customize it.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • How to customize SAPlogon so that the user cannot enter transaction code?

    I use PFCG to create a role which limit the choices of menu.  I create a user and set the role to the user.
    I would like to disable or hide the COmmand Field so that the user cannot enter transaction code directly.
    Is it possible to do so?
    If yes, would anyone show me how?
    Any discussion is welcome.

    anyway you are going to restrict the user authorization vai role, insted of going throught the whole tree to execute the tcode there is shotcut as command line. here you can save much more time for the user insted going through the tree always. there is no harm for the system if you keep the command line option. What and why you think it should be disabled?
    Cheers,
    -Sunil

  • How to limit the max dialog no that one user can use at the same time?

    Hi,
    I meet one performance problem that one user can open 6 sessions in the GUI and he/she can run 6 reports at the same time witch could occupy 6 dialogs in the sap R/3 instance. It makes poor performance for other users.
    Would you pls tell me how to limit the no. of sessions one user can create at the same time or how to limit the no. of dialogs one user can occupy at the same time?
    Thanks a lot!
    I used this parameters in the default profile as blew:
    rdisp/rfc_check 1
    rdisp/rfc_use_quotas 1
    rdisp/rfc_max_own_used_wp 20 (means: 20%)
    It still didn't work.
    Sean

    Hello,
    We can reserve DIA W.P by giving value to the parameter :- rdisp/rfc_min_wait_dia_wp=1(default)
    that have to necessarily remain free for other users.
    This parameter is used to reserve a number of dialog work processes for Dailog mode.
    For eg. If 10 dialog w.p. are configured for the instance(rdsip/wp_no_dia=10) and the parameter rdisp/rfc_min_wait_dia_wp=3 is set,parallel RFC's can occupy a maximum of 7 DIA W.P.3 DAI W.P. always remain free for dialog mode.
    But now the question is how we assign/restrict this free dialog w.p. to the specific user.
    Reply...
    Regards,
    JUNAID

  • How to get the user entered data?

    Hi all,
    I have created an HTMLB DynPage component.
    In That i have created my input screen with textboxes using response.write method.
    i have added one onConfirm event on which the data whould validate.
    so onConfirm method im trying to get the data with request.getParameter method which returns null...
    how to do...how to get the user entered data to do my validations...can anyone plz advice.
    Thanks,
    Viswes

    Hi
    inputfield or textbox component entered directly using response.write(...) are not htmlb , but html.
    to create portal input field (ie HTMLB), you should do something like
    this in the doProcessBeforeOutput member function
    InputField field1 = new InputField("Id1");
    field1.setSize(8); // 8 characters
    this.getForm().addComponent(field1);
    and in doProcessAfterInput member function
    InputField field1 =
    (InputField) this.getComponentByName("Id1");
    you can then manipulate the content of the field.
    Hope this help,
    Guillaume

  • How to ristric the user when data enter in lov column.

    Hi all,
    i have one page,page having lov column and submit button.
    here user select the value in to lov column and click on the submit button details ll be displayed.
    but user did not select the value in to lov means user enter the value in manually and click on the submit button at that time lov window ll be open.so how to ristric the user.plz help me its very urgent.
    Thanks
    Seshu.

    Hi,
    What is your requirement?
    You want to validate value entered by user in LOV field or not?
    If yes, then this the correct behavior.
    In no, you can disable client validations. In this case the value entered won't be validated against the LOV vo and value will be stored in the vo attribute mapped to LOV bean.
    Thanks,
    Mukesh Uchaniya

  • How to limit the number of boxes to tick in LC

    I would like to know the "javascript" in Lice Cycle to limit the number of boxes ticked
    for example i have 20 boxes and i would like that the client can only tick 5 boxes
    thank you

    Thank you Steeve
    But my problem is that i don't know which boxes the client will want to tick so all boxes have to be available at the beginning.
    When the client will have ticked 5 boxes in this case and only in this case, all others boxes must become unavailable so it is very difficult to set up
    if you have any idea
    thanks anyway
    Date: Fri, 15 May 2009 09:44:33 -0600
    From: [email protected]
    To: [email protected]
    Subject: How to limit the number of boxes to tick in LC
    This is a form validation issue. For example, you may have a text field and the value entered into that field determines which checkboxes must be completed to satisfy a validation or business rule. The attached sample requests the value "foobar" to be entered into a text field. If you enter "foobar" and exit the field, 2 of 3 checkboxes have the access property changed to "protected", meaning a user cannot no longer select those checkboxes.
    // form1.page1.subform1.input::exit - (JavaScript, client)
    if (this.rawValue == "foobar") {
        form1.page1.subform1.cb2.access = "protected";
        form1.page1.subform1.cb3.access = "protected";
    Steve
    >

  • How to limit the number of characters?

    How can the number of characters typed on a component (for example a multi line text area) limited? (such a way if the limit reaches then the keyboard should not be responded)
    This is very common in Internet application development but I don't know how this can be easily achieved by JSC?
    Thank you very much.

    Hi,
    In the properties sheet, under the data section, the length validator is available. The length validator does not stop the user from entering after the max length has been reached. Once submitted the validator will be invoked and an error message displayed. An RFE has been filed on your behalf for the same.
    Thanks
    Cheers
    Giri

  • How to capture the user change in an input field on a selection screen?

    I am coding a selection screen in which there are two input fields. The first field takes a Unix directory from the user input. Based on the input value, the second field will be populated with a the name of a file under the corresponding directory.
    My question is how I can make the program capture the user input without having to make the user press ENTER after they enter the value in the first field?
    Any help will be greatly appreciated.

    Venkat,
    Actually you led me to the real solution! It's the function module DYNP_VALUES_READ that does the trick for me. This function enables the program to capture dynamic user changes without recourse to PAI. Please refer to the code below:
    REPORT   zreiabsintf MESSAGE-ID zreiabsintfmc.
    *<HGDC------------------------------------------------------------------
    *  Selection screen for the conversion program
    *HGDC>------------------------------------------------------------------
    SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE text-001.
    PARAMETERS: p_indir   LIKE epsf-epsdirnam OBLIGATORY,                   " Inbound file directory
                p_infile  LIKE epsf-epsfilnam DEFAULT gc_infile OBLIGATORY, " Inbound file name
    SELECTION-SCREEN END OF BLOCK input.
    *<HGDC------------------------------------------------------------------
    *   Displays a file-open dialog when the user clicks the search
    *   help button next to the inbound file text field. The user
    *   can select the inbound file visually.
    *HGDC>------------------------------------------------------------------
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
    * Capture any user change to the directory.
      PERFORM check_dir_change.
    * Display the file open dialog
      PERFORM file_open_dialog CHANGING p_infile.
    *<HGDC------------------------------------------------------------------
    * Global constants
    *HGDC>------------------------------------------------------------------
    CONSTANTS:
        gc_indir  LIKE epsf-epsdirnam
                  VALUE '/interfaces/<SID>/inbound/',      " Default inbound directory template
        gc_infile LIKE epsf-epsfilnam VALUE 'input'.       " Default inbound file name
    *<HGDC------------------------------------------------------------------
    * Global data
    *HGDC>------------------------------------------------------------------
    DATA:
        gs_dynpfields   TYPE dynpread,                        " Fields of the current screen
         gt_dynpfields   LIKE STANDARD TABLE OF gs_dynpfields. " Table of the screen fields
    *&      Form  file_open_dialog
    *       Opens a dialog window for the user to choose a file in
    *       the specified Unix directory.
    *      <--P_FILE is the file to be selected.
    FORM file_open_dialog  CHANGING p_file.
    * Validate the directory.
      OPEN DATASET p_indir FOR INPUT IN BINARY MODE.
      IF sy-subrc NE 0.
        MESSAGE i001(zreiabsintfmc) WITH p_indir.    " Unable to open the given directory
        EXIT.
      ENDIF.
      CLOSE DATASET p_indir.
    * Call the dialog window to open a file in the directory.
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = p_indir
        IMPORTING
          serverfile       = p_file
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc NE 0.
        MESSAGE i002(zreiabsintfmc).                 " Failed to open the file.
        EXIT.
      ENDIF.
    ENDFORM.                    " file_open_dialog
    *&      Form  check_dir_change
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM check_dir_change .
      CLEAR gs_dynpfields.
      CLEAR gt_dynpfields.
      gs_dynpfields-fieldname = 'P_INDIR'.
      gs_dynpfields-fieldvalue = p_indir.
      APPEND gs_dynpfields TO gt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
        TABLES
          dynpfields           = gt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc  NE 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE gt_dynpfields INTO gs_dynpfields INDEX 1.
      p_indir = gs_dynpfields-fieldvalue.
    ENDFORM.                    " check_dir_change
    Thanks for all your answers! The problem is now solved.
    Edited by: Ning Hu on Apr 9, 2008 11:32 AM
    Edited by: Ning Hu on Apr 9, 2008 11:34 AM

Maybe you are looking for

  • Creating first Alert - not sending email

    Hi guys, hoping someone can point me in the right direction for creating an Alert. I've followed : How Do You Set Up A Test Event Alert That Sends An Email. [ID 455688.1] However once I've got my alert created, when I carry out the step to update the

  • N72 giving error while opening Gallery

    I m facing problem while opening Gallery. It is giving an error "Database corrupted. Some data might be lost". I think prblem is with memory card. i m able to store data in memory card but cant view it. Even i m not able to open memory card section i

  • Stream to 2 stereos AND use internet

    Hi, I can stream to one stereo and use the internet, but when I stream to 2 stereos the internet stops working, even on another laptop that is not doing the streaming. Everything is up to date. iTunes 4.7.2 I have a base station and a remote base sta

  • Compatible headset for Xpress Music - 5310

    Hi All, Can anybody tell me Xpress music 5310 phone is compatible of 2.5 mm or 3.5 mm Headset phones ?? Please reply. Message Edited by narayanan_iyer on 10-Jun-2009 11:20 AM

  • Adobe Captivate issues

    Hi, I downloaded Adobe Captivate 5 to add audio to PPT slides. The audio works well on the first slide, but from then on the audio is not getting recorded on the slides. I am trying to add some audio per slide. Please help. Thanks, Vishwas