Radio Button of two columns to be grouped

Dear Experts,
I have a table with columns like SUBSCRIBE and UNSUBSCRIBE which are wdy_boolean data type and displaying as radio buttons.
The problem is both columns are displaying as selected and want to make these two columns as group so only one can be selected.
I mapped cell variant with other column but its not hit.
Please suggest.
Thanks & Regrads
Siva Mandapudi.

Hello Siva,
To achieve this functionality do the following
1. Create one context attribute by name 'selectedValue' ( type string) under the context node of the table
2. create two columns in the table with name SUBSCRIBE and UNSUBSCRIBE (as you did already). let the cell editor be RadioButton. Cell variants are  not required
3. Now for the SUBSCRIBE radio button, bind the 'selectedKey' property to 'selectedValue' context attribute. And maintain the 'KeyToSelect' property as 'SUBSCRIBE'
4. for the UNSUBSCRIBE radio button, bind the 'selectedKey' property to 'selectedValue' context attribute. And maintain the 'KeyToSelect' property as 'UNSUBSCRIBE'
so whenever the user selects a radiobutton, corresondinf values SUBSCRIBE or UNSUBSCRIBE will be stored in the selectedValue context attribute.
Hope this helps. you can refer the following article for more details
[http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d0aba847-ff58-2c10-4a98-c0fad334c5aa]
BR, Saravanan

Similar Messages

  • Radio button in three column in a single selection-screen

    Hi,
    I am trying to create radio buttons with three column within a single selection-screen.
    I.e.
    Column 1:
    radio1
    Column2:
    radio2
    radio3
    column3:
    radio4
    radio5
    radio6
    Also I wish to give three names(as headers) to each columns.Is is possible?If yes how?

    Hi,
    write as :
    SELECTION-SCREEN COMMENT /1(50) text-001.
    PARAMETERS: r1 RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN COMMENT /1(30) text-002.
    PARAMETERS: r2 RADIOBUTTON GROUP rad1,
                r3 RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN COMMENT /1(30) text-003.
    PARAMETERS: r4 RADIOBUTTON GROUP rad1,
                             r5 RADIOBUTTON GROUP rad1,
                             r6 RADIOBUTTON GROUP rad1.
    Regards,
    Srini.

  • How to create radio button between two slection screen

    hello all.
    could you please guide me how to create radio button between two SELECTION-SCREEN  in screen painter.
    Thank you,
    srinivas

    hi
    SEE THIS CODE
    REPORT  ZNNR_REPORT NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
    ******DATA DECLARATIONS**********
    DATA : BEGIN OF IT_PLANT OCCURS 0,
            MATNR LIKE MARA-MATNR,
            WERKS LIKE MARC-WERKS,
            PSTAT LIKE MARC-PSTAT,
            EKGRP LIKE MARC-EKGRP,
           END OF IT_PLANT.
    DATA : BEGIN OF IT_PONO OCCURS 0,
            EBELN LIKE EKKO-EBELN,
            EBELP LIKE EKPO-EBELP,
            MATNR LIKE EKPO-MATNR,
            WERKS LIKE EKPO-WERKS,
            LGORT LIKE EKPO-LGORT,
           END OF IT_PONO.
    TABLES EKKO.
    ********END OF DATA DECLARATIONS*********
    ********SELECTION SCREEN DESIGN ***********
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
    SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R3 RADIOBUTTON GROUP G2 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R3.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R4 RADIOBUTTON GROUP G2.
    SELECTION-SCREEN COMMENT 5(20) TEXT-004 FOR FIELD R4.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R2 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    ******END OF SELECTION SCREEN DESIGN****************
    <b>rEWARD IF USEFULL</b>

  • Radio button in two different blocks in the selection screen

    Hi folks,
             In my selection screen i have two selection blocks. First block to create a new document no, second block to display the list of the created document numbers.User has to go any one of that..can i keep first radio button in the first selection block and the second radio button in the second block...I have already tried..but its not allowing..is this possible..if so please suggest me how...
               Thanks,
               Shyam.

    Hi,
    Hope the following logic will help u.
    selection-screen begin of block input with frame title text-000.
    parameters :desktop     radiobutton group rg_f user-command rg_f,
                       in_file type ibipparms-path modif id ps,
                menu     radiobutton group rg_f,
                       sys_file type ibipparms-path modif id as default  '/sapia/iface/in/comm/sapfin/' .
    selection-screen end of block input.
                                        AT SELECTION-SCREEN.                                       *
    at selection-screen.
      case sy-ucomm.
        when 'RG_F' or 'RG_B'.
          perform f_toggle_finputs.
        when 'ONLI'.
          if ( desktop = c_x and in_file is initial ) or ( menu = c_x and sys_file is initial ).
            message e100.
          endif.
      endcase.
    FORM    :  f_toggle_finputs
    loop at screen.
        if screen-group1 = 'PS'.
          if desktop = c_x.
            screen-input    = 1.
             sys_file = c_server_path.
          else.
            screen-input    = 0.
          endif.
        endif.
        if screen-group1 = 'AS'.
          if menu = c_x.
            screen-input    = 1.
            clear: in_file.
          else.
            screen-input    = 0.
          endif.
        endif.
        modify screen.
      endloop.
    endform. "f_toggle_finputs
    Thanks.

  • Radio button in table column

    Hi,
    I display a table of data. The user wants to select a row. For this, there is a column called "Select" with a radio button. The user is allowed to select only one column, but they want to do it by clicking on a radio button, not using lead selection. My problem is, that several of the radio buttons are "selected". How do I make only one radio button selectable? I want to be able to click on one radio button, and if I click on another one the first choice should be vacated.
    Or if I were to use lead selection, is there an easy way to tie the radio button with the lead selection. Like, if the user selects a row, can the radio button in this row get turned on automatically?
    I welcome any hints
    Thanks,
    Ira

    Hi Ira,
    I'm not sure I understand why you would want this as lead selection should be sufficient for most selection cases.  Still, one way you could use this is to embed an action hander to the OnLeadSelection event of the table.  Here are my thoughts:
    1. Have an attribute in the context node of type WDY_BOOLEAN or some other boolean to represent your radio button.
    2. Bind the cell editor of your colum to a radio button or check box and set the value to the context attribute.  You will also want to set the enabled setting to FALSE.
    3. Add an action to OnLeadSelect for your table
    4. Have the action handler do your button logic.
    Perhaps if you give an example of the scenario for this, I'd be able to help with the solution.
    Regards,
    Adam

  • Two radio button in each row of Table view

    Hi,
    I have a issue like two radio button should come in each row of the tableview and any one only can be selected and selected value should be assigned to a variable.
    Kindly help with coding in methods RENDOR_CELL_START AND RENDER_ROW_START.
    Thanks in Advance.
    Saravanan.

    Saravanan,
    If you keep the Radiobutton in 2 different column then it wil difficult to put it in one Radiobuttong Group. I am not sure its possible or not. I would suggest you do keep both the "Approved" & "Rejected" radio button in single column as shown below so that the memont "Rejected" is selected, "Approved" will be unchecked.
    WHEN 'Your Column'.
            DATA: RAD_GRP TYPE REF TO CL_HTMLB_RADIOBUTTONGROUP,
                     RAD_BTN  TYPE REF TO CL_HTMLB_RADIOBUTTON,
                     COL_BEE TYPE REF TO CL_BSP_BEE_TABLE.
              CREATE OBJECT COL_BEE.
              RAD_GRP = CL_HTMLB_RADIOBUTTONGROUP=>FACTORY(
                      ID = P_CELL_ID COLUMNCOUNT = '2' ).
              COL_BEE->ADD( ELEMENT = RAD_GRP LEVEL = 1 ).
              RAD_BTN ?= CL_HTMLB_RADIOBUTTON=>FACTORY( ID = '1' TEXT = 'Approved' ).
              COL_BEE->ADD( ELEMENT = RAD_BTN LEVEL = 2 ).
              RAD_BTN ?= CL_HTMLB_RADIOBUTTON=>FACTORY( ID = '2' TEXT = 'Rejected' ).
              COL_BEE->ADD( ELEMENT = RAD_BTN LEVEL = 2 ).
              P_REPLACEMENT_BEE ?= COL_BEE.
          ENDCASE.
    Again to get the selected radiobutton, use method REQUEST->GET_FORM_FIELDS
    DATA: GT_TIHTTPNVP TYPE TIHTTPNVP.
    REFRESH GT_TIHTTPNVP.
    CALL METHOD REQUEST->GET_FORM_FIELDS
      CHANGING
        FIELDS = GT_TIHTTPNVP.
    For example, suppose your 3r column has 2 radio buttons & In 1st Row if you've selected the radiobutton 2. THen get_form_fields return the below value.
    TV1_1_3 = 2. Here TV1 is tableview name & 1 - Row 1 & 3 -Column three. value 2 indicates that 2nd radio button is selected.
    DO 10 TIMES. "Here 10, stands for number of visible rows in tableview
    concantenate 'TV1' '_' sy-tabix '_' '3' into v_cell_id. "Here now v_cell_id will have TV1_1_3 for 1st row & etc..
    Read table GT_TIHTTPNVP into wa with key name = v_cell_id.
    if sy-subrc = 0.
    v_selected_rad_btn = wa-value. " THis will give you the selected radio button.
    endif.
    enddo.
    Hope this will solve your problem.
    Raja T
    Message was edited by:
            Raja Thangamani

  • Grouping Radio Buttons in DataTable

    I am looking for code snippet which renders radio button group in datatable. I have the following snippet which has the following problems
    1) it displays -1 next to radio button as its the value assign to selectedRowId in backing bean
    2) the radio button selection doesnt clear off . i.e. i can select multiple radio buttons at the same time
    3) when i select first radion button it correctly displays the index as 0 but for subsequent radio buttons it doesnt show correct index value
    Here is the snippet
    <a4j:outputPanel >
    <h:dataTable id="deviceDetailTable" styleClass="list" rowClasses="odd,even"
    value="#{deviceDetailBean.tableRow}" var="vartableRow"
    width="80%">
    <h:column id="column1">
    <h:selectOneRadio id="radio1" value="#{deviceDetailBean.id}">
    <a4j:support event="onclick" reRender="selectors" />
    <f:selectItem itemValue="#{deviceDetailBean.selectedRowId}" />
    </h:selectOneRadio>
    </h:column>
    <h:column>
    <f:facet name="header"><h:outputText value="MAC"/></f:facet>
    <h:outputText id="mac" value="#{vartableRow.mac}" />
    </h:column>
    <h:column>
    <f:facet name="header"><h:outputText value="Namespace"/></f:facet>
    <h:outputText id="mac" value="#{vartableRow.namespace}" />
    </h:column>
    <h:column>
    <f:facet name="header"><h:outputText value="IP Address"/></f:facet>
    <h:outputText id="mac" value="#{vartableRow.ipAddress}" />
    </h:column>
    <h:column>
    <f:facet name="header"><h:outputText value="Host Name"/></f:facet>
    <h:outputText id="mac" value="#{vartableRow.hostName}" />
    </h:column>
    <h:column>
    <f:facet name="header"><h:outputText value="Name Type"/></f:facet>
    <h:outputText id="mac" value="#{vartableRow.nameType}" />
    </h:column>
    </h:dataTable>
    </a4j:outputPanel>
    Here is the snippet in Backing Bean
    private Integer id;
    private int selectedRowId = -1;
    with setter/getter methods
    Regards
    Bansi

    Hello There,
    I too am stuck up with the same problem. My HTML document contains two radio buttons which belong to the same group. But when displayed on a Jeditorpane the radio buttons does'nt behave as a part of a group. Both the radio buttons get selected. If you have come across a solution..please help me..
    Thanx
    Mohamed Zafer

  • Grouping radio buttons in JEditorPane

    I can't seem to make grouping of radio buttons work for an html page that's loaded into a JEditorPane. The content type is set properly to text/html. Is there a little trick that I'm missing??
    Once I select a button that's not part of a previous group, it unselects that previous group anyway!!

    Hello There,
    I too am stuck up with the same problem. My HTML document contains two radio buttons which belong to the same group. But when displayed on a Jeditorpane the radio buttons does'nt behave as a part of a group. Both the radio buttons get selected. If you have come across a solution..please help me..
    Thanx
    Mohamed Zafer

  • Radio button on selection screen event issue.

    Hi all,
    I have two radio buttons and two input mandatory fields on selection screen.
    - If  first radio button selected then some value 'ABC' should fill in second input field.(because it is a mandatory field)
    - If  second radio button selected then some value 'XYZ' should fill in first input field..(because it is a mandatory field)
    If suppose, user deletes first input value (ABC) and selects second Radio then, ABC to automatically display on first input field as this is mandatory. Same like,If he deletes second input field value and selects first radio, it should display XYZ in second input field. (As these fields are mandatory and requires some value).
    I tried with below code, but not working. Appreciate your quick response.
    PARAMETER          ppart RADIOBUTTON GROUP src  DEFAULT 'X'.
    SELECT-OPTIONS  p_sndprn FOR edoc_stat-sndprn OBLIGATORY DEFAULT 'ABC'.
    PARAMETER         psndr RADIOBUTTON GROUP src.
    SELECT-OPTIONS p_sendid FOR zabc-sndlad OBLIGATORY DEFAULT 'XYZ'.   
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP src.
    IF SSCRFIELDS-UCOMM = 'PRGP'.
      IF ppart EQ 'X'.
           P_SENDID-LOW = 'XYZ'.
      ELSE.
          P_SNDPRN-LOW = 'ABC'.
      ENDIF.
    ENDIF.
    Thanks,
    Ranjith.

    Search the forum... don't make fields obligatory and use event AT SELECTION-SCREEN OUTPUT.

  • Radio button dynamic events

    Hai,
    I am using two radio buttons above the table. If i click first radio button table below should show the fields with some colyumn in drop down option. if i select other one it should show the table cell with editable options(instead of drop down). any ideas pls

    Hi Uday/Rupa,
    i did the similar scenario and i got the output.I didnt give complete logic in my previous post that was outline logic.
    If you change the celleditor dynamically you can accomplish this.
    I have taken this scenario.I have one check box and one table in my view.When check box is not selected i am showing radio buttons in the column of table.
    when i select the check box i am showing the column data in editable mode.
    Write the below code in WDDOMODIFYVIEW
    obj_table ?= view->get_element( 'TABLE1' ).
    data: lr_event type ref to cl_wd_custom_event,
          lr_radio type ref to CL_WD_RADIOBUTTON.
    i am calling this event handler method and i am initializing the value CHECK_VAL which i declared in the attributes of view.     
      *wd_this->onactioncheck(*
        *wdevent = lr_event          " Ref to cl_Wd_Custom_Event*
    if wd_this->check_val is not initial.
    lr_column = obj_table->get_column(
                   id         = 'TABLE1_PRICE'
    *              INDEX      = INDEX
    lr_input = cl_wd_input_field=>new_input_field(
          bind_value          = 'FLIGHTS.PRICE'
          id                  = 'IP1'
    lr_input->set_read_only( value = abap_false   ).
    lr_column->set_table_cell_editor( the_table_cell_editor = lr_input  ).
    else.
    lr_column = obj_table->get_column(
                   id         = 'TABLE1_PRICE'
    *              INDEX      = INDEX
       lr_radio =   cl_wd_radiobutton=>new_radiobutton(
    *              BIND_ENABLED        = BIND_ENABLED
    *              BIND_KEY_TO_SELECT  = BIND_KEY_TO_SELECT
    *              BIND_KEY_VISIBLE    = BIND_KEY_VISIBLE
    *              BIND_READ_ONLY      = BIND_READ_ONLY
                  bind_selected_key   =  'RAD1'
    *              BIND_STATE          = BIND_STATE
    *              BIND_TEXT           = BIND_TEXT
    *              BIND_TEXT_DIRECTION = BIND_TEXT_DIRECTION
    *              BIND_TOOLTIP        = BIND_TOOLTIP
    *              BIND_VISIBLE        = BIND_VISIBLE
    *              ENABLED             = ABAP_TRUE
    *              EXPLANATION         = EXPLANATION
                   ID                  = 'RD1'
    *              KEY_TO_SELECT       = KEY_TO_SELECT
    *              KEY_VISIBLE         = KEY_VISIBLE
    *              ON_SELECT           = ON_SELECT
    *              READ_ONLY           = READ_ONLY
    *              STATE               = E_STATE-NORMAL
                   TEXT                = 'Radio'
    *              TEXT_DIRECTION      = E_TEXT_DIRECTION-INHERIT
    *              TOOLTIP             = TOOLTIP
    *              VIEW                = VIEW
                  VISIBLE             = '02'
    lr_column->set_table_cell_editor( the_table_cell_editor = lr_radio  ).                 
    endif.
    See the output.
    I am unable to paste my output images here using picasa.
    Thanks
    Suman.

  • Why does is not show the radio buttons

    I want to display the buttons in a row then radio button in a row under the button and then log scroll pane under the radio buttons. This is my code:
            //Add the buttons and the log to this panel.
            add(buttonPanel, BorderLayout.PAGE_START);
            add(radioPanel, BorderLayout.CENTER);
            add(logScrollPane, BorderLayout.CENTER);When i run it it display the buttons and the logsrollpane. Why does it not display the radio buttons?

    Thanks guys.
    This is my problem. We have a big system that produce lots of log files and the software testers have to manually have to go through the logs file and look for a certain XML tags in the log file.
    What I want to do is help the software testers my developing a small tool that will allow them to open a log file and then click on a radio button corresponding to a xml tags that they are looking for and automatically highlight the tags in the file in yellow color .
    I am not sure how feasible this is and I am stuck.
    This is what I have done so far.
    Can you please guys help me go forward.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class FileChooserDemo extends JPanel
                                 implements ActionListener {
        static private final String newline = "\n";
        JButton openButton;
        JButton clearButton;
        JTextArea log;
        JFileChooser fc;
        // Radio Buttons
        static String em01 = "EM01";
        static String em07 = "EM07";
        /*static String dogString = "Dog";
        static String rabbitString = "Rabbit";
        static String pigString = "Pig";*/
        public FileChooserDemo() {
            super(new BorderLayout());
            //Create the radio buttons.
            JRadioButton em01Button = new JRadioButton(em01);
            em01Button.setMnemonic(KeyEvent.VK_B);
            em01Button.setActionCommand(em01);
            em01Button.setSelected(true);
            JRadioButton em07Button = new JRadioButton(em07);
            em07Button.setMnemonic(KeyEvent.VK_C);
            em07Button.setActionCommand(em07);
            //Group the radio buttons.
            ButtonGroup group = new ButtonGroup();
            group.add(em01Button);
            group.add(em07Button);
            //Register a listener for the radio buttons.
            em01Button.addActionListener(this);
            em07Button.addActionListener(this);
            //Put the radio buttons in a column in a panel.
            JPanel radioPanel = new JPanel(new GridLayout(0, 1));
            radioPanel.add(em01Button);
            radioPanel.add(em07Button);       
            //Create the log first, because the action listeners
            //need to refer to it.
            log = new JTextArea(40,60);
            log.setMargin(new Insets(5,5,5,5));
            log.setEditable(false);
            JScrollPane logScrollPane = new JScrollPane(log);
            //Create a file chooser
            fc = new JFileChooser();
            //Uncomment one of the following lines to try a different
            //file selection mode.  The first allows just directories
            //to be selected (and, at least in the Java look and feel,
            //shown).  The second allows both files and directories
            //to be selected.  If you leave these lines commented out,
            //then the default mode (FILES_ONLY) will be used.
            //fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            //fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
            //Create the open button.  We use the image from the JLF
            //Graphics Repository (but we extracted it from the jar).
            openButton = new JButton("Open File");
            openButton.addActionListener(this);
            //Create the save button.  We use the image from the JLF
            //Graphics Repository (but we extracted it from the jar).
            clearButton = new JButton("Clear Text Area");
            clearButton.addActionListener(this);
            //For layout purposes, put the buttons in a separate panel
            JPanel buttonPanel = new JPanel(); //use FlowLayout
            buttonPanel.add(openButton);
            buttonPanel.add(clearButton);
            //Add the buttons and the log to this panel.
            add(buttonPanel, BorderLayout.PAGE_START);
            add(radioPanel, BorderLayout.LINE_START);
            add(logScrollPane, BorderLayout.CENTER);
        public void actionPerformed(ActionEvent e) {
            //Handle open button action.
            if (e.getSource() == openButton) {
                int returnVal = fc.showOpenDialog(FileChooserDemo.this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                     log.setText("");
                    File file = fc.getSelectedFile();
                    try{
                         BufferedReader in = new BufferedReader(new FileReader(file));
                             String data;
                             while ((data = in.readLine()) != null) {
                                  log.append(data + newline);
                    }catch(IOException ioe){
                log.setCaretPosition(log.getDocument().getLength());
            //Handle save button action.
            }else if (e.getSource() == clearButton) {
                  log.setText("");
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("PROGRESS Message Viewer");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            JComponent newContentPane = new FileChooserDemo();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

  • How to disable when one radio button is selected

    Hi Folks,
    One of our requirement is as follows,
    Scenario: We have two columns with radio buttons and two dropdown box for the same columns to select the values.
    Requirement: When user select one radio button then the other radio button and its relevant dropdown both is disabled.
    Radio Buttons:
    Company
    EmpNo
    Dropdown Box:
    Company
    EmpNo
    If CompName Radio button is selected then Radio Buttom and Dropdown Box for Policy Id is disabled.
    Finally, The filter is applied on CompName to populate the values in dropdown
    Thanks Guys,
    KK

    look for a function like setActive or setDisable

  • How to create a radio button on OA Page using Personalization

    I am trying to create a radio button on OA Page using Personalization. The item style , I can see is Message Radio Group.
    How to create Message Radio Button and bring them under one group.
    Thanks

    You should use jdev to define a radiogroup and radio buttons under that, wrap that definition inside a stackLayout in jdev, use personalization to add a stackLayout and extend the region which you had created earlier in jdev.

  • Calling an action on Click of Radio Button

    Hi,
    We have a form in which we need to display two radio buttons and two dropdown lists. Depending on the selection of Radio Button the drop down list should change.
    To get the different data in the dropdown based on the selection of radio button, what would be the best method?

    a.If the data is fairly static and little, then you could get it all at once and use standard javascript (or a toolkit like jquery)
    b. If the data is potentially large, then you could use javascript + ajax + dhtml using a toolkit like jquery
    c. If you cant use javascript , then you would have to first change the UI to have a submit button , then its like any other pageflow action.
    what would be the best methodDepends on what attributes you wish to measure best , development time, accessibility, response times etc.
    regards
    deepak

  • Sub screen: Handling the Radio button selection?

    Hi,
    Scenario:
    I have a Main screen and a sub screen. From the main screen I am calling the sub screen. On the Sub screen, I have 2 radio button. On the selection of the Radio buttons, I am activating/deactivating few of the screen elements on the sub screen.
    I have grouped the radio button and also tried assigning Function code to it, but in vain..:(
    Issue
    I am not able to handle the event triggered by the selection of the radio buttons?
    Kindly suggest.
    Regards
    s@k

    Hi,
    Are you still have any Issue, Let us know
    In the Main Screen Element List there is a field OK_CODE pass an entry into it
    in the TOP Include
    DATA : OK_CODE type SY-UCOMM. " This captures the OK_CODE from the Screen.
    Since SUb Screen cant have their Own OK_CODE this can be handled in the Main Screen only
    Try in PAI of Sub Screen using OK_CODE if it is not working then Implement the same in PAI of Main Screen
    The system will generate UCOMM for Radio Button since they are in One Group only. Each Radio button cannt have a separate UCOMM assigned. In Screen Painter (if It is Module Pool) assign a FCode for the Radio Button.
    Even if try changing the FCODe Value they still will have the New Changed Value but cannot be changed.
    This automatically triggers PAI . only way to capture it is check
    case ok_code. " Optionally you can omit this
    when  ok_code = 'RAD'.  " This is common for all the Radio BUttons but cant be different
    if r1 = 'X'.
    elseif r2 'X' " Etc.
    endif.
    endcase.
    Ram
    Edited by: Ramchander Krishnamraju on Feb 26, 2010 10:37 AM

Maybe you are looking for