Select-options in module pool programming

hi,
   I need to have four fields as part of my layout that are select-options fields with multiple values entry options. Since layout doesnt have 'select-options" functionality, i defined it from the module pool program, ie: I wrote a  selection screen in the PBO module. The problem is if i make any changes to the code, the layout changes back to the previuos format.
Is there any way in which i can combine selection-screen logic with my layout.
Thanks,
Sruthy

HI
GOOD
Selection Screen Version
Only for Executable Programs
If you do not specify a selection screen version, the system automatically creates a selection screen based on the selection criteria of the logical database and the parameters and select-options statements in the program.
If you want to use a different selection screen of the logical database, enter a number in this field. The number must be smaller than 1000 and correspond to an additional selection screen of the logical database. The possible values help displays a list of available selection screens. You can also look in the selection include of the logical database (program DBxxxSEL, where xxx is the name of the logical database).
Tomislav
1. In the top include define the selection screen with
selection-screen begin of screen 9250 as subscreen.
SELECT-OPTIONS analyt FOR ztv_cc02-zd_mumla .
selection-screen end of screen 9250.
2. Using the screen painter create a subscreen area in
the main screen where you want to have this.
3. Then, in the screen flow logic code as follows:
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000. etc
call subscreen SUB1 including 'PROGRAM NAME' '9250'.
PROCESS AFTER INPUT.
module exit at exit-command. etc.
call subscreen SUB1.
THANKS
MRUTYUN

Similar Messages

  • How to create select-options in module pool program

    Hi
    i am structed at this point could you please tell me
    how to create select-options in module pool program

    Steps to get SELECT-OPTIONS in module pool programs.
    <li>. Start one dialog program with SAPZ_TEST.
    <li>. Place the below code in the TOP include of the dialog program.
    PROGRAM SAPMZ_TEST.
    TABLES mara.
    SELECTION-SCREEN BEGIN OF SCREEN 2100 AS SUBSCREEN.
    SELECT-OPTIONS: matnr FOR mara-matnr.
    SELECTION-SCREEN END OF SCREEN 2100.
    <li>. Create one screen 2000 .
    <li>. Go to Layout of the screen and Define subscreen area on the screen and Name it as g_subscreen.
    <li>. Place the below code in the Flow logic of the screen.
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN g_subscreen INCLUDING 'SAPMZ_TEST' '2100'.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN g_subscreen.
    <li>. Activate all.
    <li>. Create Transaction code for the dialog program SAPZ_TEST.
    <li>. Execute the transaction code. You will see the select-option like we see on Selection-screen.
    I hope that it gets u clear idea.
    Thanks
    Venkat.O

  • How to provide select-option in module pool programming

    Hi all,
    How to provide select-option in module pool programming.
    If any body knows let me immediately.
    Thanks
    sudheer

    Hi Sudheer,
    Unfortunately there is no standard way of having a select-option in a module pool program.
    What you can try is having two fields and creating a range in your program and populating the range at runtime with respective value and trying to simulate some functionality of the select-option.
    Hope it helps.
    Thanks, Debasish

  • Select option in module pool program

    Hi,
    I have develop a module pool program. In one of the screen i need select option. so do any one have idea or approach for it.
    Thanks in advance.

    Hi,
    try the following code
    tables : mard.
    data : ok_code_100 type sy-ucomm.
    selection-screen begin of screen 1010 as subscreen.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_werks for mard-werks,
    s_lgort for mard-lgort.
    parameters : p_var like disvariant-variant.
    parameter: p_rb1 radiobutton group rd1 default 'X', " list
    p_rb2 radiobutton group rd1. " grid
    selection-screen end of block b1.
    selection-screen end of screen 1010.
    start-of-selection.
    CALL SCREEN 100.
    *& Module STATUS_0100 OUTPUT
    text
    module status_0100 output.
    set pf-status 'Z11_SUBMIT'.
    set titlebar 'CALL'.
    endmodule. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    module user_command_0100 input.
    case ok_code_100.
    when 'EXIT'.
    leave program.
    when 'SUBM'.
    submit z11_ap_alv_mat using
    selection-screen '1000'
    with s_plant in s_werks
    with s_stor in s_lgort
    with p_var = p_var
    with p_rb_01 = p_rb1
    with p_rb_02 = p_rb2
    and return.
    endcase.
    endmodule. " USER_COMMAND_0100 INPUT
    here u have to design a subscreen area SUB_1010 in the screen painter, there is a option given there for that.
    and also in the flow logic of screen 0100 you have to call the subscreen SUB_1010 both in PBO and PAI like :
    process before output.
    module status_0100.
    call subscreen sub_1010 including sy-repid '1010'.
    process after input.
    call subscreen sub_1010.
    module user_command_0100.
    reward if helpful

  • Problem in Select-option in Module Pool Programming

    Hi,
    I'm making one module pool programming. In that, I've to make select-option. For that I'm using this command --
    1) In PBO --
    CALL SUBSCREEN sub INCLUDING 'YBOE_PRINT' '5100'.
    2) In PAI --
    CALL SUBSCREEN sub.
    But, Syntax Error is generated as below --
    "." or "ID.........FIELD" expected after "SUBSCREEN"
    Please suggest.
    Thanks.
    Kumar Saurav.

    Hi Ramchander,
    Thanks for replying. But, even if I changed Prog_Name with term 'repid', that same error regarding
    "." or "ID ... FIELD ..." expected after "SUBSCREEN"
    is coming up.
    I guess, there is any step missing.
    Lemme describe what I'm doing in points --
    1) I declared SELECTION-SCREEN with screen no --
    SELECTION-SCREEN BEGIN OF SCREEN 5100 AS SUBSCREEN.
          PARAMETERS : p_bukrs TYPE ekko-bukrs OBLIGATORY DEFAULT '1000'.
          SELECT-OPTIONS: kunnr FOR kna1-kunnr.
          select-options: gjahr for bsid-gjahr.
          select-options: bank for bsed-bank.
          select-options: budat for bsid-budat.
          SELECTION-SCREEN END OF SCREEN 5100.
    2) Then I made a call in PBO as given above.
    3) Finally, a call to that subscreen is made in PAI - again as given above.
    When I checked that, this gave the error.
    Are you looking any erroneous step ...?
    Please guide.
    Thanks.
    Kumar Saurav.

  • Select option in module pool

    Hi friends,
    I have to create select options in module pool programming. Using subscreens i have created select option.
    But if i enter some value and if i press enter then the value is clearing automatically. I am not able to
    capture the values. Can any body help on this?
    Thanks a lot in advance.

    HI Ramesh,
    The data in table control will get refreshed automatically once action was performed. Capture the values by assigning them to the internal table in PAI. You can use the values stored in internal tables.
    Thanks,
    Ravi Kanth.

  • How to attach FCODE to select option in Module Pool

    Hi all,
          I have created Select option in Module pool by attaching a Subscreen. Now when user enters any value into the select option I need to fetch values from the database in to the table control based on the value entered in select option.
    Is it possible and how?
    Thanks.

    <b>Hi
    If u have one select options in module pool programming,Then there is no need for FCODE
    bcoz FCODE is needed for push button,check box..like etc.
    But select option is a input field.
    So u can trace the input as u have done in report
    Like
    select * from dtab1 into corresponding fields of table itab where field1 in <b>selectoption.</b>
    Or if u want that program to be executed after giving input in select option then user will press F8
    So Use FCODE 'F8'.
    Regs
    Manas Ranjan Panda
    Message was edited by:
            MANAS PANDA</b>
    Message was edited by:
            MANAS PANDA

  • 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

  • To create select option in module pool prograaming.

    I want to create Select-option in module pool programming like a report where i want to enter range in my dialog  screen.
    Can anybody suggest me...with coding
    thanks
    kumar n

    It is possible .
    you can do that using COMPLEX_SELECTIONS_DIALOG mentioned by me or
    using the Subscreen approach mentioned by Rich in the below thread..
    https://forums.sdn.sap.com/click.jspa?searchID=15000207&messageID=1501162

  • Select-option in Module Pool-Error-Include block not specified .........

    Hi,
    I am trying to define a select-option at Module Pool level.
    In the program
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECT-OPTIONS: V_BWTAR FOR MSEG-BWTAR.
    SELECTION-SCREEN END OF SCREEN 1010.
    In the Screen flow logic it is as follows
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0600.
    CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
    PROCESS AFTER INPUT.
    CALL SUBSCREEN sub_1010.
    MODULE USER_COMMAND_0600.
    At SE51 it is showing an error
    "Include block not specified,not defined or spelt incorrectly.".
    Please let me know how to correct this.
    Thanks,
    K.Kiran.

    HI Emre
    I am having the same issue.  there is not possible to create a subscreen by se51 since I already define the subscreen by selection-screen begin of screen *** as subscreen.
    regards TP

  • 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

  • Multiple Select option in Module pool

    Hi,
    I wanna add a field for 'Delivery number' in the screen of a mod pool prgm.I created a subscreen area in the main screen and did the coding needed.now the problem i am having is if i giv a single value in the from field or  values in the 'From' and 'To' field its not taken to the program,i saw it while debugging. but if i enter the values in the multiple selection option its taken to the program.That means from screen its not going to the program where as from the multiple select option its taken to the program,What may be the propblem.
    Regards in Advance,
    Nitin

    Hi,
    Have you used the select-options in the subscreen or you have placed the multiple option manually?
    Either way, please check the two methods, it may solve your problem.
    Create a SELECT-OPTIONS in module pool screen using two methods as shown.
    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.
    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.
    Regards

  • How can i decleare select-options in module pool table control?

    Hi everybody!!
    Can anyone tell me how can I decleare select-options in module pool table control screen?. I have declared it in a screen with a table control but a dump is triggered due to an error when generating the selection screen.
    Regards...

    My suggestion will be try to use fm
        call function 'FREE_SELECTIONS_DIALOG'
    Please search this forum you can find lot of threads related to this.

  • Select options in module pool

    Hi all,
    I have created a select options, for a screen field in a module pool.
    When the user enters more than one value in this field, the icon multiple selection options should turn green , as happens in selection screen field.
    Kindly help me regarding this.
    Regards
    Raj

    Check this thread - it explains same functionality with example in detail.
    selection option on module pool screen?

  • Select option in modul pool

    Hi All,
    I have a made a select option in module pool ike this .
    SELECTION-SCREEN  BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECTION-SCREEN  BEGIN OF BLOCK b1 with frame title text-001.
    selection-screen  begin of line.
    SELECT-OPTIONS     so_time1 FOR syst-timlo.
    SELECTION-SCREEN COMMENT 1(20) text-022 FOR FIELD pa_thrh.
    parameters: pa_thrh like G_THRSH.
    SELECT-OPTIONS     so_time2 FOR syst-timlo.
    selection-screen   end of line.
    SELECTION-SCREEN   END OF BLOCK b1.
    SELECTION-SCREEN   END OF SCREEN 200.
    I need the pa_thrh field just parallel to the so_time1 but when i tried i am getting a error like error in generating the screen?
    Can any advice how to place the fileds side by side in module pool select options?
    Tnx,
    Joe

    Hi,
    In your code the problem is with the
    SELECTION-SCREEN COMMENT 10(20) text-022 FOR FIELD pa_thrh.
    try by changing the position of pa_thrh.
    I mean,
    SELECTION-SCREEN COMMENT 52(20) text-022 FOR FIELD pa_thrh.
    Note:
    If You add 'SELECTION-SCREEN COMMENT' statement also to so_time1 then you have to change position according to size and position. suppose you declare as like this,
    SELECTION-SCREEN COMMENT 2(10) text-022 FOR FIELD so_time1.
    then add 12 positions to pa_thrh field.
    SELECTION-SCREEN COMMENT 64(20) text-022 FOR FIELD pa_thrh
    but at this point , You have no choice to use another field i.e, so_time2 because it crosses the line .
    for more information refer this sap help,
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba7e235c111d1829f0000e829fbfe/content.htm
    hope this resolves Your issue.
    Regards,
    Raghava Channooru

Maybe you are looking for

  • XMl Export not working as it should...

    Hi there guys Have been owrking on this concert for the last 4 days. 4 Seperate Color Projects 3 have an average of 600 clips and the last one has around 1200. There are also 3 dissolves on the last sequence. All were created in Color by using the Se

  • Disable WLAN when LAN connected - how do I do?

    Hi, We are in the process of migrating from HP notebooks to Lenovo. We used to set a BIOS setting called "LAN/WLAN Switch" in the HP notebooks, which makes the WLAN to disable when the LAN cable is plugged in or the pc is docked Where do I find a sim

  • HTML quirks doctype

    Hi All, As far as I know, WebLogic Portal 8.1 has "standards compliance" Look and Feels out-of-the-box. And WebLogic Portal 9.2 has "legacy" Look and Feel, which renders HTML in "quirks" mode. And we have problems with that, because HTML content of o

  • How to upload Apex-application in this forum

    i want a help. i develop a apex-applicatin . by use apex-4.2. now i want to upload my app: in this forum. how to i do it? plz give me suggest.

  • PS Elements 12 - Serial key not accepted on MacOSX, running internet access not recognized by PSE 12

    Hi, I just bought a full version of PSE 12 for Mac OSX. The given serial number will not be accepted as valid, why ? - I tried it many times ! - Even the workaround trying to install the 30 days trail could not done because the internet access could