SELECT-OPTIONS in Screen

Hi,
I am trying to create select - options in Screen , i.e. not the selection screen but a custom screen, say 9000. I can make the text boxes etc for having the select options. But How do I simulate the button wchich comes after select options. It would be used in dialogue programming with multiple screens having different reports.
Please reply to me urgently,
Thanks and Regards
Arnab Panigrahi

A few dot points:
1. You can have a select-option embedded in a dynpro, if you want, by using a subscreen.  There's an example bit of code at
Module - pool Question..?
This would be easy to adapt to being a popup rather than a full screen if required.
2. As noted above, you can code your own select-options as in
Making a referenced field a range?
which I think Sesh has quoted from.
3. For the requirement you expressed initially, the code below should do the trick... you get a different block of extra selections depending on which radionbutton you select.
Jonathan
report zlocal_jc_radiobutton_hiding.
tables:
  sscrfields.           "To allow trapping of Fcode on selection screen
selection-screen begin of block tot with frame.
parameters :
  p_rb_01          radiobutton group rbg1 user-command zrb1 default 'X',
  p_rb_02          radiobutton group rbg1.
selection-screen begin of block block1 with frame title text1.
parameters:
  p_date                like sy-datum modif id bl1.
selection-screen end of block block1.
selection-screen begin of block block2 with frame title text2.
parameters:
  p_time                like sy-uzeit modif id bl2.
selection-screen end of block block2.
selection-screen end of block tot.
*" Events:
initialization.
  text1 = 'Enter a date'.
  text2 = 'Enter a time'.
at selection-screen output.
  perform at_selection_screen_output.
at selection-screen.
  perform at_selection_screen.
*&      Form  at_selection_screen_output
form at_selection_screen_output.
*" Hide the appropriate fields
  loop at screen.
    if  p_rb_01       = 'X'
    and screen-group1 = 'BL2'.
      screen-active = '0'.
    endif.
    if  p_rb_02       = 'X'
    and screen-group1 = 'BL1'.
      screen-active = '0'.
    endif.
    modify screen.
  endloop.
endform.                    "at_selection_screen_output
*&      Form  at_selection_screen
form at_selection_screen.
*" trap the radiobutton
  if sscrfields-ucomm = 'ZRB1'. "clicked Subtotal checkbox
*" if you want to trap this radio button press here
  endif.
endform.                    "at_selection_screen

Similar Messages

  • How to degin a  select-option in screen painter?

    Help me !
    How can i create an object  like select-option  in screen painter.
    I want to input a range ,but there are no button or text   in screen painter  like  select-option?

    hai u can create select options on screen but in little differernt way..
    1st way : if u want to give only 1 interval then declare on screen as two different variables in same line
    and after that append the value in ranges.
    2nd way: here u can define as asingle input vriable  beside that variable u can give a icon as extension in select option and give give some function code to that.if we click on that in user command write following code :
      IF V_OKCODE = 'EXT'.
        CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
            EXPORTING
                 TITLE             = 'Title'
                 TEXT              = 'Text'
                 SIGNED            = 'X'
            LOWER_CASE        = ' '
            NO_INTERVAL_CHECK = ' '
            JUST_DISPLAY      = ' '
            JUST_INCL         = ' '
            EXCLUDED_OPTIONS  =
            DESCRIPTION       =
                 HELP_FIELD        = 'T001W-WERKS'
            SEARCH_HELP       =
             TABLES
                  RANGE             = R_WERKS
            EXCEPTIONS
                 NO_RANGE_TAB      = 1
                 CANCELLED         = 2
                 INTERNAL_ERROR    = 3
                 OTHERS            = 4
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    help field the field reference wich u want to declare and range is where values will be stored atomatically as in select options.
    once we click the icon if we execute the function module a window will open as in selection option in reports.there user can enter the values.once the user enters the values it will stored automatically in ranges declared like r_werks in above example.
    try it..

  • How to declare and work with select-option in screen painter?

    hello there,
    can anybody plz suggest me ,how to declare and work with select-option in screen painter?
    neon

    Hi Blue,
    Please check these threads which will help you a lot..
    module pool programming " to add selection-option on screen"
    Re: Select option in Dialog program screen
    Re: SELECT-OPTIONS in Screen
    Good luck
    Narin

  • Select-Option in Screen??

    Hi Experts,
    Requirement is like select-option on Selection-Screen, I want that same function on Screen(Module Pool). Infact i want that button for random selection what comes automatically  in select-options to select the multiple data.
    Can anyone help me for this.Its very very urgent.
    Thanks in Advance.
    Regards,
    Rahul

    hi rahul,
    its not possible to create multiple selections in module pool.
    but you can create 2 i/o fields for lower and upper limit in module pool and you can write select query with between keyword to get values from lower to upper limits.
    Senthil kumar

  • SELECT-OPTION IN SCREEN (SCREEN-PAINTER)

    I want to put a select option in a screen type screen painter
    Using this the user could enter a ranger of personal numbers.
    Can any one give me a clue on how to do that ?

    This is the code of the program and I my break point I do not have anything in SELPERNR
    REPORT  ZY_TESTSUBSCREEN                        .
    TABLES: PA0003.
    Custom Selection Screen 1010
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: SELPERNR FOR  PA0003-PERNR.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN END OF SCREEN 1010.
    CALL SCREEN 100.
    BREAK STEPHANK.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CHECK SY-UCOMM(1) NE '%'.
      LEAVE TO SCREEN 0.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    This is the screen flow
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    CALL SUBSCREEN AREA INCLUDING SY-REPID '1010'.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    Rich do you have any idea why ?

  • Select options in screens

    Hello friends,
                       I am doing a screen program where the user will enter a range of sales orders,and i have to select from vbap the corresponding materials against that sales order number,but i am finding it difficult to use the select statement.
                      suppose my screen fields are vbeln-low and vbeln-high,so here i cant use the select statement select * from vbap into corresponding fields of iatb where
    vbeln >= vbeln-low and vbeln <=vbeln-high, bcoz if the user doesnt enter vbeln-high then select statement goes wrong,other option i making a structure with fields like sign option low high,but if i have more select options that again beocmes a problem,is there anyway that i can solve this with a single select statement

    Hi
    U can create a SELECTION-SCREEN in a module pool defining it in the TOP-INCLUDE:
    SELECTION-SCREEN BEGIN OF SCREEN 0100.
    SELECT-OPTIONS: SO_VBELN FOR VBAK-VBELN.
    SELECTION-SCREEN END    OF SCREEN 0100.
    In your MAIN SCREEN
    PROCESS PBO.
      MODULE CALL_SEL_SCREEN.
    MODULE CALL_SEL_SCREEN.
       CALL SELECTION-SCREEN 100.
       IF SY-SUBRC = 0.
    ---> User has pressed F8
         SELECT * FROM VBAP INTO TABLE T_VBAP WHERE VBELN IN SO_VBELN.
       ELSE.
    ----> User wants to exit from selection-screen.
       ENDIF.
    ENDMODULE.
    Max

  • Module pool programming " to add selection-option on screen"

    I want to add selection option for a field ( matnr ) on the screen in module pool programmiing. ( how it comes in report programming). If you you know how to add Please help me to solve.....

    Sure, you need to define your selection screen as a subscreen, then embed this into your subscreen area on the dynpro.  Here is a sample program.
    report zrich_0006 .
    tables: mara.
    * Custom Selection Screen 1010
    selection-screen begin of screen 1010 as subscreen.
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_rad1 radiobutton group grp1 default 'X',
                p_rad2 radiobutton group grp1,
                p_rad3 radiobutton group grp1.
    select-options: s_matnr for  mara-matnr,
                    s_matkl for  mara-matkl,
                    s_mtart for  mara-mtart.
    selection-screen end of block b1.
    selection-screen end of screen 1010.
    start-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    module status_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    endmodule.
    *&      Module  USER_COMMAND_0100  INPUT
    module user_command_0100 input.
    endmodule.
    * Create Screen 100 with a subscreen area called "subscreen_1010"
    * Screen Flow Logic follows
    *process before output.
    *  module status_0100.
    *  call subscreen subscreen_1010 including sy-repid '1010'.
    *process after input.
    *  call subscreen subscreen_1010 .
    *  module user_command_0100.
    Regards,
    Rich Heilman

  • Hiding of Select Options in screen based on selection in selection list box

    Hi People,
             I have a screen where i have put a selection list box, it is pre-filled with values, Now based on the value which user selects, I want to show/hide some select-options fields. I have declared the select options in the top include of my program,
    SELECT-OPTIONS: so_user FOR ls_rsp_user-user_id MODIF ID 222,
                    so_userg FOR ls_rsp_usergrp-user_grp_id MODIF ID 333,
                    so_ccode FOR ls_vdmp-bukrs MODIF ID 444,
    then in the PBO of my screen, I have written a module, set screen in which I loop over screen & check the group id's
    LOOP AT SCREEN.
        IF screen-group1 = '111'.
          IF gv_hier_resp_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
        ELSEIF screen-group1 = '222'.
          IF gv_user_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
        ELSEIF screen-group1 = '333'.
          IF gv_user_group_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
        ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    I am setting some flags based on the value which user selects in the selection list box, When I debugged I found that the flags were being set correctly, but the screen group value never set to '222' or '333', these are id's i have used for select options. Hence I am unable to hide/show the select options fields.  Kindly suggest some solutions for this.
    Thanks & Regards,
    Deepak

    then in the PBO of my screen
    Your SELECT-OPTIONS are defined in a SELECTION-SCREEN so the PBO actions must be maintained in a AT SELECTION-SCREEN OUTPUT block.
    I suppose the selection-screen is a subscreen, if you dont want to get unwanted interactions with a main selection-screen of the report, check sy-dynnr
    AT SELECTION-SCREEN OUTPUT.
       CASE sy-dynnr.
         WHEN '1000'. " main screen of report
         WHEN '0100'. " selection-screen defined as subscreen
           LOOP AT SCREEN.
             CASE SCREEN-GROUP1.
               WHEN '111'.
             ENDCASE.
           ENDLOOP.
       ENDCASE.
    Regards,
    Raymond

  • Reset Select options in Screen

    Hi,
    I have a scenario where, i need to disable the select options and clear the visible contents in it.
    Currently below is the logic implemented, the radio button is getting disabled and also cleared of selection.
    Select option fields are getting disabled.
    But the issue is, the Select options LOW and HIGH fields show the older values and are not getting reset.
    Please share your thoughts.
    PARAMETERS : r_pernr RADIOBUTTON GROUP g2 MODIF ID cs1.
    SELECT-OPTIONS :   p_pernr FOR pa0001-pernr MODIF ID cs1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF V_Flag NE 'X' AND
           screen-group1 = 'CS1'.
          r_pernr = space.
          p_pernr-low = space.
          p_pernr-high = space.
          screen-input = 0.
          MODIFY SCREEN.
       ENDIF.
      ENDLOOP.

    TABLES:PA0001.
    DATA:LF_PERNR TYPE CHAR08.
    PARAMETERS : R_PERNR RADIOBUTTON GROUP G2 MODIF ID CS1,
                 R_2 RADIOBUTTON GROUP G2.
    SELECT-OPTIONS : P_PERNR FOR LF_PERNR MODIF ID CS1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        R_PERNR = SPACE.
        CLEAR P_PERNR[].
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
    ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PERNR-LOW.
      PERFORM F4_HELP USING 'P_PERNR-LOW'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PERNR-HIGH.
      PERFORM F4_HELP USING 'P_PERNR-HIGH'.
    FORM F4_HELP USING PC_1.
      TYPES:BEGIN OF TY,
          PERNR TYPE PA0001-PERNR,
          END OF TY.
      DATA:IT TYPE TABLE OF TY.
      SELECT PERNR INTO TABLE IT FROM PA0001 UP TO 10 rows.
      CHECK IT[] IS NOT INITIAL.
      DELETE ADJACENT DUPLICATES FROM IT.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD    = 'PERNR'
          DYNPPROG    = SY-CPROG
          DYNPNR      = SY-DYNNR
          DYNPROFIELD = PC_1
          VALUE_ORG       = 'S'
        TABLES
          VALUE_TAB   = IT[]
        EXCEPTIONS
          OTHERS      = 0.
    ENDFORM.          

  • Select Options in Screen Painter

    Hi there
    Is there some way I can create two text boxes and one button, when the buttons gets pressed the same action as your usual SELECT-OPTIONS dialog box gets displayed? Is ther maybe a function module I can call for this?
    Thanx,
    Jan

    you can call a selection screen in sub screen area
    declare selection screen as
    begin of selection-screen 0100 as subscreen.
    end of selection-screen...
    then,
    in flow logic of your module pool screen
    PBO
    call subscreen <sub_area> including sy-repid '0100'.
    " at selection-screen output event is called
    PAI.
    call subscreen <sub_area>.
    "at selection-screen is called
                                              OR
    Call FM COMPLEX_SELECTIONS_DIALOG when the select options button is pressed
    Edited by: Amit Gupta on Nov 6, 2008 11:19 AM

  • How to realize  select-option in screen

    Hi,everyone.
    in a report , i can define select-option in  SELECTION-SCREEN .
    how can i realize the similar function in a screen ?
    ths!

    Hi,
    Check this sample program to define selection screen in dialog programming.include the selection screen in a subscreen and then include the subscreen in your screen.
    report YS_SELECTION .
    tables: mara.
    Custom Selection Screen 1010
    selection-screen begin of screen 1010 as subscreen.
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_rad1 radiobutton group grp1 default 'X',
                p_rad2 radiobutton group grp1,
                p_rad3 radiobutton group grp1.
    select-options: s_matnr for  mara-matnr,
                    s_matkl for  mara-matkl,
                    s_mtart for  mara-mtart.
    selection-screen end of block b1.
    selection-screen end of screen 1010.
    start-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    module status_0100 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    endmodule.
    *&      Module  USER_COMMAND_0100  INPUT
    module user_command_0100 input.
    endmodule.
    create   screen 100 and create a subscreen area called "subscreen_1010"
    Screen Flow Logic follows
    *process before output.
    module status_0100.
    call subscreen subscreen_1010 including sy-repid '1010'.
    *process after input.
    call subscreen subscreen_1010 .
    module user_command_0100.
    Laxman

  • How to design select-option through screen painter

    I am new to screen painter. I want to make a screen having range of values high/low (just like select-option)......How can I do this using screen painter?

    Hi!
    Method 1
    a) Create a subscreen area in your screen layout where you want to create the select options.
    b) In the top include of  your module pool program declare a selection screen as a subscreen e.g.
           SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
                 select-options s_matnr for mara-matnr.
           SELECTION-SCREEN END OF SCREEN.
    c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
           CALL SUBCREEN sub_area INCLUDING    
      This call subscreen statement is necessary for transport of values between screen and program.
    Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
    Method 2
    a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
    struc_tab_and_field-fieldname   = con_cust.      " 'KUNNR'
    struc_tab_and_field-tablename = con_kna1.     " 'KNA1'.
    CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
              EXPORTING
              TITLE                   = ' '
                text                         = g_titl1                                " 'Customers'
                tab_and_field     = struc_tab_and_field
              TABLES
                RANGE                   = rng_kunnr
              EXCEPTIONS
                NO_RANGE_TAB          = 1
                CANCELLED                    = 2
                INTERNAL_ERROR     = 3
                INVALID_FIELDNAME = 4
                OTHERS                           = 5.
    IF NOT rng_kunnr[] IS INITIAL.
             Read the very first entry of the range table and pass it to
             dynpro screen field
               READ TABLE rng_kunnr INDEX 1.
               IF sy-subrc = 0.
                  g_cust = rng_kunnr-low.
               ENDIF.
    You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements
    You can go with it also ....
    Re: Select-options in dynpro
    Regards....

  • Selection option CO15 screen

    Hi experts,
    i want to select the production order depend upon the material in CO15 screen.
    is there possible.
    pls guide me?
    thanks & regds
    K.Bhuvaneswaran

    Hi bhuvaneswaran,
    In Tcode : CO15 Order field is the only selection field.
    But if you don't no the order number then put the Cursor in the Order selection Field and Press F4 and Select the "Process Order Using Info System" and set as default. System will take you to a new screen where it is possible to find the Order number with Material Number.
    Regards
    radhak mk

  • Output from tables which I mention in select options of the screen as input

    Dear All,
    I want to fetch the data in the form of output from tables which I will mention in select options of the screen as input.
    In selection screen option if I write any table name then how can i select this table in select query of ABAP program ?.
    I may select any tables in select options of screen. But In select query I should get that table name automatically.. How ?
    e.g. If i put table name as an input i.e.  MARA  in select option .
    In program how to write select query to get records from that table ?
    SELECT MTART MATKL from MARA
    Every time I should not go to select query of program  & replace the tablename.
    How to solve this problem ?

    Hi,
    PARAMETERS p_table(30)." type string.
    "This is a Tested code Just Execute and Check
    START-OF-SELECTION.
      DATA: lt_tmp TYPE REF TO data.
      DATA : line TYPE REF TO data.
      FIELD-SYMBOLS: <lt_tmp> TYPE STANDARD TABLE, <wa>, <dyn_field>.
      CREATE DATA lt_tmp TYPE STANDARD TABLE OF (p_table).
      ASSIGN lt_tmp->* TO <lt_tmp> .
      CREATE DATA line LIKE LINE OF <lt_tmp>.
      ASSIGN line->* TO <wa>.
      SELECT * FROM (p_table) INTO TABLE <lt_tmp>.
      IF sy-subrc = 0.
        LOOP AT <lt_tmp> ASSIGNING <wa>.
          DO.
            ASSIGN COMPONENT  sy-index
               OF STRUCTURE <wa> TO <dyn_field>.
            IF sy-subrc NE 0.
              EXIT.
            ENDIF.
            IF sy-index = 1.
              WRITE:/ <dyn_field>.
            ELSE.
              WRITE: <dyn_field>.
            ENDIF.
          ENDDO.
        ENDLOOP.
      ENDIF.
    Cheerz
    Ram

  • How to create select-options in my own screen?

    Hi
    I create my screen and i wish to place select-options on screen. how to do that?

    There is no SAP standard way of creating select options on screen.However you can create your own select options by providing two fields on screen in which maximum and minimum values can be entered.
    screen fields :
    input1 : <minimum value>
    input2 : <maximum value>
    data :
    range for <some field>
    then you can fill a range with these values.For eg.
    range-low = <low value input field>.
    range-sign = 'I'.
    range-option = 'BT'.
    range-high = <high value input field>.
    append range.
    *Now write your select statement.
    select * from <some table> where <field> in <range>

Maybe you are looking for

  • Error in insert query

    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);      String query =      "insert into log1(converted_time,elapsed_time,client_ip,status_code,data_received,request_method,url,lookup_info,host_ip,object_type,sy

  • Feeling Stressed need to relax?

    http://tunein.com/radio/Simply-Jazz-s244119/ Or Http://Allmusicradio.eu Just building my little empire

  • How can I select which photo is used on the cover of an i-Photo book?

    I have created a photobook, and can do most things I need, but the photo selected by Autoflow for the cover is not the one I want. Can anyone tell me how to change it?

  • HI Experts Explain  this Scenario

    THIS SCENARIO IS POSSIBLE WITH BPM. ANY BODY HELP ME TO SOLVE THIS PROBLEM          EP SYSTEM  - REQ-->      XI System               -REQ-> FILE RECEIVER                                      <--RES     XI System             <--RES---   FILE SENDER <-

  • Combined upgrade & Unicode conversion.

    Hi I need some suggestions for my concerns: I would appreciate, if you reply ASAP for below situations and actions. Current system: HP unix DB: Oracle10.2.0.2 SAP 6.20 with SP 61, single code page strategy: resource minimized. Upgrading from 4.7 was