Disable listbox after selecting item.

Hello
I want to disable the listbox after selecting some item from that list..
for example :
first the user select item from the list (at this time listbox is not disable) then after selecting, it should not allow user to change it (so i want to disable it).
I tried "loop at screen" in which i did screen-input = 0. but its not working.
Please help me...
Regards
Virendra

Hi,
TYPE-POOLS vrm.
PARAMETERS : lb TYPE char10 VISIBLE LENGTH 15 AS LISTBOX USER-COMMAND lb.
DATA :  vrm_id TYPE vrm_value-text,
          vrm_values TYPE vrm_value OCCURS 0 WITH HEADER LINE.
AT SELECTION-SCREEN OUTPUT.
  IF NOT lb IS INITIAL.
    LOOP AT SCREEN.
      IF screen-name = 'LB'.
        screen-input = 0.
"        MODIFY SCREEN. --> You forgot add this Code
"  This is a tested piece of Code Just Execute and Check
      ENDIF.
    ENDLOOP.
  ENDIF.
  LOOP AT SCREEN.
    IF screen-group1 = 'AA' OR
      screen-group1 = 'BB' OR
      screen-group1 = 'CC'.
      screen-invisible = 1.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
  REFRESH vrm_values.
  vrm_values-key = 'VBELN'.
  vrm_values     = 'VBELN'.
  APPEND vrm_values.
  vrm_values-key = 'MATNR'.
  vrm_values     = 'MATNR'.
  APPEND vrm_values.
  vrm_values-key = 'AUFNR'.
  vrm_values     = 'AUFNR'.
  APPEND vrm_values.
  vrm_id = 'LB'.
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id              = vrm_id
      values          = vrm_values[]
    EXCEPTIONS
      id_illegal_name = 1
      OTHERS          = 2.
Cheerz
Ram

Similar Messages

  • Focus shifted to next component after selecting item in combobox.....

    I have Table and a textfield as only two UI components.
    For the table i am using my custom editor(NewComboEditor.java), for this i am extending the "DefaultCellEditor" and applying this editor for my jTables first column. My custom editor simply prepares the editor by instantiating the jCombobox and sets the selected value and return it (in overwridden "getTableCellEditorComponent" method).
    I have made my combobox editable by setting "combobox.setEditable(true)" in constructor of editor while creating the instance of combobox.
    Now everything works fine except whenever i tried to select an item from the combobox , after the item selection, focus is assigned to textfield which is the nextfocusable component to jTable on which the comboboxes are rendered.
    If my jcomboboxes are not editable then selection remains on combobox only.
    The implemetation for the comboEditor and comboRenderer is as follows.
    =========================== Main frame having all compenents =================================
    public class CreateAndShowComboBoxes extends JFrame {
        protected JTable table;
         * Default constructor..
        public CreateAndShowComboBoxes() {
          Container pane = getContentPane();
          pane.setLayout(new BorderLayout());
          //create table model, this table model extends AbstractTableModel.
          MyTableModel tableModel = new MyTableModel();
          table = new JTable(tableModel);
          TableColumnModel tcm = table.getColumnModel();
          TableColumn tc = tcm.getColumn(MyTableModel.LAST_NAME);//set to column 1.
          //specify the renderer and editor.
          tc.setCellRenderer(new ComboRenderer());     
          tc.setCellEditor(new NewComboEditor());
          JScrollPane jsp = new JScrollPane(table);
          pane.add(jsp, BorderLayout.CENTER);
          JTextField textField = new JTextField();
          table.setNextFocusableComponent(textField);
          pane.add(textField, BorderLayout.SOUTH);
         * Create a frame and make it visible.
        public static void main(String[] args) {
            CreateAndShowComboBoxes stt = new CreateAndShowComboBoxes();
            stt.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            stt.setSize(400, 300);
            stt.setVisible(true);
    ============================================ComboEditor =========================================
    public class NewComboEditor extends DefaultCellEditor{
         *Default constructor.
        public NewComboEditor() {
            super(getComboBox());
            JComboBox combobox = (JComboBox)getComponent();
            combobox.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    //fireEditingStopped();
                    //stopCellEditing();
         * Override to invoke setValue on the formatted text field.
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,
                                                        int row, int column) {
            JComboBox cb = (JComboBox)super.getTableCellEditorComponent
                                            ( table, value, isSelected, row, column);
            cb.setSelectedItem(value);
            return cb;
         * @return object
        public Object getCellEditorValue() {
            JComboBox cb = (JComboBox)getComponent();
            Object o = cb.getSelectedItem();
            return o;
         * @return true
        public boolean stopCellEditing(){
            JComboBox cb = (JComboBox)getComponent();
            cb.requestFocus(true);
            return super.stopCellEditing();
         * @return combobox instance
        public static JComboBox getComboBox(){
            JComboBox combobox = new JComboBox();
            combobox.setEditable(true);
            combobox.addItem("khan");
            combobox.addItem("rawal");
            combobox.addItem("shetti");
            combobox.addItem("more");
            combobox.addItem("sohel");
            combobox.addItem("kambli");
            combobox.addItem("warne");
            return combobox;
    ========================================= ComboRenderer ====================================
    public class ComboRenderer extends JComboBox implements TableCellRenderer {
         *Default constructor.
        public ComboRenderer(){
            super();
            addItem("khan");
            addItem("rawal");
            addItem("shetti");
            addItem("more");
            addItem("sohel");
            addItem("kambli");
            addItem("warne");
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
            boolean hasFocus, int row, int column) {
          setSelectedItem(value);
          return this;
    ======================================================================================Message was edited by:
    yuvi
    Message was edited by:
    yuvi

    Hi Pravin Ghadge,
    Please Use this code for focus.
    oMat.Columns.Item("Column_UID").Cells.Item(oMat.VisualRowCount).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
    I hope it will work.
    Thanks,
    P.T.Sampath.

  • How to disable a lead selected item in a radio button group ?

    Hi,
    I have a radio button group and there are entries to create radio buttons dynamically. means there is only one radio button group in the UI design and in runtime I will be having two radio buttons (For ex: Yes and No ) . Now If I want to disable either Yes or No radio button, I am unable to do so. because If I disable the radio button group it disables both.  So, I can have lead selected item for ex: Yes which I want to disable. I want to know specifically how this Yes button to be disabled by taking lead selected index item.
    Please help.
    Thanks
    Praveen

    Try setting the radio button value of the lead selected button to abap_false/space.

  • The method of leaving cursor at selecting item of list box.

    Hello.
    Pleas let me ask about the subject!!!
    Concerning the screen by web-dynpro, I have a problem that when I select one listbox after selecting another listbox, the screen moves up to the top automatically.
    I would like to prevent from above moving.
    Could anyone specialist please tell me how leaving cursor at setelcting item of the list box.
    Thanks!!!

    Hi...
    there are two events which have been used, one is doubleclick event and the other one is on selecting the item from the list and clicking on OK button(this will be the most frequently used function, i cannot use event target event for this OK button... ) . I have attached the screen shot. Please have a look at it and let me know how can i achieve that...
    I can use custom event, but the main problem is that the inline itemeditor's details are not accessible in the code.... I can access some function from within the inline itemeditor combo box using outerDocument.myFunction() (this is something like GET). Is there a similar way, to SET the data into this itemeditor?

  • How to get the selected items from listbox

    Regarding listbox i have two questions
    1) I want to get the selected items as per the order in which ihave selected.Presently i'm getting in the ascending order.For example after selcting the 1,2,6 if i select 3 then its giving 1,2,3,6.But i want it in the order 1,2,6,3
    2)I want to select items from a single list box to many other listboxes.(ie) my first selection should goto first,second one to the second listbox and like this.How should i write the logic.
    please give me a suggestion.

    In order to have the selected items line up in accordance to the selection order, please do it one at a time. (That's the limit for that VI)
    If you need more than that (i.e. to regconize which item clicked first and which one comes later), you may have to figure it out ya
    Wish you good luck. Perhaps, someone else has a already made vi.
    Cheers!
    ian.f
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com

  • Rejection Code is Disabled After Selecting Status as "FINI"

    Hello,
    I have a document type "BUS2000116 - Service Process". In the status schema of this document, there are "OPEN", "INPR", "FINI" and "CANC". First, I select status "FINI" and i save the document. After this process, ERP billing is working and automatically an ERP billing document occurs and i can see it in the transaction history of Service Process document.
    Then i want to reject all items. After selecting "More->Reject all items", a pop-up with rejection codes appear. I selected the one of the rejection code but after this, nothing happened on the document. The status of the document and status of the items didn't change and rejection code area in items is disable.
    What do i have to do to reject all items of a service process document that has a status of "FINI"?
    Thanks for all answers.

    Hi Gobi,
    This is more on the functional side as I have debugged the status management almost completely and in event callback function CRM_STATUS_BEFORE_REJECT_EC it is clearly stated that Reject is not allowed after Complete.
    But in Help documentation it is mentioned that in CRM Service Billing in ERP functionality there is a possibility to cancel individual items and even there is a customizing step for this in ERP.
    But as I said the system does not allow rejecting after completing.
    Thanks though.
    Emre

  • Selecting item in the menu ring will disable in the another menu ring

    hi everyone,
                          I using 8 dialog check box and 8 menu ring (Items 1,2,3,4).If i make the 8 dialog check box 'true' condition the corresponding  menu rings will enabled .In that menu ring  the selected item (1 or 2 or 3 or 4) will disable in the another menu ring.how to get an optimum solution?
                                                      ​    Thanking you,
    Regards,
    Kumar.

    hi devchander,
                          By making any 4 rings with values(1,2,3,4) the disable items property  works correctly in that application . But after make all menu rings value to 0 the other numbers(1,2,3,4) are disable in first click(mouse down event).it appear after the second mouse down event only why? and
    eg:
     rings              values
    ring 1               4
    ring 2               3
    ring 3               1
    ring 4               2
    ring 1              0
    but still  other menu rings are disable the value 1.how i enable it?
    by,
    kumar.
    Attachments:
    121new.vi ‏888 KB

  • How to refresh page after selecting value from LOV item , in a tabular form

    Hi ,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, couple of issues here.
    1.
    2nd item(column) in tabular form, that LoV should get populated based user's selection value in first item LoV. So how do i refer to the value, that user selected in first item's LoV? I will have to use this reference in LoV query of my 2nd item ( on this tabular form)
    2.
    How can we refresh the page, when user selectes value in first item ( from LoV). As this is a tabular form, here item type is Select List, we dont have an option to pick item type as Select List with Submit. So problem is that when user selects value for item 1, refresh does not happen and item 2 LoV does not get populated as per user's selection in item 1.
    Please help here. Would be really appreciated.
    Thanks and Regards,
    Rave.

    Thanks Ben and Dan for your responses.
    Ben, your solution helped me with refresh of page, as page got submitted.
    This answers to my 2nd question. However, I still need to know first question, which basically is, how do i refer to the value, that user selected in first item LoV.
    Issue is, I selected the value in first item LoV, it got submitted and page fot refreshed. But after page refresh, first item LoV loses its value that I had selected last time. It does not retain the selected value after refresh.
    I have an unconditional process, that on every submit(refresh) of page, I set my items with their corresponding values. But problem is what do i mention there to refer to this item.
    I looked in view source of my page, this item is referred as f03.
    So i used "apex_application.g_f03", to set this item to its value, in my uncoditional submit process. But it did not work. I tried to refer this item as "f03" in this unconditional submit process. But still it did not help, the selected item loses its value after page refresh(submit).
    Any help here would be really appreciated. Please suggest how do we refer to this item's selected value.
    Thanks and Regards,
    Ravi.

  • Removing selected items from listbox

    Hi ADF Experts,
    I have a selectmanylistbox with few values displaying in UI and a Remove Button at the bottom.
    User selects certain items from the listbox and clicks on Remove button. The selected items should be reomved. Can anybody suggest how to do this.
    Thanks,
    Animesh

    Duplicate of https://forums.oracle.com/thread/2562542
    User, please don't ask the same question multiple times. If you don't get the answer you want it may be because you did not give the right information and or use case me understand.
    Timo

  • [ADF-UIX] updating some fields after selecting an item from messageChoice

    Hi,
    I'll try and keep it short and simple.
    How do I do the following: I have 2 ViewObjects: department - employees, they
    have a 1 - many relationship. But there's no master-detail in my ViewObjects
    (no link between my view objects)
    On my UIX page I have a input form for Employees, with a messageChoice for
    choosing a department. And I show an extra label department_description, which
    comes from Department view. How can I update this label after selecting an item
    from the messageChoice?
    Is is possible?
    I tried searching this forum, but didnt find anything, hard define search
    parameters for this :)
    kind regards
    Ido

    Hi,
    I tried it in another page, one with a read-only form for courses.
    There it kinda works for the first 2 out of 3 items in the messageChoice,
    but not the last option.
    It does give me an error in JDev during runtime though
    05/10/20 15:13:57 editCourseV2DP.uix:line 60,col 95: Illegal HTML: cannot put a <td> element in a <form> element.
    which points to <messageTextInput model="${bindings.Longname1}" id="longname1"/>
    Dont see a relation between the error and my xml source...
    and it states: 05/10/20 15:25:48 Parameter partialTargets=_uixState longname1
    so that should be ok
    Can it be because CourseView has 2 EntityObjects, course and course_codes.
    and I have a course_codeView, with just 1 EntityObject, course_codes
    So when im building the uix page I have 2 options where to pull the longname
    from, CourseView and course_codeView. I tried both btw, and only the longname
    from CourseView changes. I would expect the other one to change.
    Oh well, im kinda lost now, perhaps I'll drop this feature and think of an
    otherway to implement my screen.
    Thanks for the replies
    kind regards
    Ido

  • How to make a listbox selected item highlight color from code the same as if user click on item?

    Hi all,
    I have a listbox that gets filled with data when my program starts. I save the last selectedItem value so I set it when the program start again. But the color that the selected item has is not the same as if the user click on it (pictures below).
    The color when I set the selectedIndex=someItem is black on light grey (background)
    The color when the user clicks on the item is white on blue (background)
    Any way to make them both white on blue (background)?
    Thanks
    This is the user clicking on it:
    This is the code:

    I think the difference is focus.  When you use the mouse to select it also sets focus to the listbox so you would have to set focus to the listbox when you set the selected item.  How are you setting your selected item?  I think that by
    using a property to hold the selected item rather than setting the index that might also fix the problem.
    Lloyd Sheen

  • How order items on listbox after filled up

    I am trying to order items on windows phone c# ListBox after to receive data
    my code:
    foreach (DataRes listItem in itens)
    listView.Items.Add(new Item {
    Name = listItem.Name,
    Value = compute(listItem.X,listItem.Y),
    Best = listItem.Z,
    listView.Items.OrderBy(Best => Math.Abs(Best));
    I want order by Best absolute value...
    GHELFER

    Hi helferg01,
    Since I do not have your code, I suppose you use the following definition for the Item class:
    public class Item
    public string Name { get; set; }
    public double Value { get; set; }
    public double Best { get; set; }
    Then in order to order items on listbox by Best absolute value, please try to refer to the following code:
    List<Item> MyBoxList = new List<Item>();
    foreach (DataRes listItem in itens)
    //listView.Items.Add(new Item
    // Name = listItem.Name,
    // Value = compute(listItem.X, listItem.Y),
    // Best = listItem.Z,
    MyBoxList.Add(new Item
    Name = listItem.Name,
    Value = compute(listItem.X, listItem.Y),
    Best = listItem.Z,
    listView.ItemsSource=MyBoxList.OrderBy<Item,double>(Best=>Math.Abs(Best.Best)).ToList();
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • After selecting the value from the list box, want to disable checkbox

    hi guru,
    After selecting the value from the list box, want to disable checkbox and custom control textbox(container) in module pool.
    so please help me on this.
    thanx,
    man

    in PBO,
    loop at screen.
      if screen-name = your textbox's name.
        screen-input = 0.
        modify screen.
      endif.
    endloop.

  • Get Selected Items from ListBox

    Hi,
    How do I get the Selected items of a List in Flex.
    I am using a multi-select List.
    Thx

    Never mind..I got it.
    it as simple as that:
    Alert.show (lst.selectedItem.fieldname);
    ;)

  • Selected item getting changed after paging in paged datagrid

    I have a paged datagrid. It contains two drop downs. Once i clicked for pageing, the previously selected item getting changed. Please give me solution to solve this problem.
    Thanks & Regards
    kvpdy

    I put the dropdown in item renderer and the selected item is based on the database value. How can we store that and reapply in paging ?
    Pls give me solution....

Maybe you are looking for

  • How to download a table of data to the FPGA

    I m using an PCI7813R FPGA board and  I'm trying to download a table of data into the FPGA.  How can I do this as fast as possible and so I can easily index each data row in the fpga.  The length of the table can be variable from run to run.  A block

  • SCA6000 software download

    Hi all, I need to download the software package for the Sun Crypto Accelerator 6000 card for the linux operating system. The product page on the public oracle.com website simply redirect me to MOS while stating that software download should be done o

  • I can't make this coder in applescript work

    I'm making a script that makes a text file, then replaces some letters with others. To make it unreadable. Im doing this because what i then could use another script in reverse to make it like the text i first submitted. The problem is: When i run th

  • C7600 MVPN Issue

    Hi guys, I am witnessing a stange behaviour on one of my PEs, which seems to be breaking all conventional norms for multicast routing. Any inputs in diagnosing the root cause of this issue will be of great help. Let me give you some backgroud info fi

  • How to overwrite base.js

    Hi, I know it's not recommended but I need to overwrite base.js (weblayout\resources\schema\base.js). One function is in error. How? And especially, how to deploy it correctly with a component because everytime I modify the file manually, it's overwr