Select-option on subscreen for Module pool

Hi all,
I need to add some elements on standard screen of a standard transaction. Everything works fine, but the problem starts when I want to add select-option. It is displayed, but when I press on Multiple selection button no action occurs, no window appears...I simplified the case and created test program with test screen and also I get the same behaviour. Anyone had similiar problem?
Thnak you in advance for help,
Anna

I donot know how u have created the select-option. but u can try these 2 methods to create it. And I have checked that both of them work fine.
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.
Regards,
Joy.

Similar Messages

  • How to write select options with extension in module pool program

    hi,
    M having  the following fields through screen painter.
    1. sales offfice
    2.sales district
    3.customer no
    for those three fields no extension is not provided and no search help is there.
    i want write  seletion options to get extension in that module pool
    screen.
    plese send coding for me , please let me know how to get that
    select options with the above all three fields.
    Thanks & Regards
    Raji

    Check it
    In top include
    DATA: number(4) TYPE n VALUE '9005',
    PROCESS BEFORE OUTPUT.
      MODULE status_9001.
      CALL SUBSCREEN AREA1 INCLUDING SY-REPID number.
    PROCESS AFTER INPUT.
      MODULE user_command_9001.
      CALL SUBSCREEN AREA1.
    *&      Module  status_9001  OUTPUT
          text
    MODULE status_9001 OUTPUT.
      SELECTION-SCREEN BEGIN OF SCREEN 9005 AS SUBSCREEN.
      PARAMETER pa_bukrs TYPE t001-bukrs.
      select-options matnr for wa_matnr.
      SELECTION-SCREEN END OF SCREEN 9005.
    ENDMODULE.                 " status_9001  OUTPUT

  • Selection screen as subscreen in module pool main screen

    hello
    i having problem with a module pool  and a selection screen subscreen , i have my main screen 100 in my module pool
    i create a sub screen area , then in my top include i define a seleccion screen as subscreen  150
    i define some paramets and select-options ( for the select-options feature is because i choose use the subscreen )
    so far here is OK , the problem is when i fill the subscreen data and press a pushbutton define in the main screen ( 100 )
    the field are getting cleared ( BTW i call the subscreen in the PBO of the main screen ( 100 ) using call SUBSCREEN SUB_AREA INCLUDING SY-REPID '150'. ) so my question is how i can do for save the data filled in the subscreen ?
    thanks

    i find the solution of my own question:
    in the first line of the PAI event of the main screen ( where you call the subscreen ) need add 'call subscreen SUB_AREA_NAME_HERE.

  • How to get select-options type fields in module programming

    i need to get ranges type of fields ( like we use select-options in reports) in module prgrming..im only gettin single entry field (like we use in paramenters)...how to get it like this
    field1  ___  to  ___    ->
    field2  ___  to  ___    ->
    Thanx,
    Naveen Vishal

    Hi,
    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.

  • Hi i need material for module pool and alv's.

    hi
      i need material for module pool and ALV's(not object oriented) if any one have pls do send that to my
    ID [email protected]
    thanx in advance.

    Hi
    Check the below link:
    http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    You can also check the transaction ABAPDOCU which gives you lot of sample programs.
    Also you can see the below examples...
    Go to se38 and give demodynpro and press F4.
    YOu will get a list of demo module pool programs.
    One more T-Code is ABAPDOCU.
    YOu can find more examples there.
    See the prgrams:
    DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
    DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    ALV
    ABAP List Viewer
    The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
    This helps us to implement all the features mentioned very effectively.
    Using ALV, We can have three types of reports:
    1. Simple Report
    2. Block Report
    3. Hierarchical Sequential Report
    There are some function modules which will enable to produce the above reports without much effort.
    All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
    1. SIMPLE REPORT.
    The important function modules are
    a. Reuse_alv_list_display
    b. Reuse_alv_fieldcatalog_merge
    c. Reuse_alv_events_get
    d. Reuse_alv_commentary_write
    e. Reuse_alv_grid_display
    A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
    The important parameters are :
    I. Export :
    i. I_callback_program : report id
    ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
    iii. I_callback_user_command : routine where the function codes are handled
    iv. I_structure name : name of the dictionary table
    v. Is_layout : structure to set the layout of the report
    vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
    vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
    II. Tables :
    i. t_outtab : internal table with the data to be output
    B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
    The Important Parameters are :
    I. Export :
    i. I_program_name : report id
    ii. I_internal_tabname : the internal output table
    iii. I_inclname : include or the report name where all the dynamic forms are handled.
    II Changing
    ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
    declared in the type pool SLIS.
    C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
    Parameters :
    I. Import :
    Et_Events : The event table is returned with all possible CALLBACK events
    for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
    II. Export :
    I_List_type :
    0 = simple list REUSE_ALV_LIST_DISPLAY
    1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
    2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
    3 = hierarchical-sequential block list
    REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
    Parameters :
    I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
    This internal table has three fields :
    Typ : ‘H’ – header, ‘S’ – selection , ‘A’ - action
    Key : only when typ is ‘S’.
    Info : the text to be printed
    E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
    Parameters : same as reuse_alv_list_display
    This is an example for simple list.
    2. BLOCK REPORT
    This is used to have multiple lists continuously.
    The important functions used in this report are:
    A. REUSE_ALV_BLOCK_LIST_INIT
    B. REUSE_ALV_BLOCK_LIST_APPEND
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    A. REUSE_ALV_BLOCK_LIST_INIT
    Parameters:
    I. I_CALLBACK_PROGRAM
    II. I_CALLBACK_PF_STATUS_SET
    III. I_CALLBACK_USER_COMMAND
    This function module is used to set the default gui status etc.
    B. REUSE_ALV_BLOCK_LIST_APPEND
    Parameters :
    Export :
    I. is_layout : layout settings for block
    II. it_fieldcat : field catalog
    III. i_tabname : internal table name with output data
    IV. it_events : internal table with all possible events
    Tables :
    i. t_outtab : internal table with output data.
    This function module adds the data to the block.
    Repeat this function for all the different blocks to be displayed one after the other.
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    This function module is used for hierarchical sequential blocks.
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    Parameters : All the parameters are optional.
    This function module display the list with data appended by the above function.
    Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
    3. Hierarchical reports :
    Hierarchical sequential list output.
    The function module is
    A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
    Parameters:
    I. Export:
    i. I_CALLBACK_PROGRAM
    ii. I_CALLBACK_PF_STATUS_SET
    iii. I_CALLBACK_USER_COMMAND
    iv. IS_LAYOUT
    v. IT_FIELDCAT
    vi. IT_EVENTS
    vii. i_tabname_header : Name of the internal table in the program containing the
    output data of the highest hierarchy level.
    viii. i_tabname_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    ix. is_keyinfo : This structure contains the header and item table field
    names which link the two tables (shared key).
    II. Tables
    i. t_outtab_header : Header table with data to be output
    ii. t_outtab_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.
    Important Attributes :
    A. col_pos : position of the column
    B. fieldname : internal fieldname
    C. tabname : internal table name
    D. ref_fieldname : fieldname (dictionary)
    E. ref_tabname : table (dictionary)
    F. key(1) : column with key-color
    G. icon(1) : icon
    H. symbol(1) : symbol
    I. checkbox(1) : checkbox
    J. just(1) : (R)ight (L)eft (C)ent.
    K. do_sum(1) : sum up
    L. no_out(1) : (O)blig.(X)no out
    M. outputlen : output length
    N. seltext_l : long key word
    O. seltext_m : middle key word
    P. seltext_s : short key word
    Q. reptext_ddic : heading (ddic)
    R. ddictxt(1) : (S)hort (M)iddle (L)ong
    S. datatype : datatype
    T. hotspot(1) : hotspot
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Reward points if useful
    Regards
    Anji

  • Select options passed to function module

    Hey
    I would like to know how r the select-options of a program passed to the function module that is called internally in that program? I want to use this select-options in the function module to fetch frm the database tables?
    Shakr

    Hi,
    Use ranges in function modules. You can declare in import/export/ changing or tables parameters
    Example of ranges:
    ERDAT_RAN
    ERDAT_RAN
    SHP_R_ERZET
    RVBELN
    ERNAM_RAN
    Please see them in se11.
    Pass the select options in the report to these ranges or use below coding:
    DATA: wa_cmfre     LIKE     erdat_ran,
          wa_erdat     LIKE     erdat_ran,
          wa_erzet     LIKE     shp_r_erzet,
          wa_vbeln     LIKE     rvbeln,
          wa_ernam     LIKE     ernam_ran.
    SELECT-OPTIONS: s_erdat FOR vbak-erdat,                  s_erzet FOR vbak-erzet NO-EXTENSION,  
    s_cmfre FOR vbak-cmfre OBLIGATORY ,
    s_vbeln FOR vbak-vbeln NO-EXTENSION,         
    s_auart FOR vbak-auart OBLIGATORY,                           s_bsark FOR vbak-bsark.
      wa_cmfre-sign    = s_cmfre-sign.
      wa_cmfre-option  = s_cmfre-option.
      wa_cmfre-low     = s_cmfre-low.
      wa_cmfre-high    = s_cmfre-high.
      IF NOT s_erdat[] IS INITIAL.
        wa_erdat-sign   =  s_erdat-sign.
        wa_erdat-option =  s_erdat-option.
        wa_erdat-low    =  s_erdat-low.
        wa_erdat-high   =  s_erdat-high.
      ENDIF.
      IF NOT s_erzet[] IS INITIAL.
        wa_erzet-sign   =  s_erzet-sign.
        wa_erzet-option =  s_erzet-option.
        wa_erzet-low    =  s_erzet-low.
        wa_erzet-high   =  s_erzet-high.
      ENDIF.
      IF NOT s_vbeln[] IS INITIAL.
        wa_vbeln-sign   =  s_vbeln-sign.
        wa_vbeln-option =  s_vbeln-option.
        wa_vbeln-low    =  s_vbeln-low.
        wa_vbeln-high   =  s_vbeln-high.
      ENDIF.
      IF NOT s_ernam[] IS INITIAL.
        wa_ernam-sign   =  s_ernam-sign.
        wa_ernam-option =  s_ernam-option.
        wa_ernam-low    =  s_ernam-low.
        wa_ernam-high   =  s_ernam-high.
      ENDIF.
    you can pass these work areas to function module.
    Thanks,
    Shravan G.

  • How to pass select-option filed to Function Module Exporting Parameter

    Hi,
        How to pass select-option filed to Function Module Exporting Parameter.
    Thanks

    Hi,
    DATA: BEGIN OF ITAB5_WRK OCCURS 0,
            KUNNR     TYPE KNKK-KUNNR,  "CUSTOMER #
            SBGRP     TYPE KNKK-SBGRP,  "CREDIT REP
            KLIMK     TYPE KNKK-KLIMK,  "CREDIT LIMIT
            NAME1     TYPE KNA1-NAME1,  "CUSTOMER NAME
            SKFOR     TYPE KNKK-SKFOR,  "TOTAL A/R
            AMT1      TYPE KNKK-SKFOR,  "CURRENT
            AMT2      TYPE KNKK-SKFOR,                          "01-30
            AMT3      TYPE KNKK-SKFOR,                          "31-60
            AMT4      TYPE KNKK-SKFOR,                          "61-90
            AMT5      TYPE KNKK-SKFOR,                          "91-120
            AMT6      TYPE KNKK-SKFOR,                          "OVR 120
            BZIRK     TYPE KNVV-BZIRK,
          END OF ITAB5_WRK.
    SELECT-OPTIONS P_COMP     FOR  T001-BUKRS
      SELECT KUNNR SBGRP  FROM KNKK
             INTO TABLE ITAB5_WRK
             WHERE SBGRP IN P_REP
               AND KUNNR GE '0001000000'
               AND SKFOR NE 0.
      LOOP AT ITAB5_WRK.
        DELETE ADJACENT DUPLICATES FROM ITAB5_WRK COMPARING KUNNR.
      ENDLOOP.
      PERFORM GET_CREDIT_LIMITS.
    *=======================================================================
      IF P_DIST NE SPACE.
        LOOP AT ITAB5_WRK.
          SELECT SINGLE * FROM KNVV WHERE KUNNR EQ ITAB5_WRK-KUNNR
                                      AND VKORG EQ P_COMP
                                      AND VTWEG EQ '20'
                                      AND SPART EQ '10'
                                      AND BZIRK IN P_DIST.
          IF SY-SUBRC EQ 0.
            MOVE KNVV-BZIRK TO ITAB5_WRK-BZIRK.
            MODIFY ITAB5_WRK.
          ELSE.
            DELETE ITAB5_WRK.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *==============================================================
      LOOP AT ITAB5_WRK.
        MOVE: 'F/S'            TO WRK-KKBER,
               ITAB5_WRK-KUNNR TO WRK-KUNNR.
        PERFORM AGING.
        ADD: W_SNFAE  TO ITAB5_WRK-AMT1,
             W_SFAE1  TO ITAB5_WRK-AMT2,
             W_SFAE2  TO ITAB5_WRK-AMT3,
             W_SFAE3  TO ITAB5_WRK-AMT4,
             W_SFAE4  TO ITAB5_WRK-AMT5,
             W_SFAE5  TO ITAB5_WRK-AMT6,
             W_SFAEL  TO ITAB5_WRK-SKFOR,
             W_SNFAE  TO ITAB5_WRK-SKFOR.
        MOVE: 'SPEC'            TO WRK-KKBER,
               ITAB5_WRK-KUNNR TO WRK-KUNNR.
        *PERFORM AGING.*
        ADD: W_SNFAE  TO ITAB5_WRK-AMT1,
             W_SFAE1  TO ITAB5_WRK-AMT2,
             W_SFAE2  TO ITAB5_WRK-AMT3,
             W_SFAE3  TO ITAB5_WRK-AMT4,
             W_SFAE4  TO ITAB5_WRK-AMT5,
             W_SFAE5  TO ITAB5_WRK-AMT6,
             W_SFAEL  TO ITAB5_WRK-SKFOR,
             W_SNFAE  TO ITAB5_WRK-SKFOR.
        MODIFY ITAB5_WRK.
      ENDLOOP.
    FORM AGING.
      *CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'* 
      EXPORTING
          BUKRS             = P_COMP           
          KKBER             = WRK-KKBER
          KUNNR             = WRK-KUNNR
          RASID             = 'FEND'
          KLIMP             = 'X'
        IMPORTING
          SFAE1             = W_SFAE1
          SFAE2             = W_SFAE2
          SFAE3             = W_SFAE3
          SFAE4             = W_SFAE4
          SFAE5             = W_SFAE5
          SFAE6             = W_SFAE6
          SFAEL             = W_SFAEL
          SNFA1             = W_SNFA1
          SNFA2             = W_SNFA2
          SNFA3             = W_SNFA3
          SNFA4             = W_SNFA4
          SNFA5             = W_SNFA5
          SNFA6             = W_SNFA6
          SNFAE             = W_SNFAE
        EXCEPTIONS
          NO-AGING_SCHEDULE = 1
          NO_TABLE_INPUT    = 2.
      CASE SY-SUBRC.
        WHEN 1.
          MESSAGE E999 WITH 'PLEASE ENTER AGING SCHEDULE'.
        WHEN 2.
          MESSAGE E999 WITH 'DO NOTHING ??'.
      ENDCASE.
    ENDFORM.                    "AGING
    Thanks

  • How to hide subscreen in module pool

    hello expert.
    i created one Box, and inside box i created one subscreen in Module pool ->layout.and  two radio button out side of the Box.
    if i select 2nd radio button , want to hide subscreen.
    how to hide subscreen. could you please send me the solution asap , it's urgent.
    i written below code but not working.
    LOOP AT SCREEN.
      IF rad2 Eq  'X'
         IF SCREEN-NAME = 'SUB1' .
                SCREEN-INPUT  = 0.
                SCREEN-INVISIBLE = 1.
                MODIFY SCREEN.
         ENDIF.
      ENDIF.
    ENDLOOP.
    Regards
    srinivas

    example:
      BOX1
            MATNR [                          ]  (Normal screen)
      BOX2
            BOM  [ BOM-OW]  TO [BOM-HIGH] (subscreen)
    BOX3
           radio buttons
           push button
           selection screnn etc..
    if i selection 2nd radio button i will get.
      BOX1
            MATNR [                          ]  (Normal screen)
      BOX2
            empty
    BOX3
           radio buttons
           push button
           selection screnn etc..
    my requirement is:
    BOX1
            MATNR [                          ]  (Normal screen)
    BOX3
           radio buttons
           push button
           selection screnn etc..

  • 'Save As Variant' for Module Pool Program - FM to be called?

    I have a dialog program, i want to activate the 'Save As variant' when i click on save on the selection screen of the transaction i created for the dialog program. What funtionality should be called or written for the PF-STATUS to implement the functionality.

    hi Dagny,
      You can't have variants for module pool. It is possible only for selection screen.
    You have following alternatives :-
    1. Create a report with same selection screen as you have now in module pool.
    And then make a call screen to your intial module pool.
    In this way you can all the advantage of variants as well as module pool.
    OR
    2. Create a transaction variant using transaction SHDO.
    Hope it is helpful.
    and do search the form , it is already answered before.
    regards
    venkat

  • Variants for module pool screena

    Hi,
    I tried creating a variant for module pool screen by using the FM : RS_CREATE_VARIANT.
    For this i created a dummy report which has the same parameters as the fields in the screen.
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
            EXPORTING
              report                      = gc_dummy_rep
              variant                     = 'variant5'
            MOVE_OR_WRITE               = 'W'
            NO_IMPORT                   = ' '
            EXECUTE_DIRECT              = ' '
          IMPORTING
            SP                          =
            tables
            L_PARAMS                    =
            L_PARAMS_NONV               =
            L_SELOP                     =
            L_SELOP_NONV                =
              valutab                     = lt_params
            OBJECTS                     =
            FREE_SELECTIONS_DESC        =
            FREE_SELECTIONS_VALUE       =
          EXCEPTIONS
            VARIANT_NON_EXISTENT        = 1
            VARIANT_OBSOLETE            = 2
            OTHERS                      = 3
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    but when i try to retrieve the values stored in the variant using FM : RS_VARIANT_CONTENTS.
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
            EXPORTING
              report                      = gc_dummy_rep
              variant                     = 'variant5'
            MOVE_OR_WRITE               = 'W'
            NO_IMPORT                   = ' '
            EXECUTE_DIRECT              = ' '
          IMPORTING
            SP                          =
            tables
            L_PARAMS                    =
            L_PARAMS_NONV               =
            L_SELOP                     =
            L_SELOP_NONV                =
              valutab                     = lt_params
            OBJECTS                     =
            FREE_SELECTIONS_DESC        =
            FREE_SELECTIONS_VALUE       =
          EXCEPTIONS
            VARIANT_NON_EXISTENT        = 1
            VARIANT_OBSOLETE            = 2
            OTHERS                      = 3
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    I get an error message : variant5 not found.
    is there anything that i miss here?
    or is the way i use to create variant for module pool screen not right?
    Regards,
    Kamini

    Hi,
    To avail save variant option in module pool screen,
    1. You need to create a data base table similar to INDX table with the fields RELID, VARI_NAME
    PROG_NAME
    UNAME
    SRTF2, MEMORYID, CLUSTR,  CLUSID. And the remaining fields can be anything.
    2. Enable the Save button in the Function keys part of GUI Status. And Add a push button for Get variant.
    3. When Save button clicked call a screen with a single field for variant (let us say g_var). After g_var entered, in the PAI of the initial screen export all the screen values to the created database index using the statement .
                         EXPORT: g_characteristics_tab TO DATABASE zav0257(ch) ID g_var,
                                       s_auart TO DATABASE zav0257(au) ID g_var.
                         So that the values will be exported to database.
                         Then update the fields(VARI_NAME,PROG_NAME,UNAME) of  the database table using modify from work area. 
                         So that you will have the history of variance existence.
    4. Next time , when the user clicks on Get Variant option, call another screen to enter the variant name. Then import the values for that variant from the memory id in the database table.
    It worked for me.

  • Reg : Variant saving for Module Pool Programming

    Hey Friends,
       Plz help me in how to create variant for Module Pool Programming as in normal reports.Thanx in advance.

    Hi,
    You can create variants for Module pool program using the transaction SHD0. You can create Screen variants for your screens using this Tcode.
    Go to SHD0 -> Give the Transaction code(ZTRAN) for which you want to create a variant -> name of some variant (ZVAR) -> create -> takes you to your transaction -> Give the values that you want to be displayed as variants -> Click on Save -> Opens a pop up to confirm the screen entries -> Check the check boxes of those fields that you have entered the data with (the column with check boxes that says W.Content) -> Exit and Save -> Save the variant -> You can see a screen variant created (ZVAR_0100)
    Now Goto -> Create variant transaction -> Give your transaction variant name (ZVAR) -> Select Transaction with variant -> Takes you to SE93 transaction -> Give the transaction variant name  -> save. Run with the created transaction.
    Edited by: Nitwick on Jul 27, 2009 4:49 PM

  • Send me one link for module pool programming !

    Send me the link Where i can get the screen shots step by step to create a simple module pool programming !

    hi,
    pls Go through this link for module pool programming
    http://www.allsaplinks.com/dialog_programming.html
    http://sap.mis.cmich.edu/sap-abap/abap09/
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://sap.mis.cmich.edu/abap-00/
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://help.sap.com
    http://www.sapgenie.com/abap/example_code.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://www.allsaplinks.com/dialog_programming.html
    http://www.sapbrain.com/TUTORIALS/default.html
    http://www.sappoint.com/abap/spmp.pdf
    http://sappoint.com/abap.html
    http://www.sap-img.com/abap.htm
    http://sap.ittoolbox.com/code/archives.asp?i=10&t=450&a=t
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/abap/
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://www.sappoint.com/faq/faqdiapr.pdf
    http://www.allsaplinks.com/dialog_programming.html
    Reward Points if usefull
    Regards
    Fareedas

  • OO ABAP is a must or not for Module Pool

    Hi all,
      I want a valuable suggetion from you.
    Is Object Oriented ABAP Programming is a must for Module Pool Programmer not. Because, I think I am preti much confident abt Module Pool but not in OO ABAP.
    Please help me out my doubt.
    Thanks & Regards,
    Ajoy Chatterjee

    Sorry, can't agree that they are obsolete... I've done dozens of dialog programs over the last few years, with more on the current "to do" list...  it depends on what you client site are doing - if they want online data entry transactions inside the SAPGui, then that's what you build.
    As you can't have screens in a class pool, so you're going to need to define these dynpros somewhere else (although my usual preference is having them within function groups rather than module pools).
    But I do agree that getting your head around ABAP OO is unavoidable - and can add a level of elegance to your code if implemented well, and add a level of future-proofing when it comes time to change your presentation layer to Web Dynpro or whatever, or exposing some logic via web services. 
    However you can stil make "classic" ABAP elegant - there's little difference between the readability of :
    call method z_my_class=>get_region_of_rental_object
      exporting
        io_contract = ls_contract
      importing
        rd_region   = l_region
        os_return   = ls_return
      exceptions
        others      = 1.
    and
    call function 'Z_GET_REGION_OF_RENTAL_OBJECT'
      exporting
        io_contract = ls_contract
      importing
        rd_region   = l_region
        os_return   = ls_return
      exceptions
        others      = 1.
    i.e. it's often the way you modularise and encapsulate your logic that is the most important step.
    Jonathan
    p.s. perhaps this should head off to the Coffee Corner...!

  • How to conduct training for Module Pool Programming

    Hi everybody
    I am going to conduct 5 days training for module pool programming.
    Can you please provide me some suggestion about how to start & what r the steps?
    Please provide suggestion for following
    1) From where should I start
    2) What should be the first step & subsequent steps
    3) how should I get documentation & sample programs
    thanks

    Hello,
    You can start the training by first explaining what is Module Pool programming, and why is it needed, how is it different from other forms of programming , like reports(SE38).
    Then go on to explain how to create a MPP , i.e this you can do by giving the demo online, like:-
    Goto SE80
    Create a new program, and so on.
    Talk about the various elements of MPP, such as the scree(which is also known as Dynpro), text elements, pushbuttons, tabstrips, etc, and how to use them in the program.
    For sample programs and documentation, you can refer to help.sap.com, and search the documnetation for Module Pool Programming.
    Thanks and regards,
    Prerna

  • Varient for module pool screen

    can we create varient for module pool screen.

    <b>namaste anil anna.</b>
    how is pune .
    how is erwada joil.
    salman khan vunnada leda
    Try out on the filled screen:
    System - User defaults - Keep data
    If you re-run it:
    System - User defaults - Restore data
    or try this link
    http://help.sap.com/saphelp_nw04/helpdata/en/7d/f63a0a015111d396480000e82de14a/content.htm
    regards
    nagaraju madipadiga
    hcl technologies
    09958011191

Maybe you are looking for