Select-option field on module pool screen

hi all,
Can anyone pls let me know, how to design and use a field like a select-option field on a Module-pool screen i.e.  how can i get that multiple selections tab after the high field of the select-options.
thanks in advance,
vinny

All you need to do is define your selection screen and then embed it in a subscreen area of your dynpro(screen).  Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
<b>selection-screen begin of screen 1010 as subscreen.</b>
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.
<b>* Screen 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.</b>
Regards,
Rich Heilman

Similar Messages

  • Problem in creating a Select-option im a module pool screen

    I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
    but I'm having trouble to replicate it...
    I've created this conde in my TOP include
    SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
       SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
        SELECT-OPTIONS: s_matnr FOR mara-matnr.
      SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 201.
    and this is my screen flow code
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE pbo_200.
    PROCESS AFTER INPUT.
      MODULE pai.
      MODULE user_command_0200.
    in the screen 200 I have a subscreen area named subs
    but when I do this:
    MODULE pbo_200 OUTPUT.
      CALL subscreen subs including sy-repid '0201'.
    ENDMODULE.                 " pbo_200  OUTPUT
    it doesn't "compile"
    it gives me this error:
    ""." or "ID ... FIELD ..." expected after "SUBSCREEN"."
    what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...

    you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).

  • Selection-options on a module pool screen

    Hi all,
    How to define a field as selection-options on a module pool screen.
    Thanks,
    Chuong

    Hi Chuong,
    You will need to define the screen as a selection screen..
    Else, you can define a subscreen area in your screen, define a subscreen as selection screen and call that screen here..
    Thanks and Best Regards,
    Vikas Bittera.

  • Dialog programming - How to place a select-option field in a dialog screen

    Hi all,
    In Dialog Programming, How to place a select-option field in a dialog screen.
    Kindly give me some example code...
    Thanks,
    Jaffer Ali.S

    hi Ali,
    U can add select-options in ur module pool by using  SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN  command.
    check this link for reference.....
    http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
    Example Code :
    DATA : ok_code TYPE sy-ucomm.
    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'.
    CALL SCREEN 1010 .
    ENDMODULE.                    "status_0100 OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    SCREEN 100 ****************
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
    <b>***** where sub_1010 is name of sub-screen area</b>
    PROCESS AFTER INPUT.
      CALL SUBSCREEN sub_1010.
      MODULE user_command_0100.
    <<< REMOVED BY MODERATOR >>>
    Harimanjesh AN
    Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM

  • How to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?

    hi frnds.
    My problem is in module pool screen how to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?And how to do GUI STATUS and GUI TITLE? IN SE80.
      ITS URGENT.POINTS WILL BE REWADED.THANKS  IN ADVANCE.

    Hi,
    Go through this thread.
    [expand and collapse|expand and collapse]
    Cheers,
    Simha.

  • Regarding select option in a module pool prog .

    hello .. i need some help regarding select options in a module pool program .. i hav tried putting a select options in a module pool prog but i am not able 2 ... can any one tel me why select options r not aloowed in a module pool prog ?? and i read that we hav 2 use ranges 2 fulfil the needs of the select options . is there any way i cal get all the functionality of select options ( eg including , excludig , equal to , not equal to , .... .) using a range ??

    Hi
    Select-options won't work if you declare the program as Module POOL.
    if you wants to use select-options like utility in module pool programming
    use ranges
    declare and develop ranges and use that in select statement where condition.
    ranges: r_vbeln for vbak-vbeln.
    r_vbeln-low = '0018900678'.
    r_vbeln-sign = 'I'.
    r_vbeln-option = 'EQ'.
    append r_vbeln.
    r_vbeln-low = '0018900456'.
    r_vbeln-sign = 'I'.
    r_vbeln-option = 'EQ'.
    append r_vbeln.
    reward if useful
    regards
    Anji

  • How to pass the Data to sclect option field in module pool??

    Hai Experts,
                         I have Created the Select-Options using Sub screen its working fine for me.
    But the problem is when i pass the data to one of the my select options field its not  showing  in display mode..
    please me this
    i created select option slike this,
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
    SELECT-OPTIONS : s_kunnr  FOR wa_zcodntr-fin_kunnr,
                                  s_altkn FOR wa_zcodntr-altkn.
    SELECTION-SCREEN END OF SCREEN 400 .
    Thanks ,
    Adv.

    Thanks SAP_wiz kick replay,
    Actullay in my module pool screen i have to select option field like F1 and F2
    any one filed give the input and excute pick the coresponding data for F2 (select option) field and  display  and vice -versa.

  • Require select-option functionality in Module Pool Programming

    Hi Gurus,
    I am doing a development by Module Pool on Warehouse Management. For that development user require select-option on
    screen for entering multiple storage type.
    My first question : Is any thing available for directly implement select-option by module pool ?
    My Second Question : I have use two text boxes for range and one button for multiple selection and arrange on screen like select-option. then on PAI of that button I call COMPLEX_SELECTIONS_DIALOG FM. Now it is working fine. Now I put some value in it. when I save the values and exit , I want the icon of the button must change from icon_enter_more to icon_display_more. I write the below code for that  in PBO of the screen:
           if rtab[] is initial.   "RTAB[] is a table for holding values what inputted in popup of multiple selection.
              write icon_enter_more as icon to button.  " BUTTON is screen field and it taken as a type C length 4 on TOP module as .
          else.                                                               " BUTTON taken on screen as push button.
              write icon_display_more as icon to button.
          endif.
    but the icon is not changing dynamically.
    If I use ICON_CREATE then one short dump happen describing OUTPUTLEN_TOO_SMALL.
    Can anybody please give me the solution.

    IN PBO SECTION.
    module STATUS_0001 output.
      SET PF-STATUS 'ZINVGUI'.
      SET TITLEBAR 'ZIN'.
    if rbtn1 = 'X'.
       loop at screen.
         if screen-group1 = 'GR2'.
         screen-input = 0.
         modify screen.
         endif.
       endloop.
    else.
       loop at screen.
         if screen-group1 = 'GR1'.
         screen-input = 0.
         modify screen.
         endif.
       endloop.
    endif.
    IF RTAB[] IS INITIAL.
       WRITE icon_enter_more AS ICON TO GTTYP.
      else.
       WRITE icon_display_more AS ICON TO GTTYP.
    endif.
    endmodule.
    IN PAI
    form GET_STORAGE_TYPE .
    TAB_FIELD-FIELDNAME = 'LGTYP'.
    TAB_FIELD-TABLENAME = 'LQUA'.
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
       EXPORTING
         TITLE                   = ' '
         TEXT                    = 'Storage Types'
        SIGNED                  = 'X'
        LOWER_CASE              = ' '
        NO_INTERVAL_CHECK       = ' '
        JUST_DISPLAY            = ' '
        JUST_INCL               = ' '
        EXCLUDED_OPTIONS        =
        DESCRIPTION             =
        HELP_FIELD              =
        SEARCH_HELP             =
         TAB_AND_FIELD           = TAB_FIELD
        TABLES
          range                   = RTAB
       EXCEPTIONS
         NO_RANGE_TAB            = 1
         CANCELLED               = 2
         INTERNAL_ERROR          = 3
         INVALID_FIELDNAME       = 4
         OTHERS                  = 5
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DATA:LAST TYPE SY-TABIX.
      DESCRIBE TABLE RTAB LINES LAST.
      IF NOT rTAB[] IS INITIAL.
             Read the very first entry of the range table and pass it to
             dynpro screen field
               READ TABLE rTAB INDEX 1.
               IF sy-subrc = 0.
                  P_LGTYP1 = rTAB-low.
               ENDIF.
               READ TABLE RTAB INDEX LAST.
               IF sy-subrc = 0.
                  P_LGTYP1U = rTAB-LOW.
               ENDIF.
    ELSE.
      rTAB-low = p_lgtyp1.
      append rtab.
      rTAB-low = p_lgtyp1u.
      append rtab.
    ENDIF.
    endform.               
    IN TOP INCLUDE.
    DATA : GTTYP TYPE C length 4.

  • Select-options Problem in module pool

    Hi,
         I have created select-options in a seperate program and i have called the subscreen in module pool program.
    I dont have any problem with the display of select-options but whatever the value given is not getting in to the program. Hw to solve this problem
    Assured Points
    Thanks in Advance
    Jai

    hi,
    did you declare that in top include?
    if not declare it globally.
    In stead of subscreen, try to do with screen itself.
    Create screen like this.
    selection-screen begin of screen 300.
    selection-screen begin of block b1 with frame title text-000.
    select-options : so_ebeln for v_ebeln modif id g1,
                     so_vbeln for v_vbeln modif id g2.
    selection-screen end of block b1.
    selection-screen end of screen 300.
    Call this screen : in PAI of ur another screen.
    call selection-screen 300.
    Regards
    Sandeep REddy

  • How to creat select-option on module pool screen???

    Hi All,
       please tell me how to creat select-option on module pool screen???
    Regards
    Deepak

    Hi Deepak Kumar Sharma,
    There are Two ways to achieve it...
    1) How to create a select-options in a module pool screen.
    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 <program> <screen>
    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.
    Also have a look on below threads
    how to make select option in module pool
    select option in module pool program
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

  • How to create select-options on module pool screen

    Hi all
    I want get a range of values from the user from the module pool screen.
    Is there any element available on module pool screen like select options on the selection screen of reports.
    reply me ASAS.
    Thanks.

    hi krishna
    actually I want to display the details of PO numbers from 45000100 to 45000150. user will enter this range on the module pool screen just as we enter on the selection screen of report. My question is do we have a button like select-option on the module pool screen.
    Plz . reply me ASAP.
    Thanks.

  • Selct Options in Module Pool screen.......

    Hi Gurus,
    We know the way to get the Select options on the Module -Pool screen as follows....
    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.
    I have tried the same as a test run for the FM. .but not returning meaningfull range......
    Can any 1 clerify where the code containing the FM has to be included in the Screen flow (inside PAI, PBO or else) to get the range which can further be used inside the code for database selections or else..... .
    Secondly, how is the inserted icon populated and  used while coding........????
    Thanks And Regards,
    Abhi........

    Hi
    Please find the below code u will get select options
    dont create any screen fitst jus type of prog is 'M' and create a tcode with 100 screen
    than execute u will get select options
    TABLES:VBAP.
    SELECTION-SCREEN BEGIN OF SCREEN 100 .
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS S_VBELN FOR VBAP-VBELN.
    PARAMETER P_WERKS LIKE VBAP-WERKS.
    SELECT-OPTIONS S_ERDAT FOR VBAP-ERDAT.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN END OF SCREEN 100.
    Regards
    Surendra

  • Problem with I/O field in module pool

    hi experts,
            I am displaying some text in I/O field in module pool screen. I am giving the attributes of I/O field as "output only" type and no input. Initially the input was not enabled for it, only it should be in display mode. Once i click on 'CHANGE' pushbutton then only the input should be enabled and it should be in change mode.will u tell me how to do it programatically.

    HI,
    In PAI of that screen..
    when the sy-ucom is 'Change' then use the Loop at screen--Endloop to modify the attributes value.
    example..
    LOOP AT screen
          CASE screen-name.
           WHEN 'Fieldname.
              screen-input = 0.
              screen-active = 0.
             MODIFY screen.
         ENDCASE.
    Edited by: avinash kodarapu on Dec 10, 2008 12:16 PM

  • Getting select options in module pool screen

    hi experts,
    can any one suggest me how to provide select options in module pool screen.
    thank you,
    regards
    vijay

    Hi,
    Take two fields on screen first for low value and other for high value (say vbeln_low and vbeln_high) also design a button next to the high textbox for select-option button used to display popup.
    Using these two input fields append a range (say r_vbeln for vbap-vbeln) for the field to be used (either in query or anywhere).
    ranges : r_vbeln for vbap-vbeln.
      IF NOT vbeln_high IS INITIAL.
        IF NOT vbeln_low LE vbeln_high.
          MESSAGE e899 WITH text-007. "high value is smaller than low value
        ENDIF.
      ENDIF.
      r_vbeln-sign = 'I'.
      r_vbeln-low = vbeln_low.
      IF vbeln_high IS INITIAL.
        r_vbeln-option = 'EQ'. "if user takes only a singlr value
      ELSE.
        r_vbeln-option = 'BT'. "if user takes both low & high value
        r_vbeln-high = vbeln_high.
      ENDIF.
      APPEND r_vbeln. "append range
      CLEAR r_vbeln.
    On the button click call this FM to call a popup for select-options.
    DATA : tab TYPE rstabfield.
    tab-tablename = 'VBAP'.
    tab-fieldname = 'VBELN'.
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
       EXPORTING
         title                   = text-002
         text                    = ' '
         signed                  = 'X'
    *         lower_case              = ' '
    *         no_interval_check       = ' '
    *         just_display            = ' '
    *         just_incl               = ' '
    *         excluded_options        =
    *         description             =
    *         help_field              =
    *         search_help             =
         tab_and_field           = tab
        TABLES
          range                   = r_vbeln
       EXCEPTIONS
         no_range_tab            = 1
         cancelled               = 2
         internal_error          = 3
         invalid_fieldname       = 4
         OTHERS                  = 5.
      IF sy-subrc EQ 2.
        MESSAGE s899 WITH text-003. "no value selected
      ELSEIF sy-subrc <> 0 AND sy-subrc <> 2.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    This whole code will append your range r_vbeln to be used in program.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Display Select option in module pool screen

    What are the Function modules used to display Select option type fields in a module pool screen?

    hi,
    You can use the SELECT-OPTIONS statement to place a group of fields on the screen that allows users
    to enter complex selections. The selection may be a single value, or any form of interval
    Selection ranges are stored in programs using an internal table.
    The ABAP statement SELECT-OPTIONS <selname> FOR <field> declares an internal table called
    <selname>, containing four fields - SIGN, OPTION, LOW, and HIGH. The fields LOW and HIGH have
    the same type as the field <field>.
    The SIGN field can take the value 'I' (for inclusive) or 'E' (for exclusive).
    The OPTION field can contain relational operators (EQ, NE, LE, LT, GE, GT), pattern operators (CP,NP), and operators that allow you to enter intervals (BT, NB).
    SELECTION-SCREEN BEGIN OF BLOCK conn WITH FRAME TITLE text-001.
    PARAMETERS pa_car LIKE wa_sflight-carrid OBLIGATORY.
    SELECT-OPTIONS: so_car FOR wa_sflight-carrid,
    SELECTION-SCREEN END OF BLOCK conn.
    Hope this helps, Do reward.

Maybe you are looking for

  • How to Implement a "Please wait......" animation

    Hi, Hoping someone can point me in the right direction in implementing a "Please wait......" ajax loading animation process that is then hidden on result set completion. I have a report where I would like to indicate to the user that the report is ru

  • The 'screensaver' effect - as a video

    As a screen saver on my iMac, I have set "Present slides in random order > Collage Style > Classic" The effect is of my photos as white-edged postcards falling, all in full color, onto the Desktop. I would like to use this exact effect as a video of

  • Problems with Nov PDK - omniportlet and samples

    Hiya, I have deployed the Novemeber PDK, OmniPortlet and WebClipping Portlets. I have done a manual installation inyo a 9iAS install. I have followed the instruction provided. The problem I have is that I'm not able to return the test page for these

  • Music played on itunes is static-y

    everytime i try to play a song in itunes, it comes out being static-y. but when i play other music like off a website, the music comes out clear...any ideas?

  • ITMS audiobook isn't listed under audiobooks

    I purchased episode 1 of Journey into Space Operation Luna from the iTunes Store. In iTunes it shows up under audiobooks. I then transfered the audiobook to my ipod. When viewing my iPod contents in iTunes, the book is listed under the audiobooks sec