Radio buttons disabling functionality in OOPS ALV

Hi,
I am facing this peculiar problem in OOPS ALV. the requirement was to have a field and 2 radio buttons in ALV as editable when user clicks on CHANGE mode. but initially the table should be in display mode.
I have used the icons in ALV to provide the radio button functioanlity and its working.. but cant find solution to these 2 issues:
1) how to make radio button display only ?
2) when appending a new row in the ALV, its just appending a row with 4 columns ( 2 of field and 2 of radio button), but it is not able to append icons by default.
KIndly provide help on this. let me know if u need to clarify anything..
Thankx in advance,
Rohan Malik

Hi Rohan,
Not sure whether I understood your question correctly. I cant visualise your output .
To add icons while appending a new row to the output
First of all you need to have  a field icon ( of type icon_d ) in your output table.
While appending the row you have to explicitly right the icon name to that field
l_record-icon = '@#12' something like that  which you get from the type pool icons

Similar Messages

  • How to find function code for buttons on toolbar in oops alv

    Hi experts,
    I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
    method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALV

    Hi Prakash,
    -->First you have to set the pf status in your alv program by,
    {FORM pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'FIRST'.
    ENDFORM.                    "PF_STATUS}
    -->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
          i_callback_pf_status_set          = 'PF_STATUS'}
    *-->Then doble click on that pf status,
    From the menu bar, select Extras->Adjust Template->List Viewer,
    This will give you the existing statndard gui status of the program*
    ->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
          i_callback_user_command           = 'COMM'
    And make a subroutine of the name 'COMM'i.e,
    FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
      DATA: okcode TYPE sy-ucomm.
      okcode = ucomm.
      CASE okcode.
        WHEN 'REF'.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel         = 'MANSI'
            txt1          = 'CREATED BY'
            txt2          = SY-UNAME
          TXT3          = ' '
          TXT4          = ' '
    endcase.
    Hope it helps you
    Regrds
    Mansi

  • Radio buttons in function module.

    Hi,
    I have developed a function module which internally calls abap report with SUBMIT command.  However, the abap report has radio buttons on selecton screen.  So I would like to know how to define radio buttons in function module or is there any alternative to overcome this problem?
    ABAP code in function module :
    submit zodmr_report    with p_vkorg = bukrs
                             with s_off  in vkbur
                             with s_vtweg in vtweg
                             with s_spart in spart
                             with s_dsa in dsa
                             with s_ext in allocation_id
                             with p_yyyymm = year_month
                             and return.
    ( ABAP report "ZODMR_REPORT" has two radio buttons)
    Regards,
    Santosh

    Hi,
    To the best of my knowledge you need to create an IMPORT parameter of type SY-DYNNY And pass your selection screen to the FM. If this will not serve your purpose, then Instead of Standard Selection Screen with number 1000, use custom defined Screen number.
    Cheers
    Ram

  • Sender Radio Button disabled for Idoc adapter

    If u clearly observe .......
    Whats the necessity or significance of not having a sender communication channel(sender side radio button is disabled) and sender agreement in scenarios pertaining to Idocs....

    Hi Deepika,
    Just think that IDOC adapter as a sender, that means, you are getting source file (IDOC) from R/3 (SAP) system definitely. And XI is also and SAP system. As both are SAP systems, we already have a way of establishing the connection between SAP systems, which is ALE configuration. Using which, you can easily transfer IDOC from R/3 to XI.
    Also, you might know that IDOC and HTTP adapters reside on ABAP stack. When the R/3 and XI configuration settings are done, XI can receive the IDOC sent by R/3, directly to Integration Engine instead of Adapter Engine. If the file initially reaches to Adapter Engine, then the details about sender application are necessary, that means the Sender Agreement. But in this case, you don't even need the Sender Agreement.
    I hope you understand why the IDOC sender button is disabled and sender agreement is not necessary.
    Thank you.
    Regards
    Bhanu
    Intelligroup.

  • Radio Button disable/enalbe

    Hi Experts,
    I made a radiobuttonbykey in my application and have 4 options.
    I want to disable and enable the options according to selection made on a dropdown.
    For example
    if i choose option 1 from dropdown then 2 options of radiobutton become enable and rest disable
    if i choose option 2 from dropdown then 3 options of radiobutton become enable and rest disable
    and like that...
    I am able to disable/enable the whole radiobutton but i want its options to be disabled or enabled.
    Regards
    Rajat

    Hi Rajat,
    I understand your problem is that using radiobuttonbykey UI element, you can set the enabled property on/off for the entire value set, and not for individual values.
    Is it ok to use radiobutton UI element for your requirement? Or is it that you are using some domain fixed values or value table as the value set for the radiobuttonbykey?
    Depending on this, you can select one of the two alternatives:
    1) If its ok to use radiobutton UI element, then there can be four different radiobutton UI elements bound to the same context. At runtime, the context will hold the key specified for the selected radiobutton. And here you can bind the visible/enabled property of the four diff radio buttons to a boolean context and can change it as per your requirement.
    2) Incase you need to use radiobuttonbykey UI element, then bind the context dynamically through coding to the radiobuttonbykey. OnSelect event of the dropdown, you can define an action wherein you update the value set of the context bound to the radiobuttonbykey.
    Incase of queries please revert.
    Regards,
    Chitrali

  • Radio button disabled

    In Edit/Preference/General there are 2 buttons which are disabled (grey): Podcast and Radio. How can I activate them again?

    Hi,
    Assign selection screen elements  A and B to one screen group and C,D,E to one group.
    Here I have assigned first two elements  (which will be displayed on click of r_future ) to screen group G1 and next two elements to screen group G2.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-003.
    PARAMETERS     : A  TYPE C,
                                  B  TYPE C,
                                  C  TYPE C,
                                  D  TYPE C.
    PARAMETERS:      r_future     TYPE c   RADIOBUTTON GROUP r1  
                                  DEFAULT 'X'
                                   USER-COMMAND fcode,
                                   r_detail     TYPE c   RADIOBUTTON GROUP r1.          
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        CASE screen-group1.
          WHEN 'G1'.
            IF r_future = 'X'.
              screen-active  = 1.
            ELSE.
              screen-active  = 0.
            ENDIF.
          WHEN 'G2'.
            IF r_detail = 'X'.
              screen-active  = 1.
            ELSE.
              screen-active  = 0.
            ENDIF.
        ENDCASE.
        MODIFY SCREEN.
      ENDLOOP.
    Try to simplify your code.I am not sure why you have used three screen groups.
    Try in above manner.It should work.
    Thanks
    Tejaswini Khante
    Edited by: Tejaswini Khante on Apr 26, 2010 8:16 AM

  • Mergecell functionality in OOPS ALV

    Hi:
      Is there any method through which we can apply the mergecell funcitonality in ALV like similarly we do in MS-Excel.

    hI
    In order to display an ALV report with specific columns already sorted by default you will need to build a
    sort catalogue. This is fairly straight forward and is done in the following way:
            Step 1. Add data declaration for sort catalogue
            Step 2. Add code to build sort catalogue table
            Step 3. Update 'gd_tree->set_table_for_first_display' method call to include parameter 'it_sort'
    ALV data declarations
      data: it_sortcat     type LVC_T_SORT,
            it_sortcatdb   type LVC_T_SORT.
    perform build_sortcat.
    *&      Form  build_sortcat
          Build Sort catalog
    FORM build_sortcat .
      wa_sort-spos      = 1.
      wa_sort-fieldname = 'EBELN'.
      wa_sort-SUBTOT    = 'X'. "subtotals any totals column by this field
    gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
      wa_sort-spos      = 2.
      wa_sort-fieldname = 'EBELP'.
    gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
    ENDFORM.                    " build_sortcat
    CALL METHOD gd_tree->set_table_for_first_display
        EXPORTING
          is_layout       = gd_layout
        CHANGING
          it_fieldcatalog = gd_fieldcat
          it_sort         = it_sortcat
          it_outtab       = it_report.

  • Disabling actions on a radio button

    Hello,
    I need your help for implementing this behavior on a radio button:
    disable any actions on a radio button (no selection is possible) until an event is generated.
    It means that this radio buttib still waits for an event for being activated on for another for being desactivated another time?
    Any help?

    This works fine for me:
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.RadioButton;
    import javafx.scene.control.ToggleGroup;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class DisabledRadioButtonExample extends Application {
        @Override
        public void start(Stage primaryStage) {
            final RadioButton choice1 = new RadioButton("Choice 1");
            final RadioButton choice2 = new RadioButton("Choice 2");
            final ToggleGroup tg = new ToggleGroup();
            tg.getToggles().addAll(choice1, choice2);
            choice2.setDisable(true);
            final Button enableButton = new Button("Enable");
            enableButton.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent event) {
                    choice2.setDisable(false);
                    // enable button has no use any more:
                    enableButton.setDisable(true);
            final VBox root = new VBox(5);
            root.getChildren().addAll(choice1, choice2, enableButton);
            primaryStage.setScene(new Scene(root, 300, 200));
            primaryStage.show();
        public static void main(String[] args) {
            launch(args);
    Can you post a short, complete example which demonstrates the problem?

  • Looping thru instance manager and checking radio button selected

    I need to loop thru my instances and toggle visible/hidden if a particular radio button in each instance is selected.
    My code right now does not work but I feel I am on the right track (minus the else statement it will need to toggle on/off).
    Can anyone help? thanks in advance!
    var rowCount = BugGroup_f.instanceManager.count;
    for (i=0; i<rowCount; i++) {
    var str = xfa.resolveNode("BugGroup_f.detail3.bugInfo.BugItem.status.RadioButtonList[" + i + "]").rawValue;
        if (str.indexOf("Fixed") > -1) {
        xfa.resolveNode("BugGroup_f["+rowCount+"]").presence = "hidden"

    So we've got a set of Rows, each with a subitem called RadioToggle, and you want to go through and set them all, then click a separate button and hide the ones with "on" radio buttons?
    function ToggleRows(reset){
         var Rows = Form.subform....BugGroup_f.all;
         var curRow;
         for (var i=0; i<Rows.length; i++){
              curRow = Rows.item(i);
              if ((curRow.RadioButton.rawValue == "WhatevermeansHidden") && !reset){
                   curRow.presense = "hidden";}
              else{
                   curRow.presense = "visible";}
    ^ in a script object, and put
    scriptObjectName.ToggleRows(reset);
    in the click event of your button, and you should be golden.
    If you do want them to hide the moment you click the toggle, you could put this, right?
    if (xfa.event.newText == "whatevermeansoff"){
         parent....presense = "hidden";}
    The .all method seems like a much easier way to handle collections of objects, and specificaly collections of instances. It also means you can do relative referencing, i.e. to create a function that will operate on all the rows of a table, without knowing which table it is operating on, so a button in each table can pass it's parent table to the function.
    var GroupVariable = Object.all
    for(var i=0; i < GroupVariable.length; i++)
    EDIT:
    add a reset value, and pass it in to your function like above (added).
    make a separate button, or control, that will call the function with reset = 1.

  • How to disable the radio buttons in alv lsit .

    hi experts ,
    i created one alv list using oops alv . in list three radio buttons . i used code for that in fieldcat-icon = 'x' .
    then in internal table i passed radiobutton icon . using this code i get a radio buttons on list correct .
    but when iam displaying the alv list . i some rows i want radio buttons in disable mode .
    can any one explain

    Tiberiu,
    I think you need to change the webdynpro for java code using NWDI
    Thanks
    Bala Duvvuri

  • Radio button in ALV toolbar

    Hi experts,
    I have a requirement to add 2 radio buttons on ALV toolbar.
    I try to implement the toolbar event of class cl_gui_alv_grid, and add 2 radio buttons using the following code:
           move 'RAD' to ls_toolbar-function. 
           move 'RADIO1' to ls_toolbar-quickinfo.
           move 'RADIO1' to ls_toolbar-text.
           move '4' to ls_toolbar-butn_type.
           move ' ' to ls_toolbar-disabled.
           move 'X' to ls_toolbar-checked .
           append ls_toolbar to e_object->mt_toolbar.
           clear ls_toolbar.
           move 'RAD' to ls_toolbar-function.
           move 'RADIO2' to ls_toolbar-quickinfo.
           move 'RADIO2' to ls_toolbar-text.
           move '4' to ls_toolbar-butn_type.
           move ' ' to ls_toolbar-disabled. "#EC NOTEXT
           append ls_toolbar to e_object->mt_toolbar.
    But when I run this program,I find these 2 radio buttons look like normal button, is this correct?
    And I don't know how to catch which radio button is checked or not.
    Anyone having code for it or any suggestion for it, kindly let me know...
    Thank you
    Edited by: jie Wu on Nov 26, 2010 3:33 AM

    hello,
    I visit this address, but it does't meet my needs....
    I want to add radio button(button type 4) in ALV toolbar not the normal button(button type 0).
    The more important is I want to find a way to get properity of toolbar in ALV grid.
    Thank you.

  • Radio button in alv report

    Hi experts,
    I am using radio buttons in alv report by using screen painter but error occurs in alv that screen doesn't exist in module.
    plz help me.

    Hi Ankita,
    check this program.
    *& Report ZALVGRID_WITH_RADIOBUTTONS
    *& This program shows how to realize radiobuttons in ALV grid lists
    *& using event HOTSPOT_CLICK.
    *& Screen 100:
    *& - Flow logic
    *& PROCESS BEFORE OUTPUT.
    *& MODULE PBO.
    *& PROCESS AFTER INPUT.
    *& MODULE PAI.
    *& - Screen elements: none
    *& - ok-code field -> gd_okcode
    *& GUI Status MAIN100:
    *& - F3 = 'BACK', Shift+F3 = 'EXIT', F12 = 'CANC'
    PROGRAM zalvgrid_with_radiobuttons.
    TYPE-POOLS: abap, icon. " INCLUDE . for releases < 6.20
    TYPES: BEGIN OF ty_s_sflight.
    INCLUDE TYPE sflight.
    TYPES: button1 TYPE iconname.
    TYPES: button2 TYPE iconname.
    TYPES: button3 TYPE iconname.
    TYPES: button4 TYPE iconname.
    TYPES: END OF ty_s_sflight.
    DATA:
    gt_sflight TYPE STANDARD TABLE OF ty_s_sflight,
    gs_layout TYPE lvc_s_layo,
    gt_fcat TYPE lvc_t_fcat.
    DATA:
    gd_okcode TYPE ui_func,
    go_docking TYPE REF TO cl_gui_docking_container,
    go_grid TYPE REF TO cl_gui_alv_grid.
    CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
    PUBLIC SECTION.
    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:
    IS ASSIGNED ).
    Set all radio buttons "unselected"
    IS ASSIGNED ).
    Set selected radio button "selected".
    = 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 = 'REFRESH'
    IMPORTING
    RC =
    ENDMETHOD. "handle_hotspot_click
    ENDCLASS. "lcl_eventhandler IMPLEMENTATION
    MAIN *
    START-OF-SELECTION.
    PERFORM select_data.
    PERFORM init_controls.
    PERFORM build_fieldcatalog.
    PERFORM set_layout.
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING
    i_structure_name = 'SFLIGHT'
    is_layout = gs_layout
    CHANGING
    it_fieldcatalog = gt_fcat
    it_outtab = gt_sflight.
    Link docking container to dynpro
    CALL METHOD go_docking->link
    EXPORTING
    repid = syst-repid
    dynnr = '0100'
    CONTAINER =
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    lifetime_dynpro_dynpro_link = 3
    OTHERS = 4.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL SCREEN 100.
    END-OF-SELECTION.
    MODULE PBO OUTPUT *
    MODULE pbo OUTPUT.
    SET PF-STATUS 'MAIN100'.
    SET TITLEBAR 'MAIN100'.
    ENDMODULE. "PBO OUTPUT
    MODULE PAI INPUT *
    MODULE pai INPUT.
    Leave report
    CASE gd_okcode.
    WHEN 'BACK' OR
    'EXIT' OR
    'CANC'.
    SET SCREEN 0. LEAVE SCREEN.
    Refresh table display
    WHEN 'REFRESH'.
    PERFORM refresh_display.
    WHEN OTHERS.
    do nothing
    ENDCASE.
    CLEAR gd_okcode.
    ENDMODULE. "PAI INPUT
    *& Form BUILD_FIELDCATALOG
    text
    --> p1 text
    <-- p2 text
    FORM build_fieldcatalog .
    ALV List with Radio Buttons
    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
    © 2007 SAP AG 7
    define local data
    DATA:
    ls_fcat TYPE lvc_s_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    I_BUFFER_ACTIVE =
    i_structure_name = 'ICON'
    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 <> 'NAME' ).
    NOTE: field ICON-NAME has data element ICONNAME.
    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 = 'NAME'.
    IF ( syst-subrc = 0 ).
    DELETE gt_fcat INDEX syst-tabix.
    ENDIF.
    ls_fcat-fieldname = 'BUTTON4'.
    ls_fcat-coltext = ls_fcat-fieldname.
    ls_fcat-icon = 'X'.
    ls_fcat-hotspot = 'X'.
    INSERT ls_fcat INTO gt_fcat INDEX 5.
    ls_fcat-fieldname = 'BUTTON3'.
    ls_fcat-coltext = ls_fcat-fieldname.
    INSERT ls_fcat INTO gt_fcat INDEX 5.
    ls_fcat-fieldname = 'BUTTON2'.
    ls_fcat-coltext = ls_fcat-fieldname.
    INSERT ls_fcat INTO gt_fcat INDEX 5.
    ls_fcat-fieldname = 'BUTTON1'.
    ls_fcat-coltext = ls_fcat-fieldname.
    INSERT ls_fcat INTO gt_fcat INDEX 5.
    Renumbering of the columns
    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. " selected radiobutton
    ls_sflight-button2 = icon_wd_radio_button_empty.
    ls_sflight-button3 = icon_wd_radio_button_empty.
    ls_sflight-button4 = icon_wd_radio_button_empty.
    Alternatively: create icons using function module 'ICON_CREATE'
    on SAP releases where these icons are not available.
    MODIFY gt_sflight FROM ls_sflight
    TRANSPORTING button1 button2 button3 button4
    WHERE ( carrid IS NOT INITIAL ).
    ENDFORM. " SELECT_DATA
    *& Form INIT_CONTROLS
    text
    --> p1 text
    <-- p2 text
    FORM init_controls .
    CHECK ( go_docking IS NOT BOUND ).
    ALV List with Radio Buttons
    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
    © 2007 SAP AG 9
    Create docking container
    CREATE OBJECT go_docking
    EXPORTING
    parent = cl_gui_container=>screen0
    REPID =
    DYNNR =
    SIDE = DOCK_AT_LEFT
    EXTENSION = 50
    STYLE =
    LIFETIME = lifetime_default
    CAPTION =
    METRIC = 0
    ratio = 90
    NO_AUTODEF_PROGID_DYNNR =
    NAME =
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Size of container = full screen size
    CALL METHOD go_docking->set_extension
    EXPORTING
    extension = 99999
    EXCEPTIONS
    cntl_error = 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.
    Create ALV grid instance
    CREATE OBJECT go_grid
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    i_parent = go_docking
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    OTHERS = 5.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Set event handler for event HOTSPOT_CLICK
    SET HANDLER:
    lcl_eventhandler=>handle_hotspot_click FOR go_grid.
    ENDFORM. " INIT_CONTROLS
    *& Form REFRESH_DISPLAY
    Refresh table display after switching the radiobuttons
    --> p1 text
    <-- p2 text
    FORM refresh_display .
    define local data
    DATA:
    ls_stable TYPE lvc_s_stbl.
    ls_stable-row = abap_true.
    ls_stable-col = abap_true.
    CALL METHOD go_grid->refresh_table_display
    EXPORTING
    is_stable = ls_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.
    ENDFORM. " REFRESH_DISPLAY
    *& Form SET_LAYOUT
    Set layout for ALV list
    --> p1 text
    <-- p2 text
    FORM set_layout .
    CLEAR: gs_layout.
    gs_layout-cwidth_opt = abap_true. " optimize column width
    gs_layout-zebra = abap_true.
    ENDFORM. " SET_LAYOUT
    Regards,
    Prasanth
    Reward if helpful

  • Disable only one radio button in a Radiogroup using Dynamic Actions.

    Hello everyone,
    I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit with Application Express 4.1.1.00.23
    I have a radio group which has 3 radio buttons. Now in certain situations I want only one of the radio buttons to be disabled.
    I don't want to resort to Javascript for this as that would mean another piece of code that can go wrong and introduce bugs.
    Is this possible using a Dynamic Action? Although DA is also JS, I feel its much easier to maintain.
    Regards,
    Arijit

    I know, you did ask for DA
    Try to put this code in DA and run this code on page load
    =-==========================================
    var pOption = 3;
    var nameArray = $('input[name=p_v01]').map(function(){
                        return this.getAttribute('value');
                    }).get();
    for (i=0;i<nameArray.length;i++){
        if(pOption == nameArray[i]){           
            $("#P2_CHECK1_"+i).attr("disabled", true);
    ==========================================
    Plain Javascript
    <script type ="text/javascript">
    function disableCheckBox(pOption){
        var nameArray = $('input[name=p_v01]').map(function(){
                            return this.getAttribute('value');
                        }).get();
        for (i=0;i<nameArray.length;i++){
            if(pOption == nameArray[i]){           
                $("#P2_CHECK1_"+i).attr("disabled", true);
    $(document).ready(function(){
        var chkOption = 3;
        disableCheckBox(chkOption);
    </script>
    Thanks,
    Ramesh P.

  • Assigning a function code to radio button in 4.5B

    I’ve a requirement wherein I need to trigger the PAI event in a module pool program when I select a particular radiobutton in a group and do some processing subsequently.
    For this I need to assign a function code to the radiobutton group.
    But the function code field is disabled for input in the properties screen of the layout. Our client system is SAP 4.5B.
    I am able to assign function codes to radio button groups in esuides(4.6C) and other systems.
    I want to know whether we can assign a function code at all to a radio button group in version 4.5B.
    If so, please tell me how to do this.
    With regards,
    ramu.

    Hi,
    we can't assign function codes to radio buttons.
    for assigning some code to radio button.check the radio button status.
    in PAI.
    if RAD1 = 'X'.
    xxxxxxxxxxx.
    xxxxxxxxx.
    elseif RAD2 = 'X'.
    xxxxxxxxx.
    xxxxxxxxxxxx.
    endif.
    regards,
    bharat.

  • How to enable a disabled radio button????

    Hi here is the problem i have, i have a number of radio buttons contained in a buton group, all the buttons bar the first one are disabled. The buttons are all drawn on a JPanel. What i want to be able to do is once the enabled button has been selected, I want to enable the next button in the gropu and also then disable the one that was previously enabled. Is there any way i can do this, below is the code i have for setting the group up, and trying the above probelm. Any help much appreciated Thanks.
    /* Function creates a radio button and adds it to the button group */
         public JRadioButton getRadioButton(String myString, boolean val)
              JRadioButton myButton=new JRadioButton(myString);
              myButton.setActionCommand(myString);
              myButton.addActionListener(myListener);
              myButton.setEnabled(val);
              group.add(myButton);
              return myButton;
    //adds the radio buttons to the panel, for each transition */
         public void addTranPan()
                   for(int i = 0; i < dCreate.char2.size(); i ++)
                   if (i == 0) mPanel.add(getRadioButton(dCreate.char2.elementAt(0).toString(),true));
                   else
    mPanel.add(getRadioButton(dCreate.char2.elementAt(i).toString(),false));
    public void ChangeButtonState()
    Component [] components = getContentPane().getComponents();
              for (int i = 0; i < components.length; i++)
                   Component c = components;
                   if (c instanceof JRadioButton)
                   JRadioButton rb = (JRadioButton) c;
                   rb.setEnabled(false);
                   if (c.getName().equals(ch)) //find button to enable
                   JRadioButton rb = (JRadioButton) c;
                   rb.setEnabled(true);
                   break;
              mPanel.repaint();

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class sol21 extends JFrame implements ItemListener {
    JRadioButton
       radio1 = new JRadioButton("One"),
       radio2 = new JRadioButton("Two"),
       radio3 = new JRadioButton("Three"),
       radio4 = new JRadioButton("Four");
      JRadioButton[] radios = {
        radio1, radio2, radio3, radio4
      int INITIAL_ENABLED = 0;
      public sol21() {
        ButtonGroup group = new ButtonGroup();
        JPanel panel = new JPanel(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.insets = new Insets(5,0,5,0);
        gbc.anchor = gbc.WEST;
        gbc.gridwidth = gbc.REMAINDER;
        for(int j = 0; j < radios.length; j++) {
          radios[j].addItemListener(this);
          group.add(radios[j]);
          panel.add(radios[j], gbc);
          if(j == INITIAL_ENABLED)
            continue;
          radios[j].setEnabled(false);
        setContentPane(panel);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setSize(300,200);
        setLocation(300,200);
        setVisible(true);
      public void itemStateChanged(ItemEvent e) {
        JRadioButton button = (JRadioButton)e.getItemSelectable();
        if(e.getStateChange() == ItemEvent.SELECTED) {
          int index = 0;
          for(int j = 0; j < radios.length; j++)
            if(radios[j] == button)
              index = j;
          radios[(index + 1) % radios.length].setEnabled(true);
          if(index == 0)
            index = radios.length;
          radios[(index - 1) % radios.length].setEnabled(false);
      public static void main(String[] args) {
        new sol21();
    }

Maybe you are looking for

  • Flash player does not work in full screen

    I am not able to get flash player. version 10, to work in full screen with firefox 3.6 on neither Mandriva 2010 or Ubuntu 10.10. I also do not have access to the settings. It is blacked out.

  • My iTunes will not open, error message 13014, help!

    My itunes will not open on my Macbook Pro, everytime I try it says error message 13014, what does this mean? Thank you!

  • Macbook pro dvd drive

    This morning I inserted a Cd into my dvd/cd drive in my macbook pro and it read the disc but when I ejected it a small screw came out too had to remove the screw before the disc would come out Before ths happened the cd drive would make an unusual so

  • Pop up that appears on domain exit only.

    I would like for a pop up to appear on closing the "x" on the top right of a browser window, What this means is, I want a pop up to appear when a user is trying to leave my website. Example: give them a special offer. I do not want this message to ap

  • Iphone 2.1 new Icon

    What is this new icon on the top right of my screen, directly left of my battery bar?? It looks like a phone or something?