About selection screen

hi all,
  i have 3 radio button and corresponding thier 3 input loist box . i just want to deactivate 2 list box on the click of one radio button.
please give the solution if possible .
Thanks and Regards
priyank dixit

Hi,
Check the following code:
TYPE-POOLS : vrm,
             icon.
*SELECTION SCREEN FIELDS
TABLES : sscrfields.
*GLOBAL DECLARATIONS
DATA : flag TYPE c,
      tablename(10),
      mmtable LIKE dd02l-tabname,
      sdtable LIKE dd02l-tabname,
      hrtable LIKE dd02l-tabname.
*DECLARATIONS FOR SELECTION SCREEN STATUS
DATA it_ucomm TYPE TABLE OF sy-ucomm.
***********SELECTION-SCREENS*********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
*FOR DYNAMIC DISPLAY OF MODULES
PARAMETERS :  pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
              pb RADIOBUTTON GROUP rad MODIF ID rad,
              pc RADIOBUTTON GROUP rad MODIF ID cad.SELECTION-SCREEN SKIP.
**TO INCLUDE DYNAMIC ICONS
SELECTION-SCREEN COMMENT 2(6) text_001.
*DYNAMIC LIST BOX BASED ON USER SELECTIONS
PARAMETERS one AS LISTBOX VISIBLE LENGTH 20  MODIF ID mod.
PARAMETERS two AS LISTBOX VISIBLE LENGTH 20   MODIF ID rad.
PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.
SELECTION-SCREEN END OF BLOCK blk1.
*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
SELECTION-SCREEN: FUNCTION KEY 1,
                  FUNCTION KEY 2,
                  FUNCTION KEY 3.
**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
AT SELECTION-SCREEN OUTPUT.
*CLICK OF FIRST RADIO BUTTON
  IF pa = 'X'.
    sscrfields-functxt_01 = 'Materials Management'.
    WRITE icon_plant AS ICON TO text_001.
*CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
    LOOP AT SCREEN.
      IF screen-group1 = 'MOD'.
        screen-intensified = '1'.
        screen-active = 1.
        screen-display_3d = '1'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'RAD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'CAD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
*CLICK OF SECOND RADIO
  IF pb = 'X'.
    sscrfields-functxt_02 = 'Sales And Distribution'.
    WRITE icon_ws_ship AS ICON TO text_001.
    LOOP AT SCREEN.
      IF screen-group1 = 'RAD'.
        screen-intensified = '1'.
        screen-active = 1.
        screen-display_3d = '1'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'MOD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'CAD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
*CLICK OF THIRD RADIO
  IF pc = 'X'.
    sscrfields-functxt_03 = 'Human Resources'.
    WRITE icon_new_employee AS ICON TO text_001.
    LOOP AT SCREEN.
      IF screen-group1 = 'RAD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'MOD'.
        screen-intensified = '0'.
        screen-active = 0.
        screen-display_3d = '0'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'CAD'.
        screen-intensified = '1'.
        screen-active = 1.
        screen-display_3d = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
Regards,
Bhaskar

Similar Messages

  • One question about Selection screen

    Hi experts,
    I am writing a report, on the selection screen, I need to input the file path and then do the file upload.
    My question is about how to check the file path I put is correct or not? If it is incorrect, I want to get a message and the cursor still in the field and don't jump to the next page.
    How can I do like that?
    Any one has any suggestion, please help me.
    Thanks in advance.
    Regards,
    Chris Gu

    Hi Chris,
        do it this way: check my code after calling gui_upload what condition i am using.
    parameters:
      p_file type rlgrap-filename.          " File name
    *           AT SELECTION-SCREEN ON VALUE-REQUEST EVENT               
    at selection-screen on value-request for p_file.
      perform get_file_name.
    *                       AT SELECTION-SCREEN EVENT                    
    at selection-screen on p_file.
      perform validate_upload_file.
    *  Form  GET_FILE_NAME                                               
    form get_file_name.
      call function 'F4_FILENAME'
       exporting
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
         field_name          = ' '
       importing
         file_name           = p_file.
    endform.                               " GET_FILE_NAME
    *  Form  VALIDATE_UPLOAD_FILE                                        
    form validate_upload_file.
      data:
        lw_file  type string.              " File Path
      lw_file = p_file.
      call function 'GUI_UPLOAD'
        exporting
          filename                    = lw_file
          filetype                    = 'ASC'
          has_field_separator         = 'X'
          dat_mode                    = 'X'
        tables
          data_tab                    = t_final_data.
      IF sy-subrc ne 0 and t_final_data is initial. " here message if file path is wrong
        Message 'File not found' type 'E'.
      ELSEIF sy-subrc eq 0 and t_final_data is initial.
        Message 'File empty' type 'E'.
      ENDIF.                              
    endform.                               " VALIDATE_UPLOAD_FILE
    With luck,
    Pritam.
    Edited by: Pritam Ghosh on May 8, 2009 8:57 AM

  • About selection screen validation

    Hi all,
            I have query regarding a selection screen.
            I have one field in a selection screen where i ve put the matnr field as a parameter from MARA table.
             My requirement is that when I will select any material by pressing F4 and select the value the corresponding material description will come automatically in another field which I had taken in the Selection screen.I must get it automatically without any push button or execute button.
             Now where I have to write the logic of the code and at which event of the report .
             Please experts help me.
    With regards,
      Abir.

    REPORT  ZSRIM_TEMP10.
    tables : mara,makt.
    data : v_maktx type makt-maktx.
    parameters : p_matnr type mara-matnr,
                 p_maktx type makt-maktx.
    AT SELECTION-SCREEN OUTPUT.
    if p_matnr is not initial.
       select single maktx from makt into v_maktx
             where matnr = p_matnr and spras = sy-langu.
        p_maktx = v_maktx.        
    endif.
    I am sorry, this code will works only if you click any enter key etc.. then only Description will appear.
    Regards
    Srikanth.
    Message was edited by: Srikanth Kidambi

  • About selection screens

    we define a user defined selection screen in one program 'x'.Can we call it in another program 'Y'? and Why?

    There are many use. Ex: you want a basic selection screen for some criteria. No you want farther selection that will based on the basic selection. Means farther selection screen should change dynamically according to the input of basic selection screen.
    REPORT demo_call_selection_screen.
    SELECTION-SCREEN BEGIN OF BLOCK sel1 WITH FRAME TITLE tit1.
    PARAMETERS: cityfr TYPE spfli-cityfrom,
                cityto TYPE spfli-cityto.
    SELECTION-SCREEN END OF BLOCK sel1.
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECTION-SCREEN INCLUDE BLOCKS sel1.
    SELECTION-SCREEN BEGIN OF BLOCK sel2
                              WITH FRAME TITLE tit2.
    PARAMETERS: airpfr TYPE spfli-airpfrom,
                airpto TYPE spfli-airpto.
    SELECTION-SCREEN END OF BLOCK sel2.
    SELECTION-SCREEN END OF SCREEN 500.
    INITIALIZATION.
      tit1 = 'Cities'.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN '0500'.
          MESSAGE w888(SABAPDOCU) WITH 'Screen 500'.
        WHEN '1000'.
          MESSAGE w888(SABAPDOCU) WITH 'Screen 1000'.
      ENDCASE.
    START-OF-SELECTION.
      tit1 = 'Cities for Airports'.
      tit2 = 'Airports'.
      CALL SELECTION-SCREEN 500 STARTING AT 10 10.
      tit1 = 'Cities again'.
      CALL SELECTION-SCREEN 1000 STARTING AT 10 10.

  • About selection-screen's question?

    Dear gurus:
    I have declare a screen like below:
    SELECTION-SCREEN BEGIN OF BLOCK blk_d WITH FRAME TITLE text-004.
    PARAMETERS: p_matnr TYPE resb-matnr. "Material
    PARAMETERS: p_bdmng LIKE resb-bdmng. "Request Qty
    PARAMETERS: p_meins LIKE resb-meins.
    SELECTION-SCREEN END OF BLOCK blk_d.
    How to achieve such an effect:
    after i input a materical code to p_matnr, display the corresponding unit in p_meins.
    Actually, when the user input the qty, them want know the unit of currently material. So i want show the unit in parameter(p_meins) after them input the p_matnr,but before them input the qty.
    Message was edited by:
            Shao Hui Young

    Hi shao,
    1. User has to press ENTER,
        just after entering / selecting via F4,
        the material number.
    2. This is one way.
    3. Just copy paste.
    4.
    REPORT ABC.
    SELECTION-SCREEN BEGIN OF BLOCK BLK_D WITH FRAME TITLE TEXT-004.
    PARAMETERS: P_MATNR TYPE RESB-MATNR. "Material
    PARAMETERS: P_BDMNG LIKE RESB-BDMNG. "Request Qty
    PARAMETERS: P_MEINS LIKE RESB-MEINS.
    SELECTION-SCREEN END OF BLOCK BLK_D.
    <b>*----
    AT SELECTION-SCREEN OUTPUT.
      SELECT SINGLE MEINS
      INTO P_MEINS
      FROM MARA
      WHERE MATNR = P_MATNR.</b>
    regards,
    amit m.

  • Engent, Who could help about selection-screen.

    Below is the code!
      CALL FUNCTION 'DATE_CREATE'
        EXPORTING
          anzahl_tage = 7
          datum_ein   = sy-datum     "
        IMPORTING
          datum_aus   = gdf_wadat.   "
    SELECT-OPTIONS: p_wadat  FOR likp-wadat
    DEFAULT sy-datum to gdf_wadat.
    All I want to do is to set the low as currenct system date
    then the high as seven days later.
    But, by using the code above I could not do that!
    God help me! Thank you very much!

    Hello Minghan,
    I see that you have registered just a few hours back. Welcome to SDN.
    Coming to your requirement, you do not need a Function Module call at all. Try this out.
    tables likp.
    select-options: p_wadat for likp-wadat.
    initialization.
    p_wadat-low = sy-datum.
    p_wadat-high = sy-datum + 7.
    append p_wadat.
    Hope this helps,
    Regards,
    Anand Mandalika.
    P.S. : Since you are a new member here, I should like to introduce you to the Forum Etiquette. Answering the queries you make in SDN requires some time and effort from the person(s) who take up your question. So when you get an answer that you find to be useful, please do reward it accordingly by clicking on the Yellow star icon in the reply. It is an SDN way of saying Thank You! For more information, you can refer to the weblog https://weblogs.sdn.sap.com/pub/wlg/680. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]

  • Abap objects and selection screen

    Hello everybody,
    I am interested in your ways of implementing selection-screens in the style of ABAP Objects.
    In earlier times (when I used to implement ABAP objects in a procedural way) I just put the selection-screen commands in an include or a form routine of my ABAP report. So it was possible to run the report in background.
    Now I read something about selection-screens/dynpros and "separation of concerns" in the book "ABAP Objects" written by Keller. He advises using function groups to encapsulate presentation from logical matters. (Selection-screen commands are in an automatically generated include now). I implemented this way. (ABAP report with a local class, which has a main method, where function module of the function group is called). It works, but i see no chance to run my report in background now.. but I need to run the report in background.
    Does anybody know a solution without deleting function group?
    What do you think is the best way of using selection-screen-commands and ABAP Objects, especially regarding running in background?
    Thx for your advise in advance.
    Kind regards,
    Anne

    Hi Naimesh,
    thx for explanation. I am not sure, if I understood everything in the right way.
    Where do you write the code for building the selection-screen? (PARAMETERS, SELECT-OPTIONS etc.)
    If you write these commands in a class method, you will get a syntax error ( because it's forbidden per definition of ABAP objects). So, am I right assuming that you put the coding just at the beginning of the ABAP report ? And after START-OF-SELECTION-event you start the processing... ?
    Furthermore, I don't really understand why you create an separate class for ALV. I found your "SAP abap help"-blog, where you explained the concept of MVC ((By the way, well done!), but you didn't mention an "ALV class" there..
    Mh.. another question - have you ever combined MVC with object services?
    At the moment I'm working on a software project where I use object services. I created 2 persistent classes via SE24 and one local class in my ABAP Report.
    I don't really see possibility to implement MVC in this project without change very much of coding and class structure...
    In my opinion the M (data&business logic) are my existing global classes and my local class is kind of Controller class?!
    Thx in advance,
    Anne

  • About AT SELECTION SCREEN

    Hi guys,
    I need help about AT SELECTION SCREEN ON VALUE REQUEST FOR a.
    Actually, I need this to be ON VALUE REQUEST FOR a and b, because I need to update both parameter with this single search help. Can anybody show me how to do this?
    Thanks before.

    Hi...Samanta...
    This is the proper code that give u the Complete info on How to write the Logic:
    REPORT  zsel_f4help                             .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    PARAMETERS: p_vbeln TYPE vbak-vbeln,
    p_posnr TYPE vbap-posnr.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
      DATA: BEGIN OF help_item OCCURS 0,
      posnr TYPE vbap-posnr,
      matnr TYPE vbap-matnr,
      arktx TYPE vbap-arktx,
      END OF help_item.
      DATA: dynfields TYPE TABLE OF dynpread WITH HEADER LINE.
      dynfields-fieldname = 'P_VBELN'.
      APPEND dynfields.
    **Read the Values of the SCREEN FIELDs
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-cprog
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = dynfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
    **Find out the Value of P_VBELN
      READ TABLE dynfields WITH KEY fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
    **Convert the Value into internal format
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = p_vbeln
        IMPORTING
          output = p_vbeln.
    **Fetch the correponding itemnos from VBAP
      SELECT posnr matnr arktx INTO TABLE help_item
      FROM vbap
      WHERE vbeln = p_vbeln.
    **Generate the F4 help with internal table values
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'POSNR'
          dynprofield = 'P_POSNR'
          dynpprog    = sy-cprog
          dynpnr      = sy-dynnr
          value_org   = 'S'
        TABLES
          value_tab   = help_item.
    <b>Reward if Helpful</b>

  • Re: About radio button enable by using selection screen

    Hi,
       this is suresh babu.i am doing one report on Competency table. About details of the report..
    there are four text feilds and 3 radio buttons in main screen.if we select one of the radio button then i want screen to required table..
    text feild:
    Division:----
    personnal area:----
    employee group:----
    Year:----
    select the type of report you wiish to execute.
    radio button1: low competency
    radio button2: low KPI
    radio button3: low competeny and KPI
    *this is my main screen of the report.my requirement is when we click any of the radio buttn i have to go for the required table in my program.
    so i want how to enable radio buton and how to generate New T-code in ABAP.

    HI create program inwhich u hav only 3 radio buttons as parameters
    parameters : p1 radiobutton group rg1,
                     p2 radiobutton group rg1,
                 p3 radiobutton group rg1.
    if p1 = 'X'.
    submit Zprogram1 VIA SELECTION-SCREEN .
    ***Zprogram1 is program to b called for radiobutton 1.
    elseif p2 = 'X'.
    submit Zprogram2 VIA SELECTION-SCREEN
    else if P3 = 'X'.
    submit Zprogram3 VIA SELECTION-SCREEN
    endif.
    goto SE93..
    and create new tcode and assign this program name der...

  • Can anybody explain in more detail about NO-DISPLAY in selection screens..

    an anybody explain in more detail about NO-DISPLAY in selection screens.. in that it is saying
    "If you want to display a parameter only in certain cases, for example, depending on the values entered by the user in other input fields of the selection screen, you cannot use the NO- DISPLAY addition. If you use NO-DISPLAY, the parameter actually is an element of the interface for program calls, but not an element of the selection screen. As a result, you cannot make it visible using the MODIFY SCREEN statement. To hide a parameter that is an element of the selection screen, you must declare it without the NO-DISPLAY addition and suppress its display using the MODIFY SCREEN statement."
    what is the meaning of this?

    This is use a lot in programs which are submitted using the SUBMIT statement.  Say that you have a program which runs as usally with a selection screen and nornal output, but you also have some logic built in there that needs to be execute when this program is not ran by the user with the selection screen, but submitted.  You can use a PARMETER statement the selection screen and NO-DISPLAY to hide it when normal processing by the user.  You could pass a value to the parameter when it is called via the SUBMIT statement.  Does this make sense?
    Regards,
    Rich Heilman

  • About parameters in selection screen

    When it if select-option,when the value of low and high are initial,it will  select all the items,and if  the low and high value are not initial,it will select items in this range.
    I just think if abap have this for a parameter ,like when it is initial,it will select all items,and when it is not initial,it will select the item which some field = this parameter.
    thanks a lot!

    Here you have to display the selct-option which will appear as a parameter on the selection screen and user can enter only one value as in a parameter.
    select-options: s_para for mara-matnr no-extension
                                           no intervals.

  • About pnp selection screen

    hi experts,
       i am using pnp selection screen  and i want
      emp no , personnel area , personnel subarea , epm group ,emp sub group  in my selection screen.
    how it can be possible ?
      actully there is option to select the particuler field option ,but when i again excute the program it shows the std selection screen .
    Thanks And Regards.
      Priyank Dixit

    hi,
    refer to this links
    Re: Change in LDP PNP Selection Screen
    Re: Change in LDP PNP Selection Screen
    http://brookshireconsulting.com/technical_rc.html

  • Hi Experts, a question about messages in selection screen? thank you!

    Hi Experts,
    I have a selection screen and two parameters on it, I need to check if the entries exist if the fields is filled in, if it doesn't exist I need to issue a warning message, but if the two parameters are both filled in and the related entries both don't exist, how can I handle this situation? what I mean is that I want to display the two warnings at the same time(like below), now I only can display one warning, can anyone help me on this? thank you much!
    You are not authorised for this purchasing organisation
    Plant: invalid entry
    Purchasing organisation: invalid entry
    No valid record selected
    Kind regards
    Dawson

    Hi Dawson
    As far as i get from your disciption of the problem, i get that: -
    (a) You want to check that both the fields are filled or not
    (b) If they are filled, then you want to check if in database there exists any record pertaining to them.
    Correct me if i am wrong.
    If this is correct, then you will have to make use of nested if condtions to diaplay the warnings.
    Like as follows: -
    If pa1 IS INITIAL and pa2 IS INITIAL.
      <your warning message>.
    ELSEIF pa1 IS INITIAL and pa2 IS NOT INITIAL.
      <your warning message>.
    ELSEIF pa1 IS NOT INITIAL and pa2 IS INITIAL.
      <your warning message>.  
    ELSEIF pa1 IS NOT INITIAL and pa2 IS NOT INITIAL.
      <try matching it with the database records>.
      <your warning message>.
    ENDIF.
    As far as i know, the 2 warning messages cannot be issued as they appear in the status bar of the current screen. SO you will have to put them in if condition only and display the approriate warning .
    Hope this solves your problem.
    Regards
    Gaurav.

  • A question about keeping screen field unchangable in selection screen

    Hello Expert,
    I have a program as below.
    REPORT Z_TEST.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-i01.
    SELECT-OPTIONS: s_kappl FOR a017-kappl DEFAULT 'M' NO INTERVALS.
    SELECTION-SCREEN: END OF BLOCK b1.
    INITIALIZATION.
      LOOP AT SCREEN.
        IF screen-name CS 'KAPPL'.
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    When I executed the report, the field for S_KAPPL is unchangable. This is as expected. But if I select one variant,  the filed will change back to changable.
    My question is how can I keep the field unchangable after I select variant?
    Thanks in advance,
    Regards, Johnny

    Hello Johnny,
    When you're creating the variant you've to mark the check-box "Protect field" as true.
    This will make the field as output only.
    BR,
    Suhas

  • Hi,a question about transportation of translation of selection screen?

    Hi Experts,
    I am working on an ALV and there is a selection screen for it, and I have translate the texts in the selection screen and can they be transported while the program is transported to another system? if not how can I transport the translations, thank you much.
    Kind regards
    Dawson

    Hello ,
    Please follow the below steps for transalation ..
    - Complete your development and release the same .
    - Always have the Translations which u can do wtih SE63 tocde and have them within a specific transport request (Recomended Transport of Copies) .
    Now u release the TR of translation then everything wil work fine .
    Ensure always Translations TR is younger than Development TR withrespect to their creation and Releases ....
    Regards,

Maybe you are looking for