Selection-screen function key  dynamically ?

Dear all,
I wonder if it is possible to have a function key dynamically appearing on the selection screen of an ABAP. For example the button for reading the documentation of an ABAP is shown dynamically only if there is a documenation available.
I have tried several methods at SELECTION-SCREEN OUTPUT
- SET PF-STATUS EXCLUDING 'FC0x' : no reaction
- Blanking the icon via CLEAR: SSCRFIELDS-FUNCTXT: Result blank button
- In LOOP AT SCREEN nothing can be found concerning function keys.
I assume that the crucial point is the SELECTION-SCREEN FUNCTION KEY statement, which generates the button.
Thanx for your help
Rabanus Diehl

You mention about the 'Documentation' button.
However, SE38 is a dialog program so this why it is easy to do. You are writing a report program. You could have the pushbutton on the screen itseld instead of the status bar. You should then be able to use LOOP AT SCREEN to hide. Here is some code to put a pushbutton on a screen.
INCLUDE <list>.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 01(35) garment
  USER-COMMAND garment.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
  PERFORM f_setup_pushbutton_text USING icon_execute_object text-s01
                                  CHANGING garment.
FORM f_setup_pushbutton_text USING    p_icon
                                      p_text
                             CHANGING p_result.
  DATA: l_result(50).
  CALL FUNCTION 'ICON_CREATE'
       EXPORTING
            name                  = p_icon
            text                  = p_text
            add_stdinf            = space
       IMPORTING
            RESULT                = l_result
       EXCEPTIONS
            EXCEPTIONS
            icon_not_found        = 1
            outputfield_too_short = 2
            OTHERS                = 3.
  IF sy-subrc EQ 0. ENDIF.
  p_result = l_result.
ENDFORM.                               " F_SETUP_PUSHBUTTON_TEXT

Similar Messages

  • To create Dynamic Selection screen using Key Fields

    Hi All,
    We have a requirement where we want to create Dynamic selection screen using Key fileds of Z-table or any standard table.
    Please provide some solution if you have worked in this area.
    Thanks in Advance,
    Anand Raj Kuruba

    Hi,
    You can use the following statement.
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
    declares a node <node> of a logical database for dynamic selections in the selection include.
    To use the dynamic selections in the SELECT statements of the subroutine PUT_<node>, you must use the data object DYN_SEL. The data object DYN_SEL is automatically generated in the logical database program as follows:
    TYPE-POOLS RSDS.
    DATA DYN_SEL TYPE RSDS_TYPE.
    You do not have to program these lines yourself. The data object DYN_SEL is available in the database program but not in a connected executable program.
    The type RSDS_TYPE of the data object is defined in the type group RSDS as follows:
    TYPE-POOL RSDS.
    WHERE-clauses ------------------------------
    TYPES: RSDS_WHERE_TAB LIKE RSDSWHERE OCCURS 5.
    TYPES: BEGIN OF RSDS_WHERE,
    TABLENAME LIKE RSDSTABS-PRIM_TAB,
    WHERE_TAB TYPE RSDS_WHERE_TAB,
    END OF RSDS_WHERE.
    TYPES: RSDS_TWHERE TYPE RSDS_WHERE OCCURS 5.
    Expressions Polish notation ---------------
    TYPES: RSDS_EXPR_TAB LIKE RSDSEXPR OCCURS 10.
    TYPES: BEGIN OF RSDS_EXPR,
    TABLENAME LIKE RSDSTABS-PRIM_TAB,
    EXPR_TAB TYPE RSDS_EXPR_TAB,
    END OF RSDS_EXPR.
    TYPES: RSDS_TEXPR TYPE RSDS_EXPR OCCURS 10.
    Selections as RANGES-tables -----------------
    TYPES: RSDS_SELOPT_T LIKE RSDSSELOPT OCCURS 10.
    TYPES: BEGIN OF RSDS_FRANGE,
    FIELDNAME LIKE RSDSTABS-PRIM_FNAME,
    SELOPT_T TYPE RSDS_SELOPT_T,
    END OF RSDS_FRANGE.
    TYPES: RSDS_FRANGE_T TYPE RSDS_FRANGE OCCURS 10.
    TYPES: BEGIN OF RSDS_RANGE,
    TABLENAME LIKE RSDSTABS-PRIM_TAB,
    FRANGE_T TYPE RSDS_FRANGE_T,
    END OF RSDS_RANGE.
    TYPES: RSDS_TRANGE TYPE RSDS_RANGE OCCURS 10.
    Definition of RSDS_TYPE
    TYPES: BEGIN OF RSDS_TYPE,
    CLAUSES TYPE RSDS_TWHERE,
    TEXPR TYPE RSDS_TEXPR,
    TRANGE TYPE RSDS_TRANGE,
    END OF RSDS_TYPE.
    For more information, please check this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/content.htm
    Regards,
    Ferry Lianto

  • Display key in the selection screen and Key & Text in the report

    Hi,
    For the infoobject in the query,
    In the variable selection screen When i want to select any value it should display only key, and in the report i want to display key and text of that infoobject.
    Is it possible?
    Thanks
    Rani

    Hi
    Display As
    Here you determine whether and in what format the individual characteristic values of the characteristic are presented:
    ·        (Standard): The standard display type for characteristic values corresponds to the setting in InfoObject maintenance under Tab Page: Business Explorer.
    ·        No Display: The characteristic display is hidden. This function is useful, for example, with the currency/unit characteristic as the currencies are also shown in the key figures.
    ·        Key and Text: The characteristic values are displayed by their technical key and text.
    ·        Text: The characteristic values are displayed by their text.
    ·        Key: The characteristic values are displayed by their technical key.
    ·        Text and Key: The characteristic values are displayed by their text and technical key.
    In the dropdown box below, you can select the type of text you want to use if you set a display type that contains text. The following options are available:
    ·        Standard: The shortest available text for the characteristic values is used as the text.
    ·        Short text: The short text for the characteristic values is used as the text.
    ·        Long text: The long text for the characteristic values is used as the text.
    ·        Medium text: The medium text for the characteristic values is used as the text.

  • Change sscrfields structure function key dynamically

    Hi ,
       I want to create own function key for selection-screen button in application toolbar.
         If possible to change at run time.
    Thanks.
    INITIALIZATION.
      SSCRFIELDS-FUNCTXT_01 = 'INSERT'.
      SSCRFIELDS-FUNCTXT_02 = 'UPDATE'.
    AT SELECTION-SCREEN OUTPUT.
    SET PF-STATUS 'TEST'  .
    The exixt func.keys are CnttF1 & CntlF2.I want to change into F6 & F7.

    Hi mani,
    welcome to SCN.
    You can not create function key in default selection-screen. Actualy there are 5 pushbutton available there . you can activate or de-activate them. please check the following link for further detail.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba80935c111d1829f0000e829fbfe/content.htm
    Regards,
    Anirban

  • Generate Selection Screen as Popup dynamically

    Hello to all,
    is there a way to generate a selection screen popup at runtime dynamically?
    Is there any guide, that explains how "generate dynpro" has to be used?
    Thanks
    Christian

    Hello Oliver,
    sorry that i didn't update this thread. I tried the way you described above and it works. Sometimes I get short dumps in the shared memory block. I didn't solve this yet.
    I post you my code below:
      DATA la_dssfield TYPE /XXX/zssys_dssfield.
      CLEAR: wa_code, it_code.
      CLEAR: Ranges.
      wa_code = '*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'.
      APPEND wa_code TO it_code.
      wa_code = '*!!!!!! Generated program. Do not change anything!!!!'.
      APPEND wa_code TO it_code.
      wa_code = '*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'.
      APPEND wa_code TO it_code.
      wa_code = 'REPORT /XXX/ZSYS_GENSELSCREEN.'.
      APPEND wa_code TO it_code.
    **** Generate Tables Section
      DATA lt_tmp_dssfield TYPE /XXX/ztsys_dssfield.
      lt_tmp_dssfield[] = it_dssfield[].
    **** Delete Parameters
      DELETE lt_tmp_dssfield WHERE basictype EQ 'P'.
    **** Delete Duplicates
      SORT lt_tmp_dssfield BY reftable.
      DELETE ADJACENT DUPLICATES FROM lt_tmp_dssfield COMPARING reftable.
    **** Generate Tables Code
      LOOP AT lt_tmp_dssfield INTO la_dssfield.
        CONCATENATE 'TABLES' la_dssfield-reftable '.' INTO wa_code SEPARATED BY space.
        APPEND wa_code TO it_code.
      ENDLOOP.
    **** Build Selection Screen
      DATA: l_tabix(10) TYPE c,
            l_type(128) TYPE c,
            l_desc(10) TYPE c.
      LOOP AT it_dssfield INTO la_dssfield.
        l_tabix = sy-tabix.
        CONDENSE l_tabix.
        wa_code = 'SELECTION-SCREEN BEGIN OF LINE.'.
        APPEND wa_code TO it_code.
        CONCATENATE 'SELECTION-SCREEN COMMENT 1(32) cmt' l_tabix '.' INTO wa_code.
        APPEND wa_code TO it_code.
        CONCATENATE la_dssfield-reftable la_dssfield-reffield INTO l_type SEPARATED BY '-'.
        CASE la_dssfield-basictype.
          WHEN 'P'.
            CONCATENATE 'PARAMETERS' la_dssfield-fieldname 'LIKE' l_type '.' INTO wa_code SEPARATED BY space.
          WHEN 'S'.
            CONCATENATE 'SELECT-OPTIONS' la_dssfield-fieldname 'FOR' l_type '.' INTO wa_code SEPARATED BY space.
          WHEN 'V'.
            CONCATENATE 'SELECT-OPTIONS' la_dssfield-fieldname 'FOR' l_type ' NO INTERVALS.' INTO wa_code SEPARATED BY space.
        ENDCASE.
        APPEND wa_code TO it_code.
        wa_code = 'SELECTION-SCREEN END OF LINE.'.
        APPEND wa_code TO it_code.
      ENDLOOP.
    **** Initialize Comment Fields
      wa_code = 'INITIALIZATION.'.
      APPEND wa_code TO it_code.
    **** Set GUI-Status
      MOVE 'SET PF-STATUS ''STATUS_1000'' OF PROGRAM ''/XXX/ZSYS_GENSELSCREEN''.' to wa_code.
      APPEND wa_code to it_code.
    **** Set title
      DATA: l_stitle type string,
            l_sprog type string,
            l_stitletxt type string.
      MOVE '''TITLE_1000''' To l_stitle.
      MOVE '''/XXX/ZSYS_GENSELSCREEN''' to l_sprog.
      CONCATENATE 'SET TITLEBAR' l_stitle 'OF PROGRAM' l_sprog 'WITH'
                   INTO wa_code SEPARATED BY space.
      APPEND wa_code TO it_code.
      CONCATENATE '''' i_title '''' into wa_code.
      append wa_code to it_code.
      MOVE '.' to wa_code.
      APPEND wa_code TO it_code.
      LOOP AT it_dssfield INTO la_dssfield.
        l_tabix = sy-tabix.
        CONDENSE l_tabix.
        CONCATENATE 'cmt' l_tabix INTO l_tabix.
        CONCATENATE l_tabix ' = ''' la_dssfield-descr '''.' INTO wa_code.
        APPEND wa_code TO it_code.
      ENDLOOP.
    *** Start of Selection
    *  wa_code = 'START-OF-SELECTION.'.
    *  APPEND wa_code TO it_code.
    **** AT SELECTION-SCREEN
      wa_code = 'AT SELECTION-SCREEN.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA: okcode type SYUCOMM.'.
      APPEND wa_code TO it_code.
      wa_code = 'MOVE sy-ucomm to okcode.'.
      APPEND wa_code TO it_code.
    * Data types for shared objects
      wa_code = 'DATA t_ranges TYPE ACE_FIELD_RANGES_T.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA wa_ranges LIKE LINE OF t_ranges.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA t_fldrange TYPE ACE_GENERIC_RANGE_T.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA wa_fldrange TYPE ACE_GENERIC_RANGE.'.
      APPEND wa_code TO it_code.
    * Read the input from the selection screen and
    *  store it in Shared Objects
      LOOP AT it_dssfield INTO la_dssfield.
    *   Assign the fieldname in the variable
        CONCATENATE 'wa_ranges-fieldname = '''
                     la_dssfield-fieldname '''.'
          INTO wa_code SEPARATED BY space.
        APPEND wa_code TO it_code.
        wa_code = 'REFRESH t_fldrange.'.
        APPEND wa_code TO it_code.
    *   Processing for SELECT-OPTIONS
    *   Loop and move data to the shared memory
        IF la_dssfield-basictype EQ 'S'
           OR la_dssfield-basictype EQ 'V'.
          CONCATENATE 'LOOP AT ' la_dssfield-fieldname '.'
            INTO wa_code SEPARATED BY space.
          APPEND wa_code TO it_code.
          wa_code = 'CLEAR wa_fldrange.'.
          APPEND wa_code TO it_code.
          CONCATENATE 'MOVE-CORRESPONDING ' la_dssfield-fieldname 'TO' 'wa_fldrange.'
             INTO wa_code SEPARATED BY space.
          APPEND wa_code TO it_code.
          wa_code = 'APPEND wa_fldrange TO t_fldrange.'.
          APPEND wa_code TO it_code.
          wa_code = 'ENDLOOP.'.
          APPEND wa_code TO it_code.
          wa_code = 'wa_ranges-fieldrange[] = t_fldrange[].'.
          APPEND wa_code TO it_code.
          wa_code = 'APPEND wa_ranges TO t_ranges.'.
          APPEND wa_code TO it_code.
        ELSEIF la_dssfield-basictype EQ 'P'.
    *   Processing for PARAMETERS
          wa_code = 'CLEAR wa_fldrange.'.
          APPEND wa_code TO it_code.
    *     Process if the parameter is not initial
          CONCATENATE 'IF ' la_dssfield-fieldname 'IS NOT INITIAL.'
            INTO wa_code SEPARATED BY space.
          APPEND wa_code TO it_code.
          wa_code = 'wa_fldrange-sign = ''I''.'.
          APPEND wa_code TO it_code.
          wa_code = 'wa_fldrange-option = ''EQ''.'.
          APPEND wa_code TO it_code.
          CONCATENATE 'wa_fldrange-low = ' la_dssfield-fieldname '.'
            INTO wa_code SEPARATED BY space.
          APPEND wa_code TO it_code.
          wa_code = 'APPEND wa_fldrange TO t_fldrange.'.
          APPEND wa_code TO it_code.
          wa_code = 'ENDIF.'.
          APPEND wa_code TO it_code.
          wa_code = 'wa_ranges-fieldrange[] = t_fldrange[].'.
          APPEND wa_code TO it_code.
          wa_code = 'APPEND wa_ranges TO t_ranges.'.
          APPEND wa_code TO it_code.
        ENDIF.
      ENDLOOP.
      wa_code = 'DATA: area type ref to /XXX/zsmasys_genselscreen.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA root type REF to /XXX/zclsys_genselscreen.'.
      APPEND wa_code TO it_code.
    * Get ref to the shared memory
      wa_code = 'area = /XXX/zsmasys_genselscreen=>attach_for_write( ).'.
      APPEND wa_code TO it_code.
      wa_code = 'create object root area handle area.'.
      APPEND wa_code TO it_code.
    * Store the value in memory
      wa_code = 'root->set_fields( t_ranges ).'.
      APPEND wa_code TO it_code.
    * Store ok_code in memory
      wa_code = ' root->set_okcode( okcode ).'.
      APPEND wa_code TO it_code.
      wa_code = 'area->set_root(  root ).'.
      APPEND wa_code TO it_code.
    * Commit and detatch
      wa_code = 'area->detach_commit( ).'.
      APPEND wa_code TO it_code.
    * Quit the program: Return to the main code
      wa_code = 'LEAVE PROGRAM.'.
      APPEND wa_code TO it_code.
    * Generate the report program
      INSERT REPORT '/XXX/ZSYS_GENSELSCREEN' FROM it_code.
      COMMIT WORK.
    * Execute the report
      SUBMIT /XXX/zsys_genselscreen VIA SELECTION-SCREEN AND RETURN.
    Importing parameters are:
    it_dssfield type /XXX/zTsys_dssfield
    i_title type title_txt
    /XXX/ztsys_dssfield has the following line structure:
    FIELDNAME     CHAR08
    REFTABLE     TABNAME
    REFFIELD     FIELDNAME
    BASICTYPE     CHAR01
    DESCR     CHAR30_BRO
    I hope It helps you!
    I'm looking for a way to do the same in a selection-screen Pop-Up.
    For further questens contact me!
    Regards Christian

  • InfoObject Hierarchy selection screen function

    How would I find a function/method for displaying a BW infoobject, like cost center (/BI0/HCOSTCENTER), for a user selection screen in a group/hierarchy format? Similar to BEx hierarchy selection for node level. Are there any example programs for doing this?
    Edited by: A. Berkey on Mar 2, 2011 11:13 AM

    You mention about the 'Documentation' button.
    However, SE38 is a dialog program so this why it is easy to do. You are writing a report program. You could have the pushbutton on the screen itseld instead of the status bar. You should then be able to use LOOP AT SCREEN to hide. Here is some code to put a pushbutton on a screen.
    INCLUDE <list>.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 01(35) garment
      USER-COMMAND garment.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      PERFORM f_setup_pushbutton_text USING icon_execute_object text-s01
                                      CHANGING garment.
    FORM f_setup_pushbutton_text USING    p_icon
                                          p_text
                                 CHANGING p_result.
      DATA: l_result(50).
      CALL FUNCTION 'ICON_CREATE'
           EXPORTING
                name                  = p_icon
                text                  = p_text
                add_stdinf            = space
           IMPORTING
                RESULT                = l_result
           EXCEPTIONS
                EXCEPTIONS
                icon_not_found        = 1
                outputfield_too_short = 2
                OTHERS                = 3.
      IF sy-subrc EQ 0. ENDIF.
      p_result = l_result.
    ENDFORM.                               " F_SETUP_PUSHBUTTON_TEXT

  • Selection-screen functionality in dialog screen

    SELECT-OPTIONS pr_matnr FOR lv_matnr-matnr.
    What this does is display a 'From' and 'To' field, plus a little right-hand arrow to allow additional ranges to be added. I'm trying to achieve the same but within a dialog screen. Anyone?.
    I just know that I'm going to kick myself when I find out how to do it, but I have all but given up searching for it. Perhaps it's just a bad day and I've chosen the wrong search params.
    thanks.

    Hi.
    I tried this at my system and the following seems to work
    1) Create a report that defines a subscreen:
    REPORT ztst.
    TABLES mara.
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    SELECTION-SCREEN END OF SCREEN 1010.
    2) Call this subscreen from your dialog screen
    in PBO:
    CALL SUBSCREEN subscreen_1 INCLUDING 'ZTST' '1010'.
    in PAI:
    CALL SUBSCREEN subscreen_1.
    Reward if helpfull...
    Cheers,
    Sundar.

  • Selection-screen functionality

    Hi,
    I have 2 questions regarding selection-screens:
    1. I have 2 select-options like this in my selection-screen:
    Matnr:  s_matnr
    Vendor: s_lifnr
    How can I make a check that if Matnr is filled then Vendor has to be filled as well and vice versa ?
    2. I want to take the interval of data from a select-option and create the records in an internal table:
    example
    Contract no:  From 45000000 To 45000025
    All the records that are contracts (document cat. = K) from that interval have to be appended to an internal table.

    Hi Peter ,
    SELECTION-SCREEN :
      BEGIN OF BLOCK b1 WITH FRAME TITLE tit.
    parameters:
      p_matnr TYPE marc-matnr,
      P_WERKS TYPE MARC-WERKS,
      p_lifnr TYPE lfa1-lifnr.
    SELECTION-SCREEN END OF BLOCK b1.
    WRITE: 10 p_lifnr.
    INITIALIZATION.
      MOVE 'Material-Plant' TO tit.
    AT SELECTION-SCREEN ON p_matnr.
      PERFORM validate_material.
    AT SELECTION-SCREEN ON p_werks.
      PERFORM validate_plant.
    AT SELECTION-SCREEN." ON block b1.
      PERFORM validate_material_plant_comb.
    FORM validate_material .
      DATA
        lw_matnr TYPE matnr.
      IF  p_matnr IS NOT INITIAL.
        SELECT SINGLE matnr
          INTO lw_matnr
          FROM mara
         WHERE matnr EQ p_matnr.
        IF sy-subrc NE 0.
          MESSAGE e000(PP) WITH p_matnr.
        ENDIF.
      ENDIF.
    ENDFORM.                    " validate_material
    FORM validate_plant .
      DATA
       lw_werks TYPE werks.
      IF p_werks IS NOT INITIAL.
        SELECT SINGLE werks
          INTO lw_werks
          FROM t001w
         WHERE werks EQ p_werks.
        IF sy-subrc NE 0.
          MESSAGE e272(61) WITH p_werks.
        ENDIF.
      ENDIF.
    ENDFORM.                    " validate_plant
    FORM validate_material_plant_comb .
      DATA:
       lw_matnr TYPE matnr,
       lw_werks TYPE werks.
      IF p_matnr IS NOT INITIAL
      AND p_werks IS NOT INITIAL.
        SELECT SINGLE matnr
          INTO lw_matnr
          FROM marc
         WHERE werks EQ p_werks
           AND matnr EQ p_matnr.
        IF sy-subrc NE 0.
          MESSAGE e707(12) WITH p_matnr p_werks.
        ENDIF.
      ENDIF.
    ENDFORM.                    " validate_material_plant_comb
    I have done it with parameters You just convert into select options.
    This Validates the user before giving output
    Regards
    Swapna,
    Edited by: NagaSwapna Thota on Jun 28, 2008 12:10 PM
    Edited by: NagaSwapna Thota on Jun 28, 2008 12:11 PM

  • Add new field in selection-screen and output dynamically

    hi gurus,
      i need to add field in selectio-screen.
    i need to validate the field with existing fields.
    i need to add this in alv grid output list dynamically.
    thanks & regards,
       kgn9.

    Hi
    Try to use EXIT_SAPMM07M_001, it's to update the item (not header) text, but you can try to use it:
    FIELD-SYMBOLS: <BKTXT> TYPE MKPF-BKTXT.
    ASSIGN ('(SAPMM07M)MKPF-BKTXT') TO <BKTXT>.
    IF SY-SUBRC = 0.
      <BKTXT> = <.....>.
    ENDIF.
    Max

  • Function Keys on Selection-Screen

    Hi,
    I used function keys in one of my report program.
    Now, if some check box is checked in the customization that function should be displayed, otherwise shouldnot be displayed.
    I made use of "loop at screen" to make that application button invisible but i don't know the name of the button. I have given the name as same given while creating the button using "SSCRFIELDS".
    Is there anyy other way to disable the button??
    Regards,
    Yadesh

    Hi,
    Your requirement can be solved with two approaches:
    1) simpler one is to use different GUI statuses depending on checkbox state
    AT SELECTION-SCREEN OUTPUT.
    refresh it_exclude.
    if checkbox = 'X'.
      append 'BUTTON_FCODE'.
    endif.
    "you in turn swith on/off your desired button
    CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = 'GUI_STATUS'
          p_program = sy-repid
        TABLES
          p_exclude = it_exclude.
    2) as SELECTION-SCREEN FUNCTION KEY n statement cannot be processed within PAI/PBO block you cannot set it dynamically like
    AT SELECTION-SCREEN.
    IF check = 'X' .
    SELECTION-SCREEN FUNCTION KEY n.
    ELSE.
    "no selection button here
    ENDIF.
    Moreover you cannot change standard application toolbar of selection screen within Loop at screen statement (this will only affect selection screen parameters not toolbar).
    The only way here is dynamically generate report's code. When checkbox is check what you do is
    data: it_code type table of char72 with header line.
    READ REPORT sy-repid INTO it_code.
    Then looping through the code table you either remove entry having SELECTION-SCREEN FUNCTION KEY n. or add it to the table.
    Finally you switch reports code with
    INSERT REPORT sy-repid FROM it_code.
    And execute new one with
    SUBMIT (sy-repid).
    This will ensure that new SELECTION-SCREEN parameters (or function keys in your case can be switched and report will be executed with new screen look).
    Nevetherless be carefull! You need to ensure that submit will not create and endless loop. ABAP Memory will help you here (exchange flags within program indicating whether program is executed for the first time or another one).
    Hope this will give you some idea how to solve it.
    Regards
    Marcin

  • Using FUnction keys on selection screen

    Hi All,
    I want to submit a report if the user presses any assigned function key when he is on the selection screen of a t-code.
    how can i capture the commands of function key on selection screen.

    hi
    try below code
    TABLES sscrfields.
    INITIALIZATION.
    PARAMETERS : p_1 TYPE c.
    SELECTION-SCREEN : FUNCTION KEY 1.
    SSCRFIELDS-FUNCTXT_01 = 'Report'.
    SELECTION-SCREEN : FUNCTION KEY 2.
    SSCRFIELDS-FUNCTXT_02 = 'Report2'.
    AT SELECTION-SCREEN.
      IF sscrfields-ucomm = 'FC01'.
        SUBMIT ZXXX1 VIA SELECTION-SCREEN AND RETURN.
      ENDIF.
      IF sscrfields-ucomm = 'FC01'.
        SUBMIT ZXXX2 VIA SELECTION-SCREEN AND RETURN.
      ENDIF.

  • Dynamic Selection option in the selection screen

    Hi ,
    I have a requirement like this ....
    The user wants some fields to be default available in the selection screen. But they also want to be able to select the data based on additional fields (all the remaining fields ) which they want to see in the dynamic selection .
    The basic list for selections should be limited to the fields listed in the specifications provided to me and the remaining fields should be made available through the dynamic selection option.
    In the transaction FBL3N , this facility is provided.
    Kindly help me with this..
    thanks,
    Sumit .

    Hi Sumit,
    To include dynamic selection check this sample code.
    TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
    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.*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
    *WITH F8 BUTTON DISABLED  APPEND :  'PRIN' TO it_ucomm,
                'SPOS' TO it_ucomm,
                'ONLI' TO it_ucomm.  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = sy-pfkey
        TABLES
          p_exclude = it_ucomm.
    **EVENT ON THE SELECTION
    AT SELECTION-SCREEN.* LIST BOX ONE VALUES
      CASE one.
        WHEN '1'.
          mmtable = 'MARC'.
        WHEN '2'.
          mmtable = 'MARA'.
        WHEN '3'.
          mmtable = 'MARD'.
        WHEN '4'.
          mmtable = 'MARM'.
      ENDCASE.* LIST BOX TWO VALUES
      CASE two.
        WHEN '1'.
          sdtable = 'VBAK'.
        WHEN '2'.
          sdtable = 'VBAP'.
        WHEN '3'.
          sdtable = 'VBUK'.
        WHEN '4'.
          sdtable = 'VBUP'.
      ENDCASE.* LIST BOX THREE VALUES
      CASE three.
        WHEN '1'.
          hrtable = 'PA0001'.
        WHEN '2'.
          hrtable = 'PA0006'.
        WHEN '3'.
          hrtable = 'PA0022'.
        WHEN '4'.
          hrtable = 'PA0008'.
      ENDCASE.*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
    *AND ENABLING THE BUTTONS TO PERFORM F8
      CASE sscrfields-ucomm.
        WHEN 'FC01'.
          tablename = mmtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC02'.
          tablename = sdtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC03'.
          tablename = hrtable.
          sscrfields-ucomm = 'ONLI'.
      ENDCASE.*INITIALIZATION EVENT
    INITIALIZATION.*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
      PERFORM f4_value_request_pa.
      PERFORM f4_value_request_pb.
      PERFORM f4_value_request_pc.*START OF SELECTION EVENT
    START-OF-SELECTION.*SUBROUTINE FOR OUTPUT
      PERFORM output.*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PA
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
    FORM f4_value_request_pa.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'Plant Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'General Material Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Storage Location Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Units of Measure for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'ONE'.  CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.ENDFORM. " f4_value_request_tabname*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PB
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2FORM f4_value_request_pb.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'Sales Document: Header Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'Sales Document: Item Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Sales Document:Header Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Sales Document: Item Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'TWO'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.
    ENDFORM. " f4_value_request_PB*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PC
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3FORM f4_value_request_pc.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'Address Infotype 0006'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Education Infotype 0022'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Basic Pay Infotype 0008'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'THREE'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.
    ENDFORM. " f4_value_request_PC
    *&      Form  OUTPUT
    *       text
    *      -->P_TABLENAME  text
    *fINAL OUTPUT
    FORM output.  DATA p_table(10).  p_table = tablename.*popup to display teh selected table and
    *Continue button is clicked
      CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
        EXPORTING
          titel        = 'User Selections '
          textline1    = p_table
          textline2    = 'is the Selected table'
          start_column = 25
          start_row    = 6.*assigning the table value in p_table to the
    * Table in SE16 transaction by explicitly calling
      SET PARAMETER ID 'DTB' FIELD p_table.
      CALL TRANSACTION 'SE16'.
    ENDFORM.                    "OUTPUT
    Regards,
    Manoj Kumar P

  • Problem while hide a block on selection screen on button press

    Hi,
    I have added two buttons on the application toolbar of the selection screen. I have input fields under two blocks on the selection-screen. Initially the second block is hidden. If I press the button 1 the second block should be made visible.
    For this to happen, I captured the button 1 click event using the following statement.
    IF sscrfields-ucomm = 'FC01'.
    Inside the if ... endif, I looped at the screen and made the second block visible. It was working fine.
    loop at screen.
      if screen-group4 = '013'.
         screen-invisible = 1.
         screen-active    = 0.
      endif.
    endloop.
    Later the second button was added. Now when i run the report for the first time, if button 2 is clicked the hidden block appears on the selection screen even though i have not added any code for it.
    Just to check, i commented the logic to display the hidden block on button 1 click event. Even without any code the first time i press any of the two buttons added on the application toolbar the hidden block is displayed.
    I saved a variant for the report.
    During execution of the report, if i select any variant then the hidden block is displayed.
    Can anyone please tell me how to fix this problem.
    Regards,
    T2.

    Hi All,
    The problem is solved.
    Everyone was confusing between the pushbutton on the selectio-screen and on apllication toolbar
    (where you have the execute icon).
    Please find the code below. Thanks for you time and help. I appreciate it.
    REPORT ztest.
    INCLUDE <icon>.
    *  TABLES                                                              *
    TABLES: t001,              " Company Codes
            lfa1,              " Vendor Master (General Section)
            sscrfields.        " Fields on selection screens
    * To capture button press event.
    DATA: gv_button_press       TYPE c.
    * Menu Painter: Program interface for dynamic texts
    DATA: gs_dyntxt             TYPE smp_dyntxt.
    *  SELECTION SCREEN                                                    *
    SELECTION-SCREEN FUNCTION KEY 1.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-s01.
    * Company Code.
    SELECTION-SCREEN BEGIN OF BLOCK ccode WITH FRAME TITLE text-s02.
    SELECT-OPTIONS: s_bukrs FOR t001-bukrs OBLIGATORY MEMORY ID buk.
    SELECTION-SCREEN END OF BLOCK ccode.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK dsel WITH FRAME TITLE text-s04.
    * Vendor Master.
    SELECTION-SCREEN BEGIN OF BLOCK vend WITH FRAME TITLE text-s07.
    SELECT-OPTIONS: s_konzs FOR lfa1-konzs MODIF ID aw1.
    SELECT-OPTIONS: s_txcd1 FOR lfa1-stcd1 MODIF ID aw1.
    SELECT-OPTIONS: s_txcd2 FOR lfa1-stcd2 MODIF ID aw1.
    SELECTION-SCREEN END OF BLOCK vend.
    SELECTION-SCREEN END OF BLOCK dsel.
    * INITIALIZATION                                                       *
    INITIALIZATION.
    * Populate the Application toolbar button attributes.
      PERFORM populate_app_toolbar_buttons.
    * Hide the dynamic screen intially.
      PERFORM hide_screenfields.
    * AT SELECTION SCREEN                                                  *
    AT SELECTION-SCREEN.
    * Capture the button press event.
      PERFORM capture_button_press.
    * AT SELECTION-SCREEN OUTPUT.                                          *
    AT SELECTION-SCREEN OUTPUT.
    * Show/Hide the dynamic selection screen based on button press.
      PERFORM adapt_screen.
    *&  Form  populate_app_toolbar_buttons                                 *
    *   Display Icon on the application toolbar buttons. Also set the      *
    *   function codes for these buttons.                                  *
    FORM populate_app_toolbar_buttons.
      CLEAR gs_dyntxt.
      WRITE icon_fencing     TO gs_dyntxt-icon_id AS ICON.
      MOVE  text-b01         TO gs_dyntxt-quickinfo.   " Dynamic Selections
      MOVE gs_dyntxt         TO sscrfields-functxt_01.
    ENDFORM.                    " populate_app_toolbar_buttons
    *&  Form  hide_screenfields                                            *
    *   Initially hide the Dynamic selection screen.                       *
    FORM hide_screenfields.
      LOOP AT SCREEN.
        IF screen-group1 = 'AW1'.
          screen-invisible = '1'.
          screen-active    = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDFORM.                    " hide_screenfields
    *&  Form  capture_button_press                                         *
    *   Set the flag based on button press event. Appication bar button    *
    *   tcode is available only at 'At Selection-screen' event.            *
    *   Use the captured data at 'At Selection-screen Output' event.       *
    *   Screen adjustments is possible only under this event.              *
    FORM capture_button_press.
      IF sscrfields-ucomm = 'FC01'.
        IF gv_button_press IS INITIAL.
          gv_button_press = 'X'.
        ELSEIF gv_button_press EQ 'X'.
          CLEAR gv_button_press.
        ENDIF.
      ENDIF.
    ENDFORM.                    " capture_button_press
    *&  Form  adapt_screen                                                 *
    *   Show/Hide the dynamic selection screen based on button press       *
    *   captured at 'At selection-screen' event.                           *
    FORM adapt_screen.
    * If button press flag is initial hide the dynamic selection screen.
      IF gv_button_press IS INITIAL.
        LOOP AT SCREEN.
          IF screen-group1 = 'AW1'.
            screen-invisible = '1'.
            screen-active    = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
    * Elseif button press flag is 'X' show the dynamic selection screen.
      ELSEIF gv_button_press EQ 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'AW1'.
            screen-invisible = '0'.
            screen-active    = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " adapt_screen
    Regards,
    T2
    Message was edited by: Titu Joseph

  • 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

  • Selection screen with radio button groups

    hi experts,
    i have 3 frames in selection screen. in first frame i have two radio buttons. if i select 1st radio button 2nd  frame should be in active and  3rd frame should be disable mode. if i select 2nd radio button then 3rd  frame should be in active and other 2nd frame should be disable mode. in which event  i need to write the code.
    can any one help me regarding this and give some sample code.
    rgds,
    nag.

    Here is the example which will explain it completely :
    *& Report  Z_sscr                                                 *
    *  Published at ****************
    *&DYNAMIC Selection screen based on user clicks on the radiobutton*
    REPORT  zsscr.
    *TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
    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.
    *CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
    *WITH F8 BUTTON DISABLED
      APPEND :  'PRIN' TO it_ucomm,
                'SPOS' TO it_ucomm,
                'ONLI' TO it_ucomm.
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = sy-pfkey
        TABLES
          p_exclude = it_ucomm.
    **EVENT ON THE SELECTION
    AT SELECTION-SCREEN.
    * LIST BOX ONE VALUES
      CASE one.
        WHEN '1'.
          mmtable = 'MARC'.
        WHEN '2'.
          mmtable = 'MARA'.
        WHEN '3'.
          mmtable = 'MARD'.
        WHEN '4'.
          mmtable = 'MARM'.
      ENDCASE.
    * LIST BOX TWO VALUES
      CASE two.
        WHEN '1'.
          sdtable = 'VBAK'.
        WHEN '2'.
          sdtable = 'VBAP'.
        WHEN '3'.
          sdtable = 'VBUK'.
        WHEN '4'.
          sdtable = 'VBUP'.
      ENDCASE.
    * LIST BOX THREE VALUES
      CASE three.
        WHEN '1'.
          hrtable = 'PA0001'.
        WHEN '2'.
          hrtable = 'PA0006'.
        WHEN '3'.
          hrtable = 'PA0022'.
        WHEN '4'.
          hrtable = 'PA0008'.
      ENDCASE.
    *VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
    *AND ENABLING THE BUTTONS TO PERFORM F8
      CASE sscrfields-ucomm.
        WHEN 'FC01'.
          tablename = mmtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC02'.
          tablename = sdtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC03'.
          tablename = hrtable.
          sscrfields-ucomm = 'ONLI'.
      ENDCASE.
    *INITIALIZATION EVENT
    INITIALIZATION.
    *VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
      PERFORM f4_value_request_pa.
      PERFORM f4_value_request_pb.
      PERFORM f4_value_request_pc.
    *START OF SELECTION EVENT
    START-OF-SELECTION.
    *SUBROUTINE FOR OUTPUT
      PERFORM output.
    *&      Form  f4_value_request_PA
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
    FORM f4_value_request_pa.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'Plant Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '2'.
      l_value-text = 'General Material Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '3'.
      l_value-text = 'Storage Location Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '4'.
      l_value-text = 'Units of Measure for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'ONE'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.
    ENDFORM. " f4_value_request_tabname
    *&      Form  f4_value_request_PB
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2
    FORM f4_value_request_pb.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'Sales Document: Header Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '2'.
      l_value-text = 'Sales Document: Item Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '3'.
      l_value-text = 'Sales Document:Header Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '4'.
      l_value-text = 'Sales Document: Item Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'TWO'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.
    ENDFORM. " f4_value_request_PB
    *&      Form  f4_value_request_PC
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3
    FORM f4_value_request_pc.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '2'.
      l_value-text = 'Address Infotype 0006'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '3'.
      l_value-text = 'Education Infotype 0022'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '4'.
      l_value-text = 'Basic Pay Infotype 0008'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'THREE'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.
    ENDFORM. " f4_value_request_PC
    *&      Form  OUTPUT
    *       text
    *      -->P_TABLENAME  text
    *fINAL OUTPUT
    FORM output.
      DATA p_table(10).
      p_table = tablename.
    *popup to display teh selected table and
    *Continue button is clicked
      CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
        EXPORTING
          titel        = 'User Selections '
          textline1    = p_table
          textline2    = 'is the Selected table'
          start_column = 25
          start_row    = 6.
    *assigning the table value in p_table to the
    * Table in SE16 transaction by explicitly calling
      SET PARAMETER ID 'DTB' FIELD p_table.
      CALL TRANSACTION 'SE16'.
    ENDFORM.                    "OUTPUT
    Reward If found Helpful.

Maybe you are looking for

  • Resolute song refuses to be downloaded

    I bought Astronautslis' album "You and Yer Good Ideas" off of iTunes months ago. When I first bought I received an error message saying the song won't download. After hours of soul searching and thousands of dollars in therapy I've accepted the fact

  • Photoshop cc 2014 missing shape layers and plugins

    i have the trail version off Photoshop cc 2014 and its doesn't have most of the features like history brush n and also missing the star shape how can i fix this thanks its also missing the mixer brush

  • Solution Found - Media Go Synching Same Content Repeatedly

    Problem - Media Go syncs same content to phone regardless of whether the content is currently on the device. This can lead to synching your library every time you open Media Go. Known Phones Affected: Xperia Arc, Ray, Mini Solution: Download Media Go

  • T3100 problem

    Hi guys Some years ago i recived as present the inspire T3100 speakers. They did a great job until a day the right speaker (the one with volume control) stopped to work. I came back where my girlfriend bought 'em but they were out of the guarantee...

  • Clearing jsessionid

    hi experts we have a c# application with RSA security as front end. RSA sso is implemented on businessobjects and it is working. But the issue is, if the user1 logons in application and creates a session in infoview. But he didn't logout infoview. wh