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).

Similar Messages

  • 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.

  • 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

  • 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 create the select option for the Plant in screen (Module pool)

    HI,
    I am developing one module pool program and I have below requirement,
    currently plant is acting like PARAMETER and the now it should be changed to select option.
    how to create the select option in the screen
    Thanks and regarding,
    Malla
    Moderator message - Cross post locked
    Edited by: Rob Burbank on Dec 16, 2009 1:41 PM

    Steps to get SELECT-OPTIONS in module pool programs.
    1.Start one dialog program with SAPMZ_001.
    Place the below code in the TOP include of the dialog program.
    TABLES marc.
    SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
    SELECT-OPTIONS: werks FOR marc-werks.
    SELECTION-SCREEN END OF SCREEN 3200. 
    2 .Create one screen 3000.
    Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
    Place the below code in the Flow logic of the screen.
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN l_subscreen.
    Activate all.
    Create Transaction code for the dialog program .
    Execute the transaction code. You will see the select-option for werks how we see on Selection-screen.

  • 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.

  • Problem in creating dynamic select-options creating from ';' seperated file

    Hi all,
    My requriement is selection screen fields will come from a flat file like below(first row is field names and remaining r field values)
    For example for VBAK table
    VBELN;VKORG;VTWEG;SPART
    3999202;B227;BD;XX
    file can be vary(number of fields)  and based on table .
    Please let me know how can i convert this file in to the selection-screen fields and how can i pass these values in the select statement WHERE condition....
    Thank you very much,
    Krishna D

    Hi,
    First Split the Data using Field Symbold.Because you don't know how many fields are there in the text file.
    Pass the values to the below Syntax
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
    declares a node <node> of a logical database for dynamic selections in the selection include.
    You have an Example in the Below Link.
    http://help.sap.com/SAPhelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/content.htm
    Thanks,
    Venkat.
    Edited by: Venkatesh Kolluru on Mar 4, 2011 6:32 AM
    Edited by: Venkatesh Kolluru on Mar 4, 2011 6:32 AM

  • 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

  • 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

  • Create a select option in a screen

    Is it possible to create a select option in a screen?
    I can easily create the 2 input boxes, but not with the little button on the right like when we create a select option in a report.
    Is the any other simple way to create a select option without creating a report? (the reason is because I want to have everything in the same module pool)

    Hi,
    Please refer to SAP's documentation here: http://help.sap.com/saphelp_nw70/helpdata/en/e4/2adbec449911d1949c0000e8353423/frameset.htm.
    Especially Part 'Subscreens and Tabstrips for Selection Screens', there go to 'Selection Screens as Subscreens'.
    HTH, Gerd Rother

  • How to create the select option in the screen

    HI,
    I am developing one module pool program and I have below requirement,
    currently plant is acting like PARAMETER and the now it should be changed to select option.
    how to create the select option in the screen
    Thanks and regarding,
    Malla
    Moderator message - Please search before asking - post locked
    Edited by: Rob Burbank on Dec 16, 2009 1:41 PM

    Try RANGES.
    The RANGES has same structure as that of select-options.

  • Creating a Select-option with no-intervals and a parameter on a single line

    Hi
    I have a unusual reqirment of creating a select-option with no intervals obligatory and a parameter on a single line. Is this possible? Can any one please provide me a solution for this. I reffered to the SAP help and what i found out is a single line can contain only parameters.

    Hi,
    humm,
    I guess it's not possible on one line.
    SORRY I've tried and it works!
    Try this :
    SELECTION-SCREEN BEGIN OF BLOCK main WITH FRAME
                     TITLE text-s01 NO INTERVALS.
    SELECTION-SCREEN begin of line.
    PARAMETERS : p_gjahr LIKE bkpf-gjahr OBLIGATORY MEMORY ID gjr.
    SELECT-OPTIONS : s_blart FOR bkpf-blart MODIF ID knt .
    SELECTION-SCREEN end of line.
    SELECTION-SCREEN END OF BLOCK main.
    Regards,
    erwan

  • How to create a selection option or parameters in a subarea of the screen

    Hi Experts,
        My program have a screen 1001 and it is splited into two parts: the first is a Subarea for selection option, and the last is a table control. Now I want to create some selection option and parameters in the first subarea just like we do in screen 1000. Do we have any convenient way to do that?
    Thanks in advance
    Joe

    Hi Joe,
    Yes ,it can be done like below code:
    TABLES : mara.
    SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    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 1001.
    DATA: number(4) TYPE n VALUE '1001'.
    START-OF-SELECTION.
      CALL SCREEN 100.
    in screen flow logic .write below statements.
    first declare the subscreen area  'AREA' in screen.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    CALL SUBSCREEN area INCLUDING sy-repid number.
    PROCESS AFTER INPUT.
    CALL SUBSCREEN area.
    MODULE USER_COMMAND_0100.
    Reward if useful,
    Regards,
    Talwinder

Maybe you are looking for