How to catch a switching of radiobutton in "AT SELECTION-SCREEN"

Hi,
I have a selection screen with 2 radiobuttons in group 001.
I need to perform some code when I change a status of particular radiobutton (checked - unchecked).
I have a code in AT SELECTION SCREEN ON RADIOBUTTON GROUP 001 but this code is not executed on changing a status of particular radiobutton.
Any help is appreciated.
Thank you.
Marian

Check the sample code.
REPORT  ypra_sample56.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
PARAMETER: p_r1 RADIOBUTTON GROUP rg1 USER-COMMAND vend DEFAULT 'X',
           p_r2 RADIOBUTTON GROUP rg1,
           p_r3 RADIOBUTTON GROUP rg1.
SELECTION-SCREEN END OF BLOCK a1.
SELECTION-SCREEN BEGIN OF BLOCK a2 WITH FRAME TITLE text-002.
PARAMETER: p_c1 TYPE c AS CHECKBOX,
           p_c2 TYPE c AS CHECKBOX,
           p_c3 TYPE c AS CHECKBOX,
           p_c4 TYPE c AS CHECKBOX,
           p_c5 TYPE c AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK a2.
           INITIALIZATION
INITIALIZATION.
  PERFORM enable_fields.
           AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
  PERFORM sel_screen_output.
           START OF SELECTION
START-OF-SELECTION.
  DATA: ws_data TYPE tarifnr.
  ws_data  =  'ZPNGT_EM1'.
  IF ws_data CA '1' OR ws_data CA '2' .
    WRITE:/ ws_data.
  ENDIF.
*&      Form  sel_screen_output
      Selection screen Output
FORM sel_screen_output.
  IF p_r1 EQ 'X' OR p_r2 EQ 'X'.
    PERFORM enable_fields.
  ENDIF.
  IF p_r3 EQ 'X'.
    LOOP AT SCREEN.
      IF screen-name EQ 'P_C4' OR screen-name = 'P_C5'.
        screen-input = '1'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " sel_screen_output
*&      Form  enable_fields
      enable fields in selection screen
FORM enable_fields .
  IF p_r1 EQ 'X' OR p_r2 EQ 'X'.
    LOOP AT SCREEN.
      IF screen-name EQ 'P_C4' OR screen-name EQ 'P_C5'.
        screen-input = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " disable_fields
Regards,
Prakash.

Similar Messages

  • Radiobutton during at selection-screen event is not triggered

    Hi experts,
    I have this event:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
    perform f_file_sel.
    I want to select a file according to the radiobuttons on the selection screen, but during the f_file_sel form I recognized, that the radiobutton which I selected is not triggered.
    It's only triggered after 'start-of-selection'.
    How can I force the program to trigger it when f_file_sel is processing?

    Hi,
    SELECT-OPTIONS : so_matnr1    FOR  mvke-matnr MODIF ID id1,
                                    so_matnr2   FOR  mara-wrkst MODIF ID id2.
    PARAMETERS : rb_mat TYPE c RADIOBUTTON GROUP rbg DEFAULT 'X' USER-COMMAND hid,
                              rb_var TYPE c RADIOBUTTON GROUP rbg.
    LOOP AT SCREEN.
        IF rb_mat EQ c_x.
          IF screen-group1 EQ  'ID2'.
            screen-input = '0'.
          ENDIF.
        ENDIF.
        IF rb_var EQ c_x.
          IF screen-group1 EQ 'ID1'.
            screen-input = '0'.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Apply this piece of code to your requirement with files in place of fields.Hope your issue will be resolved.
    Regards,
    Anand.

  • Adding radiobutton to WD selection screen

    Hello all,
      can some one please let me know how to add a radio button to the  WD selection screen.
    Thanks in advance
    Regards
    Amarender Reddy B

    hi amarender......
          just drag and place the radio button from theui element list.
          bind an attribute from the context to it.
          you can see an example in:
         wdr_test_ui_elements component.
    --regards,
      alex b justin

  • Change RadioButtons position in Selection Screen.

    HI is there any way to change the default position of a radiboutton in a selection screen.
    I mean, show the text option of the radiobutton in the right side, not the left side.
    Thanks a lot.

    hi Jose,
    you have to do something like:
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT x(y)... "x for starting position, y for length
    SELECTION-SCREEN POSITION 20. "next line will start at this position
    PARAMETERS : p_rb RADIOBUTTON GROUP rb1
    SELECTION-SCREEN END OF LINE.
    hope this helps
    ec

  • How to skip required check on mandatory field of selection screen

    Hi expert,
    In my report, I define two rodiobutton to show block1 or block2, but every time I click each radiobutton, the message "Fill in all required entry" shown, so my question is how can I skip required check when click radiabutton?
    Some of my selection-screen code is :
    PARAMETER: P_block1  RADIOBUTTON GROUP GRP1 DEFAULT 'X'  USER-COMMAND UC1.
    PARAMETER: P_block2  RADIOBUTTON GROUP GRP1.
    SELECT-OPTIONS S_ERDAT FOR  VBRK-ERDAT OBLIGATORY.

    Hi,
    If you dont want PAI to be triggered when you select the radio button, then you can remove the USER-COMMAND while declaring parameter.
    If User Command is necessary, use following code
    PARAMETER: P_block1 RADIOBUTTON GROUP GRP1 DEFAULT 'X' USER-COMMAND UC1.
    PARAMETER: P_block2 RADIOBUTTON GROUP GRP1.
    SELECT-OPTIONS S_ERDAT FOR VBRK-ERDAT .
    AT SELECTION-SCREEN.
    CHECK SY-UCOMM NE 'UC1'.
    IF S_ERDAT IS INITIAL.
    MESSAGE E038(001) WITH 'ERDAT IS MANDATORY'.
    ENDIF.
    Please Reward points.

  • How to Change the Font Size in Module Pool Selection Screen?

    Hi,
    There is a module pool, and I need to change the font size mentioned in the selection screen. Could you plaese tell me, how will I be able to do that?

    Hi ,
    If you are asking for text field , then check the options avaliable in Display tab of Attributes.
    Hope this helps you.

  • How to add a new Field in the Dynamic Selection screen section.

    HI,
    There is a requirement in which I need to add a field in existing program of dynamic selections.
    I need to add a field KNKK-DBRTG (Customer Rating) in dynamic selections screen of some existing report
    which has a dynamic selection screen with other fields like customer account, company code etc. Along with this i need to add Customer rating field also in the selection screen.
    I have used GET KNKK statement to select this in the Dynamic selection screen. But I need to make it appear
    on the screen.
    LDB used is the Customer Database.
    I have added GET KNKK statement after GET KNA1 statement.
    Can any one help me how we can make this rating field appear in the selection screen.
    With the GET statement Credit control area Fields can be selected in the selection screen but I have to permanantly add the field in the selection screen.
    Regards
    Prashant Prabhu

    Hi,
    So you need that this new field have data in old records?
    1.- If you are in BI 7.0 and the logic or data for that New field are in the same Dimension, you can use a Remodeling to fill it. I mean if you want if you want to load from a Master Data from other InfoObject in the same Dim.
    2.- If condition "1" is not yours.
    First add the new field, then create a Backup Cube (both cubes with the new field) and make a full update with all information in the original Cube. The new field willl be empty in both cubes.
    Create an UR from BackUp_Cube to Original_Cube with all direct mapping and create a logic in the Start Routine of the UR (modiying the data_package) you can look for the data in the DSO that you often use to load.
    To do that both cubes have to be Datasources ( right click on Cube-> aditional function-> and I think is "Extract Datasource")
    Hope it helps. Regards, Federico

  • How to display current day(13-nov-06) in selection screen-its very urgent

    hi all,
    iam sending code to change the date from mm/dd/yyyy to dd-mon-yy(10-nov-06).my requirement is i have to keep a parameter and when iam executing thid report say p_text1 is a parameter when iam executing this report in selection screen it has to show 12-nov-06 say current date.any body can suggest me how to do and please send me the sample code.
    iam sending the code to change the date format as below.
    data: begin of itab occurs 0,
    SPRAS type SPRAS,
    MNR LIKE T247-MNR,
    KTX LIKE T247-KTX,
    LTX LIKE T247-LTX,
    end of itab.
    DATA : month LIKE T247-MNR.
    DATA: YEAR(4).
    DATA: FINAL(18).
    DATA: DAY(2).
    DAY = sy-datum+6(2).
    MONTH = sy-datum+4(2).
    YEAR = sy-datum+0(4).
    DAY = sy-datum+6(2).
    YEAR = sy-datum+0(4).
    select SINGLE * from t247 into itab where mnr = month
    AND SPRAS = 'E'.
    APPEND ITAB.
    CONCATENATE DAY ITAB-KTX YEAR+2(2)
    INTO FINAL SEPARATED BY '-'.
    WRITE: FINAL.
    thanks,
    maheedhar.T

    keep this entire code in INITIALIZATION EVENT.
    data: begin of itab occurs 0,
    SPRAS type SPRAS,
    MNR LIKE T247-MNR,
    KTX LIKE T247-KTX,
    LTX LIKE T247-LTX,
    end of itab.
    DATA : month LIKE T247-MNR.
    DATA: YEAR(4).
    DATA: FINAL(18).
    DATA: DAY(2).
    parameters: p_date type char15.
    initialization.
    DAY = sy-datum+6(2).
    MONTH = sy-datum+4(2).
    YEAR = sy-datum+0(4).
    DAY = sy-datum+6(2).
    YEAR = sy-datum+0(4).
    select SINGLE * from t247 into itab where mnr = month
    AND SPRAS = 'E'.
    APPEND ITAB.
    CONCATENATE DAY ITAB-KTX YEAR+2(2)
    INTO P_DATE SEPARATED BY '-'.

  • How to display data from internal table in the SELECTION-SCREEN

    Hello Experts,
    My requirement is to display the data's from an internal table in the selection screen. I tried using selection-screen comment. But it is working only for a single record. Can anyone please tell me how to do this?

    Hi Ritika,
    we cant use write statement inside selection-screen.
    see my coding.
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
      SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                          NO INTERVALS.
        SELECT-OPTIONS SEL1 FOR SY-DATUM.
        PARAMETERS     PAR1(10).
    <b>** I WANT ALL RECORDS FROM AN INTERNAL TABLE HERE ONLY</b>
        SELECTION-SCREEN END OF BLOCK BL1.
      SELECTION-SCREEN PUSHBUTTON 2(10)  but1 USER-COMMAND cli1.
      SELECTION-SCREEN PUSHBUTTON 20(10)  but2 USER-COMMAND cli2.
    SELECTION-SCREEN END OF SCREEN 123.

  • How to populate values in a Listbox parameter in selection screens

    I have a parameter(as list box) field in selection screens. And now I want to populate a list from a ztable field values.  How to do that.
    Thanks in Advance

    Hi,
    You have to use the FM VRM_SET_VALUES.
    Check this example..
    TYPE-POOLS: vrm.
    PARAMETERS: p_test TYPE char4 AS LISTBOX VISIBLE LENGTH 10.
    DATA: t_data TYPE vrm_values.
    INITIALIZATION.
    DATA: s_data TYPE vrm_value.
    <b>***Here you to have to do the select and populate the internal table
    ***t_data.</b>
    s_data-key = 'ABCD'.
    s_data-text = 'First four'.
    APPEND s_data TO t_data.
    s_data-key = 'EFGHI'.
    s_data-text = 'Second four'.
    APPEND s_data TO t_data.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'P_TEST'
    values = t_data
    EXCEPTIONS
    id_illegal_name = 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.
    START-OF-SELECTION.
    WRITE: / p_test.
    Thanks,
    Naren

  • How to pass the default value to search help selection screen

    Hi
    I need to push a certain value as a default value based on a condition to the slection screen of search help in web UI.
    Could you please let me know how can we do this?
    When we try to open the 'F4' help in web ui then it should populate a certain value as a default value to the selection screen of this 'F4' help. We will get this  default value based on condition.
    Regards
    Anil

    Hi Arun
    I'm using SE11 search help.I'm giving you my code for your reference here.
    DATA:
        ls_map    TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
        lt_inmap  TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
        lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
        lr_qs           TYPE REF TO cl_crm_bol_dquery_service,
        lr_current     TYPE REF TO if_bol_bo_property_access,
        lv_category    TYPE STRING.
      ls_map-context_attr = 'struct.zzattr_i_1'.
      ls_map-f4_attr      = 'ATTRIBUTE'.
      APPEND ls_map TO: lt_inmap,lt_outmap.
      CLEAR ls_map.
      ls_map-context_attr = 'struct.zzattr_i_1'.
      ls_map-f4_attr      = 'SERVICE_LINE'.
      APPEND ls_map TO: lt_inmap.
      CREATE OBJECT rv_valuehelp_descriptor
        TYPE
          cl_bsp_wd_valuehelp_f4descr
        EXPORTING
          iv_help_id                  = 'ZATTR1'
          iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
          iv_trigger_submit           = abap_true
          iv_input_mapping            = lt_inmap
          iv_output_mapping           = lt_outmap.
    Here 'ZATTR1' is my search help name in SE11 and the field which is having 'F4' help is 'ATTRIBUTE'.
    Now when I press 'F4' on 'ATTRIBUTE' then it will give a popup and this popup is having 3 fields..
    1.'ATTRIBUTE'
    2.'SERVICE_LINE'
    3.Description of 'SERVICE_LINE'  and hence by pressing 'F4' i should get a value in the field 'SERVICE_LINE' based on
       a condition.
    However, if there is a value for ATTRIBUTE on the screen and when we press 'F4' on this then in the popup the value of
    ATTRIBUTE which is there on the screen is appearing in the 'ATTRIBUTE' field  and the same value is being copied to
    'SERVICE_LINE' field in the popup.
    Please guide me how do we populate the value to 'SERVICE_LINE' field inside the search help popup of 'ATTRIBUTE'.
    Best Regards
    Anil

  • How to call one report2 from report1 using report1 selection screen

    hi experts,
    iam presently working in report1.
    now, from my report1, i want to call report2 with report1 selection screen.
    how to call?
    thanks in advance.

    Below is an sample example, from where i am calling transaction MB5B (Report-RM07MLBD).
    Here i am using selection screen data from report ZTEST and passing it to RM07MLBD.
    REPORT  ZTEST
    DATA : listtab LIKE abaplist OCCURS 1.
    DATA : listtab_tmp LIKE abaplist OCCURS 1.
    DATA : N TYPE n.
    *DATA mseg_wa TYPE mseg.
    *SELECT-OPTIONS s_matnr for mseg_wa-matnr.
    *SELECT-OPTIONS S_WERKS for Mseg_wa-WERKS.
    PARAMETERS : S_MATNR LIKE MSEG-MATNR,
                 S_WERKS LIKE MSEG-WERKS,
                 S_CHARG LIKE MSEG-CHARG.
    DATA MKPF_WA TYPE MKPF.
    SELECT-OPTIONS S_BUDAT FOR MKPF_WA-BUDAT.
    REFRESH listtab.
    CALL FUNCTION 'LIST_FREE_MEMORY'
    TABLES
    listobject = listtab.
    SUBMIT RM07DOCS using SELECTION-SCREEN '1000'
    WITH matnr = S_MATNR
    WITH werks = S_WERKS
    WITH charg = S_CHARG
    WITH budat-low = S_BUDAT-low
    WITH budat-high = S_BUDAT-high EXPORTING LIST TO MEMORY AND RETURN .
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listtab
    EXCEPTIONS
    not_found = 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.
    DESCRIBE TABLE listtab LINES n .
    CALL FUNCTION 'WRITE_LIST'
    EXPORTING
    write_only = 'X'
    TABLES
    listobject = listtab
    EXCEPTIONS
    empty_list = 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.

  • How to get the file name dialog on the selection screen

    Hi All
    I have a selection screen in which there is a parameter where I need to enter file name. Instead of typing filename in the parameter I would like to give a path from presentation server ( I am downloading Data to presentation server ).
    How to achive this functionality in case of a parameter on the selection screen. I need to have File open Dialog box like Windows here and then it should show the filename and it's path in this parameter after selectiong from the dialog box.
    Amol

    Hi..,
    Use the function module <b>F4_FILENAME</b> or <b>WS_FILENAME_GET</b> in the event
    <b>AT SELECTION-SCREEN ON VALUE REQUEST FOR P_FILE.</b>
    Parameters p_file type rlgrap-filename.
                AT SELECTION-SCREEN ON VALUE REQUEST EVENT            
    at selection-screen on value-request for p_file.
      perform value_request.
    *&      Form  value_request
          This subroutine proposes the possible input values             *
    There are no interface parameters to be passed to this subroutine.  *
    form value_request.
      call function 'WS_FILENAME_GET'
       importing
         filename               = p_file
       exceptions
         inv_winsys             = 1
         no_batch               = 2
         selection_cancel       = 3
         selection_error        = 4
         others                 = 5.
      check sy-subrc eq 0.
    endform.              
    Reward all helpful answers !!
    sai ramesh

  • How to write HTML code in Web Template for selection screen

    Hello All,
    Is it possible to write a html code in the web template html tag so that the output of the html is displayed in the selection screen, i.e before the execution of query.
    I know that we can write html, which will be displayed once the query has been executed, but can it be done for selection screen.
    if so, how.
    My exact requirement is : to display a 2-3 lines of text in the selection criteria screen - sort of, various options available to user for entering values in the selection screen.  I was thinking of putting this text using HTML code in the selection screen.
    Regards,
    Nagendra.

    Hi Erick,
    No, unfortunately nobody replied to this thread. So i assumed it is not possible to modify the selection screen thru html code.
    Btw, as my requirement was to provide user with multiple answers on the selection screen. I did the validations on customer exit and popped an errror dialog when applicable.
    Regards,
    Nagendra.

  • How to remove non-bootable xp drive on os selection screen

    I have a non-bootable xp drive which shows up as a selection on my os startup selection screen that I want to delete since it can't be used.
    In xp it also shows up in the boot camp control panel under startup disks along w/ my bootable xp drive and osx drive.
    I was going to edit the boot.ini file but it doesn't seem to show up there, see my boot.ini file below:
    [boot loader]
    timeout=3
    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional 3GB" /noexecute=optin/ 3GB /fastdetect
    Anyone know how I can remove this phantom drive from my startup disk selection screen?

    In my case I have an OSX boot drive, an additional dedicated BC drive running XP and 2 additional drives I use for backing up and storage. All 4 drives are internal for what it's worth. My "phantom" drive was one of my backup drives.
    What I did was transfer the files I wanted to keep on my "phantom" drive over to another drive. Went into DiskUtility erased the "phantom" drive and then reformatted the drive, transferred my info back onto it and was finished. I probably could have skipped the erasing but did it anyway.
    Note, I did this to a secondary backup drive which kept appearing on my boot screen and was annoying me. It started showing up on my boot selection screen after I had tested a restore of a clone I had made and then erased the drive after I saw that the clone was viable. I did not do this w/a BC partition of my primary hard drive so I'm not sure how this would work in that situation.

Maybe you are looking for