How to select single radio button in particular group and to calculate valu

Hi.. Experts..
I have 2 radiobutton groups and each radiobutton group consists 10 radio buttons..
in each group i want to select one radiobutton and based on the radiobutton selected the value
as to get calculated.
what happens is that if i select a radiobutton in onegroup and select in another group , radiobutton selected in previous group get's
deselected.
please help in this .. it's very urgent...
here is my code .. help if want to change the coding or is there any better way of coding then this..
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
  <htmlb:page title = " ">
    <htmlb:form>
      <%@include file="tst1.htm" %>
      <htmlb:tray id    = "2"
                  width = "100%" >
        <htmlb:gridLayout columnSize  = "15"
                          rowSize     = "3"
                          cellPadding = "5"
                          cellSpacing = "5"
                          width       = "100%" >
       <htmlb:radioButtonGroup id = "rbg1"
  columnCount = "3"
   selection = "<%= selection %>" >
          <%-- qno --%>
          <htmlb:gridLayoutCell columnIndex = "1"
                                rowIndex    = "1"
                                width       = "30" >
            1
          </htmlb:gridLayoutCell>
          <%-- Dimensions --%>
          <htmlb:gridLayoutCell columnIndex = "2"
                                rowIndex    = "1"
                                width       = "300" >
            Understands the company's vision and long-term goals and the role he/she and team members have to play in accomplishing them.
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - Don't know --%>
          <htmlb:gridLayoutCell columnIndex = "3"
                                rowIndex    = "1"
                                width       = "80" >
            Don't Know
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "3"
                                rowIndex    = "2" >
            N
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "3"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="n">
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - Rarely --%>
          <htmlb:gridLayoutCell columnIndex = "5"
                                rowIndex    = "1" >
            Rarely
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "4"
                                rowIndex    = "2"
                                width       = "20" >
            1
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "4"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "5"
                                rowIndex    = "2"
                                width       = "20" >
            2
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "5"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "6"
                                rowIndex    = "2"
                                width       = "20" >
            3
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "6"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="hello">
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - sometimes --%>
          <htmlb:gridLayoutCell columnIndex = "7"
                                rowIndex    = "1" >
            Some
            times
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "7"
                                rowIndex    = "2"
                                width       = "20" >
            4
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "7"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "8"
                                rowIndex    = "2"
                                width       = "20" >
            5
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "8"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "9"
                                rowIndex    = "2"
                                width       = "20" >
            6
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "9"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="hello">
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - most of the time --%>
          <htmlb:gridLayoutCell columnIndex = "10"
                                rowIndex    = "1" >
            Most of the time
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "10"
                                rowIndex    = "2"
                                width       = "20" >
            7
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "10"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "11"
                                rowIndex    = "2"
                                width       = "20" >
            8
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "11"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - all the time --%>
          <htmlb:gridLayoutCell columnIndex = "12"
                                rowIndex    = "1" >
            All the time
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "12"
                                rowIndex    = "2"
                                width       = "20" >
            9
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "12"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "13"
                                rowIndex    = "2"
                                width       = "20" >
            10
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "13"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          </htmlb:radioButtonGroup>
      </htmlb:gridLayout>
<%-- qno2 --%>
<htmlb:gridLayout columnSize  = "15"
                          rowSize     = "3"
                          cellPadding = "5"
                          cellSpacing = "5"
                          width       = "100%" >
<htmlb:radioButtonGroup id = "rbg2"
  columnCount = "3"
   selection = "<%= sel %>" >
          <%-- qno --%>
          <htmlb:gridLayoutCell columnIndex = "1"
                                rowIndex    = "1"
                                width       = "30" >
            1
          </htmlb:gridLayoutCell>
          <%-- Dimensions --%>
          <htmlb:gridLayoutCell columnIndex = "2"
                                rowIndex    = "1"
                                width       = "300" >
            Understands the company's vision and long-term goals and the role he/she and team members have to play in accomplishing them.
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - Don't know --%>
          <htmlb:gridLayoutCell columnIndex = "3"
                                rowIndex    = "1"
                                width       = "80" >
            Don't Know
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "3"
                                rowIndex    = "2" >
            N
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "3"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="n">
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - Rarely --%>
          <htmlb:gridLayoutCell columnIndex = "5"
                                rowIndex    = "1" >
            Rarely
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "4"
                                rowIndex    = "2"
                                width       = "20" >
            1
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "4"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "5"
                                rowIndex    = "2"
                                width       = "20" >
            2
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "5"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "6"
                                rowIndex    = "2"
                                width       = "20" >
            3
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "6"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="hello">
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - sometimes --%>
          <htmlb:gridLayoutCell columnIndex = "7"
                                rowIndex    = "1" >
            Some
            times
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "7"
                                rowIndex    = "2"
                                width       = "20" >
            4
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "7"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "8"
                                rowIndex    = "2"
                                width       = "20" >
            5
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "8"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "9"
                                rowIndex    = "2"
                                width       = "20" >
            6
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "9"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="hello">
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - most of the time --%>
          <htmlb:gridLayoutCell columnIndex = "10"
                                rowIndex    = "1" >
            Most of the time
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "10"
                                rowIndex    = "2"
                                width       = "20" >
            7
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "10"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "11"
                                rowIndex    = "2"
                                width       = "20" >
            8
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "11"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <%-- Rating Scale - all the time --%>
          <htmlb:gridLayoutCell columnIndex = "12"
                                rowIndex    = "1" >
            All the time
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "12"
                                rowIndex    = "2"
                                width       = "20" >
            9
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "12"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "13"
                                rowIndex    = "2"
                                width       = "20" >
            10
          </htmlb:gridLayoutCell>
          <htmlb:gridLayoutCell columnIndex = "13"
                                rowIndex    = "3" >
            <input type="radio" name="***" value="male">
          </htmlb:gridLayoutCell>
          </htmlb:radioButtonGroup>
        </htmlb:gridLayout>
      </htmlb:tray>
    </htmlb:form>
  </htmlb:page>
</htmlb:content>

Dont duplicate the thread, follow ur original thread Re: Regarding radio buttons
Raja T

Similar Messages

  • How to select a radio button using javascript?

    Hi,
    I have 2 radio buttons as shown below:
    <input id="poBoxRadio" name="poBoxRadio" type="radio" class="radio-btn" value="No" /> No
    <input id="poBoxRadio" name="poBoxRadio" type="radio" class="radio-btn" value="Yes" /> YesI want to select one of this radio button, according to the following condition in javascript:
    <script type="text/javascript">
    if (<%=option1%> != ""){
         // Radiobutton "No" should be selected.
    else if (<%=option2%> != ""){
         // Radiobutton "Yes" should be selected.
    </script>How can I do this in Javascript? Any help will be highly appreciated.
    Thanks,
    Rishi

    I have solved this issue using the following:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript">
    var a='', b='d';
    </script>
    </head>
    <body>
    <input id="poBoxRadioNo" name="poBoxRadio" type="radio" class="radio-btn" value="No" /> No
    <input id="poBoxRadioYes" name="poBoxRadio" type="radio" class="radio-btn" value="Yes" /> Yes
    <script type="text/javascript" defer="defer">
    <!--
    if(document.getElementById){
    if (a != ""){
    // Radiobutton "No" should be selected.
    document.getElementById('poBoxRadioYes').checked = false;
    document.getElementById('poBoxRadioNo').checked = true;
    else if (b != ""){
    // Radiobutton "Yes" should be selected.
    document.getElementById('poBoxRadioNo').checked = false;
    document.getElementById('poBoxRadioYes').checked = true;
    // -->
    </script>
    <input disabled type="button" value="UP" onclick="setVariable('move=1')">
    </body>
    </html>Thanks to all of you!

  • Connecting selection of radio button to a text or numeric field

    Hi. I am using LiveCycle Designer 8.0 and I am trying to define object properties that will allow the selection of a radio button to populate in a numeric data field at the bottom of the page. I was able to write the script to have that happen with drop-down lists, but I can't figure out how to write the script for the radio button. I also don't know if the script is supposed to apply to the radio button itself or the numeric field where I want the result to show-up. Can you please help me with some sort of an example script? Thanks.

    Hi Jen,
    I would recommend that you amend your workspace in Designer. You can show/hide palettes from the Window menu.
    Here are some pointers (which are optional):
    This is the hierarchy palette and is very handy when working with forms. You can select objects quickly and drag objects around.
    This is the Object palette, which makes it easy to drag objects onto the page.
    The main space with tabs for Design View, Master Pages, XML Source (you should not need this) and Preview.
    You can select objects in EITHER the page or the hierarchy view and then change properties in other palettes.
    The Script Editor is very important when you start to add functionality to your form. It is visible on your screen shot, but it is limited to one line in height. So I would recommend that you drag this down so that you can see a few lines of script. The Show dropdown in the Editor allows you to look at the script in various events. In the example I posted, there is script in the click event.
    Object palette (and Font & Paragraph palettes). These will allow you to make changes to various properties, depending on the object that is selected.
    You will see from the screenshot that you can position and stack the palettes to suite your screen and workflow.
    Now, in relation to your screenshot:
    You have selected a single radio button in your group. You need to select the whole exclusion group, this is easy in the hierarchy palette.
    In the Object > Binding palette you have ticked the Specify Item Values (good), but you need to edit the values to match the Display Items. For example for item "$85", the specified value should be "85".
    For starters, I would recommend that you open a few of the palettes and then have a look at my example and the screenshots. Hopefully that will clear it up for you.
    Niall

  • How can i declare a single radio button field in selection-screen ?

    How can i declare a single radio button field in selection-screen ?

    >
    Rob Burbank wrote:
    > And how will you turn it off once it is turned on??
    >
    > Rob
    Thats correct ;)...See ravi if users will ask so many things its our Job to convay the correct solution ....
    Just post your org requirement..SOo some body guide you better//
    Sas

  • How can i get Radio buttons  and parameters  in a Single Straight Line

    Hi Experts,
    How can i get Radio buttons  and parameters  in a Single Straight Line...
    Example:
       r1 r2 p1 p2.....
    Cheers,
    Priya
    Points granted.

    Write the following code for the selection screen:
    DECLARATION OF PARAMETERS.
    SELECTION-SCREEN: BEGIN OF BLOCK select WITH FRAME TITLE text-001,
                      BEGIN OF LINE.
                      SELECTION-SCREEN COMMENT 1(10) FOR FIELD p_detail.
                      PARAMETERS p_detail RADIOBUTTON GROUP r1 DEFAULT 'X'.
                      SELECTION-SCREEN COMMENT 25(10)  FOR FIELD p_summry.
                      PARAMETERS p_summry RADIOBUTTON GROUP r1.
    SELECTION-SCREEN: END OF LINE,
                      END OF BLOCK select.
    this will solve your poblem surly. reward the points if you find helpful
    Regards,
    Siddarth

  • How to set a radio button to be selected?

    I'm trying to find out how to do something that should be seemingly simple. That is to create a little function that selects a random radio button as selected. I have 3 radio buttons in a group (see code):
    </mx:ApplicationControlBar>
    <mx:RadioButtonGroup id="radiogroupZ"/>
    <mx:RadioButton x="10" y="608" label="Button 1" groupName="radiogroupZ"/>
    <mx:RadioButton x="10" y="634" label="Button 2" groupName="radiogroupZ"/>
    <mx:RadioButton x="10" y="660" label="Button 3" groupName="radiogroupZ"/>
    I've tried all kinds of code to try to set Button 1, 2 or 3 as selected but the compiler keeps giving me errors.
    Can someone give me an example of a simple function that will set one of these as highlighted? All I need is the code that basically says for example: "Select Button 1 in the group "radiogroupZ to be selected".
    Thanks

    // This will have the first button selected.
    <mx:RadioButtonGroupd id="radiogroupZ" selectedValue="somethingHere1"/>
    <mx:RadioButton x="10" y="608" label="Button 1" value="somethingHere1" groupName="radioGroupZ"/>
    <mx:RadioButton x="10" y="608" label="Button 1" value="somethingHere2" groupName="radioGroupZ"/>
    <mx:RadioButton x="10" y="608" label="Button 1" value="somethingHere3" groupName="radioGroupZ"/>
    // To select something in a function
    private function functionName():void
         radiogroupZ.selectedValue = "somethingHere1";

  • How to show/hide individual radio buttons in a single radio button list

    Can I apply javascript to checkboxes in order to show/hide individual radio buttons in a single radio button list?

    Thanks, Niall,
    I'll give it a try . . .
    Yours,
    Robert Anderson
    SWRCB WebSupport
    1001 I Street
    Sacramento, CA 95814
    8th floor 59B
    (916) 341-5950
    [email protected]
    >>> Niall O'Donovan <[email protected]> 8/5/2010 1:47 PM >>>
    Hi,
    Yes, it can be done. You just need to reference the actual button, rather than the radio button group.
    It is best if you name the radio button group AND all of the individual radio buttons.
    If the radio button group was named "myRadioButtons" and the three rb were named "yesRB", "noRB", and "maybeRB". All of this is in the hierarchy.
    Then this script in the click event of the checkbox would work:
    if (this.rawValue == 1)
         myRadioButtons.maybeRB.presence = "hidden";
    else
         myRadioButtons.maybeRB.presence = "visible";
    Hope that helps,
    Niall

  • How to detect which radio button is selected in Forms?

    I created a Form with two radio buttons, one for Male and one for Female.
    I created a Push Button with WHEN-BUTTON-PRESSED to display the selected radio button as a DIsplay Item on the same Form.
    Can any one give me some hints?
    (0) Male
    ( ) Female
    [Submit]
    When the [Submit] button is pressed, I would like to display:
    You are a man. (if Radio button selected is Male)
    You are a woman (if Radio button selected is Female)

    create item RG with property record group in block2
    add two button in this group (rg1 and rg2)
    assign value to above two buttons
    rg1 M (Male)
    rg2 F (Female)
    assign initial value to RG Say M
    You can use this item as :block2.RG in Save Button.

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

  • File name should change by selecting the radio buttons

    Hi all,
    PARAMETERs: p_file LIKE rlgrap-filename.
    PARAMETERS: p_app RADIOBUTTON GROUP rg DEFAULT 'X',
                             p_pre RADIOBUTTON GROUP rg.
    this is to download the ITAB data to presentation and application servers depending upon the radio button selected.
    if i select p_pre , then default download path is : 'C:/ download.txt'.
    if i select P_app , default download path is : '\usr\sap\EBG\SYS\profile\DOWN.TXT'.
    how the file name should change by selecting the radio buttons ?
    Thanks
    KR

    Hi,
    DATA: c_x VALUE 'X'.
    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 DEFAULT 'C:/ download.txt',
                menu     radiobutton group rg_f ,
                       sys_file type ibipparms-path modif id as default  '\usr\sap\EBG\SYS\profile\DOWN.TXT' .
    selection-screen end of block input.
    at selection-screen output.
      if desktop is initial and menu is initial.
        desktop = c_x.
      endif.
      perform f_toggle_finputs.
    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
    Hope this helps u.
    Thanks.

  • How to create a radio button in ALV Reports

    Hi all,
    Best wishes to all..
    Kindly reply me to this question... that is "How to create a radio button in ALV Report"
    Thanks and Regards
    Anjali

    HI
    here is an example :
    PROGRAM ZUS_SDN_BCALV_GRID_DEMO_2.
    Based on: BCALV_GRID_DEMO.
    TYPE-POOLS: icon.
    TYPES: BEGIN OF ty_s_sflight.
    INCLUDE TYPE sflight.
    TYPES: button1    TYPE lvc_emphsz.
    TYPES: button2    TYPE lvc_emphsz.
    TYPES: button3    TYPE lvc_emphsz.
    TYPES: button4    TYPE lvc_emphsz.
    TYPES: END OF ty_s_sflight.
    DATA:
      gt_sflight    TYPE STANDARD TABLE OF ty_s_sflight,
      gt_fcat       TYPE lvc_t_fcat.
    DATA: ok_code LIKE sy-ucomm,
         gt_sflight TYPE TABLE OF sflight,
          g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
          grid1  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container.
          CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_cnt    TYPE i.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
          CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    define local data
        FIELD-SYMBOLS:
          <ls_entry>    TYPE ty_s_sflight,
          <ld_fld>      TYPE ANY.
        READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
        CHECK ( <ls_entry> IS ASSIGNED ).
      Set all radio buttons "unselected"
        <ls_entry>-button1 =  icon_wd_radio_button_empty.
        <ls_entry>-button2 =  icon_wd_radio_button_empty.
        <ls_entry>-button3 =  icon_wd_radio_button_empty.
        <ls_entry>-button4 =  icon_wd_radio_button_empty.
        ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
                                                  TO <ld_fld>.
        IF ( <ld_fld> IS ASSIGNED ).
        Set selected radio button "selected".
          <ld_fld> = icon_wd_radio_button.
        ENDIF.
      Force PAI followed by refresh of table display in PBO
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'DUMMY'
         IMPORTING
           RC       =
      ENDMETHOD.                    "handle_hotspot_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
          MAIN                                                          *
      PERFORM select_data.
      CALL SCREEN 100.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
               EXPORTING container_name = g_container.
        CREATE OBJECT grid1
               EXPORTING i_parent = g_custom_container.
        PERFORM build_fieldcatalog.
        CALL METHOD grid1->set_table_for_first_display
         EXPORTING
           i_structure_name = 'SFLIGHT'
          CHANGING
            it_fieldcatalog  = gt_fcat
            it_outtab        = gt_sflight.
      Set event handler for event TOOLBAR
        SET HANDLER:
          lcl_eventhandler=>handle_hotspot_click FOR grid1.
      else.
        CALL METHOD grid1->refresh_table_display
         EXPORTING
           IS_STABLE      =
           I_SOFT_REFRESH =
          EXCEPTIONS
            FINISHED       = 1
            others         = 2.
        IF sy-subrc <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDMODULE.                    "PBO OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      to react on oi_custom_events:
      CALL METHOD cl_gui_cfw=>dispatch.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN OTHERS.
        do nothing
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                    "PAI INPUT
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    CALL METHOD G_CUSTOM_CONTAINER->FREE.
    CALL METHOD CL_GUI_CFW=>FLUSH.
      LEAVE PROGRAM.
    ENDFORM.                    "EXIT_PROGRAM
    *&      Form  BUILD_FIELDCATALOG
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatalog .
    define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat,
        ls_hype        TYPE lvc_s_hype.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
        I_BUFFER_ACTIVE              =
          i_structure_name             = 'LVC_S_FCAT'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_BYPASSING_BUFFER           =
        I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DELETE gt_fcat WHERE ( fieldname <> 'EMPHASIZE' ).
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
        I_BUFFER_ACTIVE              =
          i_structure_name             = 'SFLIGHT'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_BYPASSING_BUFFER           =
        I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE gt_fcat INTO ls_fcat
           WITH KEY fieldname = 'EMPHASIZE'.
      IF ( syst-subrc = 0 ).
        DELETE gt_fcat INDEX syst-tabix.
      ENDIF.
      ls_fcat-fieldname = 'BUTTON4'.
      ls_fcat-icon    = 'X'.
      ls_fcat-hotspot = 'X'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON3'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON2'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON1'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      LOOP AT gt_fcat INTO ls_fcat.
        ls_fcat-col_pos = syst-tabix.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SELECT_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM select_data .
    define local data
      DATA:
        ls_sflight    TYPE ty_s_sflight.
      SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
      ls_sflight-button1 = icon_wd_radio_button.
      ls_sflight-button2 = icon_wd_radio_button_empty.
      ls_sflight-button3 = icon_wd_radio_button_empty.
      ls_sflight-button4 = icon_wd_radio_button_empty.
      MODIFY gt_sflight FROM ls_sflight
          TRANSPORTING button1 button2 button3 button4
        WHERE ( carrid IS NOT INITIAL ).
    ENDFORM.                    " SELECT_DATA
    Regards,
    Prasanth
    Reward all helpful answers

  • Dynamic Select List / Radio Buttons triggering conditional display of field

    Hi HTMLDB Team,
    I wanted to mimic this very nice and useful HTMLDB 'select list feature' at the HTMLDB "Create Application ... from Application Export file " ... option .
    ie when you hit the form that asks you to "install the application", i,e
    Builder - Application >Export Import>Export Repository>Install Application
    you have the the following radio Options :
    Install As Application
    X Reuse Application ID 401 From Export File
    X Auto Assign New Application ID
    X Change Application ID
    New Application
    The "New Application ID" field appears only when I select "Change Application ID" radio option. That great and that's exactly what I want.
    How do you do that ?
    I am currently using a select list instead of radio list. It's the same thing ... I
    I tried " many options of the "select list with redirect .... with submit .... but I was not successfful. All I am trying to achieve is to offer a list of departments ... but when the user select "other", I want to show a text field for the user to type in the "other Department" ... without losing what I had already entered in the form previously and without actually Submitting the form . I still have other fields to enter after the select list .
    Is that possible with pure HTMLDB ?
    Or do I have to craft up some Javascript .
    I'd prefer pure HTMLDB .. I do not want to use javascript, to avoin a maintenance nightmare once I submit the code to other developers ...
    Can you pls help ?
    Thanks a lot.

    Hello,
    Take a look at these built in javascript function
    they should give you what you want.
    http://htmldb.oracle.com/pls/otn/f?p=11933:39
    CarlCarl,
    if I understand it right, these functions are already built in Apex 2.2.1.
    I need to show an item with label when user selects certain radio button. This sounds like the opposite to f_Hide_On_Value_Item_Row function.
    Can this task be done with apex built-in javascript functionality at this moment?
    Thanks

  • How to check the radio buttons in JSP

    Hi All,
    I am very new to JSP,
    I have two forms( addform and deleteform), in addform i have a table which fetch the records from database,
    and at the same time I created a radio button for each and every record(eg: If I have 10 records in database, 10 radio button will be created automaticallty).
    now I want to delete a row , by selecting correspondig radio button.
    how can i get the value of radio button in deleteform, which they checked in the addform,
    could anybody help me!!!!!!!
    with regards
    suresh

    Something like javascript
    <html>
    <head>
    <script>
    function add() {
    for(var i=0;i<document.forms[0].radio.length;i++) {
    if(document.forms[0].radio[i].checked) {
    document.forms[0].txtName.value = document.forms[0].radio.value;
    </script>
    </head>
    <body>
    <form name="form1">
    <input type="radio" name="radio" value="Radion 1">Radion 1
    <input type="radio" name="radio" value="Radion 2">Radion 2
    <input type="radio" name="radio" value="Radion 3">Radion 3
    <input type="text" name="txtName">
    <input type="button" value="Add" name="b2" onClick="add()">
    </form>
    </body>
    </html>
    or take a look a this  [link|http://www.java2s.com/Code/Java/JSP/SubmittingRadioButtons.htm]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do I make Radio Button label clickable?

    In just plain HTML, the following code will allow me to click on the radio button label text to select that radio button:
      <label for="radio1">Radio Button label</label>
      <input type="radio" value="Selected" id="radio1" />
    How can I do the same thing using HTMLB?
       <htmlb:radioButton id      = "buttonAll"
                          text    = "All"
                          key     = "ALL"
                          tooltip = "View All" />
    Wrapping the htmlb:radioButton with a <label></label> does not work - any ideas?

    Hi Lisa,
    You have to also add the <b>disable</b> attribute to the following code. This is because, <i>if the radioButton is disabled it is not selectable.</i>
    Replace the code with:
    <htmlb:radioButton id = "buttonAll"
    text = "All"
    key = "ALL"
    tooltip = "View All"
    disabled="false"
    />
    I would also suggest you to wrap the htmlb:radioButton code in <htmlb:radioButtonGroup></htmlb:radioButtonGroup>
    Hope this Solves your problem.
    Regards
    Pravesh

  • How to Create a Radio Buttons using Personlization

    Hi friends ,
    We have  requierment like , Wanted to havev two radio buttons  Employee Relative  : YES or NO values.
    These radio buttons I wanted to add on Oracle Provided page using personlization. But the Values for the radio buttons should be YES and another button is No.
    After addin it , we shall have this selected value handled in Custom Controller. How can I the radio Buttons with the above YES/No Values. Any guidelines would be greatly helpful.
    Thanks Guys
    Regards
    Raghu

    Hi,
    Using personalization you can create radio button s, the item style as: Message Radio Button
    and then extend the controller and use the below code in processrequest of the extended or custom controller:
    OAMessageRadioButtonBean appleButton = 
    (OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonOne"); //First Radio Button 
    appleButton.setName("Yes"); 
    appleButton.setValue("Yes"); 
    OAMessageRadioButtonBean orangeButton = 
    (OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonTwo"); //Second Radio Button 
    orangeButton.setName("No"); 
    orangeButton.setValue("No"); 
    May be it will help you.
    Regards
    Mahesh

Maybe you are looking for

  • Print Erro in BI Publisher

    Hi Experts, we are getting the following error when we try to print XML Publisher report in PDF format. Printing output file. Request ID : 10945693 Number of copies : 1 Printer : USNBKB08203 sh: pdftops: not found Pasta: Error: Preprocess failed. Com

  • Images pixelated in iDVD main screen

    hi all, i create an annual dvd with slideshows and videos. this is my 8th one and i've never had this problem before! i'm using the idvd them "portfolio". when i first started populated the drop zones, everything was fine. the photos i'm using are hi

  • Purchase order output error....

    Hi, Purchase order is created from a shopping cart.But PO output(via email) is not created.I am getting output error.Error log is showing message as "Incorrectly processed". Error message description is "SUM OF PERCENTAGE EXCEEDS..." and "TABLE TEM_D

  • How do enable my apple ID on my iPhone 6

    How do I enable my apple id , on my iPhone 6?

  • Delivary tolarance

    hi could please explain what is delivery tolarance?