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

Similar Messages

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

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

  • 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

  • How to make select option in module pool

    Hello,
    Can anybody tell me how to create a select option in module pool screen..?
    thanks

    Easiest way is to create a subscreen and embed this in your dynpro.
    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.
    * 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.
    Regards,
    Rich Heilman

  • How to create a ListBox in module pool program in 3.1i system ?

    Hi All,
    How to create a ListBox of type module pool program in 3.1i system ?
    when i tried creating, the listbox option is disabled.
    Thanks in advance.
    Edited by: gulab zehra on Aug 20, 2009 1:26 PM

    Hi,
    please go through this...
    LIST BOX                    
          Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
          In screen painter to create a input/output field into list box we use  'L" as a value for dropdown attribute for the i/o field.  In screen painter to determine the type of method that will be used to fill the value list we use the attribute value list. If it is blank, the value list will be filled by the first column of the input help assigned to the screen field. This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system. SAP recommends value list field should be blank.
    or
    The value  can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field. If a function code is attached to the list box the selection of a value triggers a PAI otherwise PAI will not trigger.  LIST BOX in SELECTION SCREEN
        List Box is created in selection screen using PARAMETERS statement with
    AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox) can be specified with the declaration. PARAMETERS name AS LISTBOX VISIBLE LENGTH n.
       The function module VRM_SET_VALUES is used to fill the value list associated with a List Box .This FM uses types which are declared in type group VRM. So we should declare TYPE-POOLS VRM before using this FM.
    Some important types declared in the VRM type group are
    VRM_ID
       It refers to the name of the input/output field associated with list box
    VRM_VALUES
      It refers to the internal table consisting of two fields TEXT(80C) and KEY(40)C
    that will be used to create the list values.
    CALL FUNCTION  'VRM_SET_VALUES'
      EXPORTING
          ID                  = name of screen element, it is of TYPE VRM_ID
          VALUES      = internal table containing values, of TYPE VRM_VALUES
    Thanks
    Ashu Singh

  • 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

  • How to create Long Text in Module Pool Program

    Hi all,
    I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
    Thanks & Regards
    Nirmal

    Hai ,
    here you have to use custom control, for this
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    1)  Create custom control in your screen
    2)   CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',   "--> (this is custom control name in screen)
                       editor    EXPORTING parent = container.
    3)  CALL METHOD editor->get_text_as_stream  "This method reads data from custom control , inserts into itab 'text_tab' 
             IMPORTING       
              text = text_tab.                                       "
          READ TABLE text_tab  INTO line INDEX 1. read the text into wa 'line'
    if you want more clarity , see  'ABAPDOCU' >ABAP USER DIALOGS>    COMPLEXSCREEN ELEMENTS-->  DEMO CUSTOM_CONTROL

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

  • Create Select-Options in Modul-Pool

    Hi, i need to create a TabStrip Control, and the first tab needs a select-options.
    Is there any way to build it?
    Thanks.

    Try using this....
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
    SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
    NO INTERVALS.
    SELECT-OPTIONS SEL1 FOR SY-SUBRC.
    PARAMETERS PAR1 LIKE SPFLI-CARRID.
    SELECTION-SCREEN COMMENT /10(20) TEXT-COM.
    SELECTION-SCREEN END OF BLOCK BL1.
    SELECTION-SCREEN END OF SCREEN 123.
    CALL SELECTION-SCREEN 123 .
    Regards,
    Hemant.

  • How to create dynamic screen using module pool programming

    Hi,
    Could anybody help me how to create dynamic screens?
    I am developing a screen with HR Person with assignment info. If PERNR have multiple assignments, i need to show all the details one by one. How to show the details on screen. I need to call one by one assignment information dynamically.
    Please suggest me how to do, apart from using table controls.
    Thanks,
    Kamal

    You may have the below options:
    1) Table Control
    2) Individual fields
    3) ALV
    4) pop-up screen

  • 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

Maybe you are looking for

  • Get error while invoking a page with "create"

    I get this error while invoking a page with "create". Also please any one tell me where is the log file is place to see the full story. ]] Root cause of ServletException. javax.el.PropertyNotFoundException: Target Unreachable, 'Comments' returned nul

  • Ipod Won't Connect To Computer Or Turn Off

    I connected my ipod to my mac and the ipod screen turned to the usual do not connect. But the iPod icon did not show up on the desktop or iTunes menu. I unconnected my iPod and tried to turn it off but it won't. It continued to show the do not discon

  • Itunes wont recognize my ipod when connected..what is the deal?

    why wont itunes recognize my ipod touch...

  • Flash 10 won't install on IE but will on FireFox

    This is the oddest thing. I can get Flash 10 to install in FireFox, but not with IE. When I download it, and try to install outside of a browser, I get a 'failed to register' message. It seems I cannot get anything on IE past Flash 7 to install. Runn

  • HT4007 Using Aperture 3 on more than one home computer

    My family has 5 Apple computers in use around the house - if I buy Aperture 3 as a download can it be used on all of them at no further cost? Is there a different key code that has to be entered each time? How does it work?