Selection screen in type m program

How can we define Selection screen in type m program?
Moderator message - please search the forum before asking. Thread locked.
Edited by: Rob Burbank on Sep 20, 2009 2:19 PM

Hi Anil ,
Type M are module pool programs.
For these you have to create you screen and then determine their flow in your program.
These are executed by transactions.
Search tutorials on module pool program .
Hope its help you

Similar Messages

  • How to use a parameter  of a report program from selection screen in a dialog program

    how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • Passing parameter from selection screen to corresponding report program.

    Hi all,
    I am developing a report in which there is a selection screen containing 2 list boxes having month 'from' and 'to' ;ie the month range for which  the report is to be run and a parameter for year.below it i have 2 radio button options which will lead to the report that the user clicks on.
    I have done the following in the code.
    selection-screen begin of block b1 with frame title text-001.
    parameters: month1(10) as listbox visible length 10 obligatory.
    parameters: month2(10) as listbox visible length 10.
    parameters: year(4) obligatory.
    selection-screen : end of block b1.
    selection-screen: begin of block b2 with frame title text-002.
    parameters: rb1  radiobutton group g1,
                        rb2  radiobutton group g1.
    selection-screen : end of block b2.
    if rb1 = 'X'.
    submit ZMIS1.
    ENDIF.
    if rb2 = 'X'.
    submit ZMIS2.
    endif.
    Now i want the values selected in the listbox and the year to be passed in the report that will be selected in the radiobutton (ie  ZMIS1 or ZMIS2) so that the corresponding report output will be displayed directly with the inputs given in the selection screen .
    Please tell me how to do this.Thanks in advance.

    You also have to pass Selection-screen data for called program the way it has been shown down.
    REPORT  ZVENKAT_ALV_LIST.
    DATA:
          IT_RSPARAMS TYPE STANDARD  TABLE OF RSPARAMS,
          WA_RSPARAMS LIKE LINE OF IT_RSPARAMS.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: MONTH1(10) AS LISTBOX VISIBLE LENGTH 10 OBLIGATORY.
    PARAMETERS: MONTH2(10) AS LISTBOX VISIBLE LENGTH 10.
    PARAMETERS: YEAR(4) OBLIGATORY.
    SELECTION-SCREEN : END OF BLOCK B1.
    SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS: RB1 RADIOBUTTON GROUP G1 USER-COMMAND UC1,
                RB2 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN : END OF BLOCK B2.
    IF RB1 = 'X'.
      WA_RSPARAMS-SELNAME = 'P_MATNR'. "PARAMETER or SELECT-OPTION of the called program
      WA_RSPARAMS-KIND    = 'P'.       "S=Select-options P=Parameters
      WA_RSPARAMS-SIGN    = 'I'.
      WA_RSPARAMS-OPTION  = 'EQ'.
      WA_RSPARAMS-LOW     = '11010'.
      WA_RSPARAMS-HIGH    = SPACE.
      SUBMIT ZMIS1 WITH SELECTION-TABLE RSPARAMS AND RETURN.
    ENDIF.
    IF RB2 = 'X'.
      WA_RSPARAMS-SELNAME = 'P_MATNR'. "PARAMETER or SELECT-OPTION of the called program
      WA_RSPARAMS-KIND    = 'P'.       "S=Select-options P=Parameters
      WA_RSPARAMS-SIGN    = 'I'.
      WA_RSPARAMS-OPTION  = 'EQ'.
      WA_RSPARAMS-LOW     = '11010'.
      WA_RSPARAMS-HIGH    = SPACE.
      SUBMIT ZMIS2 WITH SELECTION-TABLE RSPARAMS AND RETURN.
    ENDIF.
    Thanks
    Venkat.O

  • Currency field on a selection screen of type 'DMBTR'.

    Hello ABAPers,
          Could you please tell me how to do it?
           I have a currency field on a selection screen of type 'DMBTR'.
           When i input and press the enter key ,i want the value to be displayed in the following style.
              1. CURRENCY     EQ    'JPY'
                    EX:
                          Value before pressing EnterKey =   123456 
                          Value after pressing   EnterKey =    123,456
                      i.c  the value should be displayed without decimal point
            2. CURRENCY      NE    'JPY'
                    EX:
                          Value before pressing EnterKey =   123456 
                          Value after pressing   EnterKey =    123,456.00
                      i.c  the value should be displayed with decimal point
          Note:The above trick has already been done on a standard dynpro screen of Tr.Code FB60 and Field 'Amount'.
    <removed_by_moderator>
    Thanks and Regards,
    Mohan
    Edited by: Govindasamy Mohan on Oct 8, 2009 6:22 PM
    Edited by: Julius Bussche on Oct 9, 2009 1:36 PM

    Hi ABAP Lover,
       Thanks a lot for your reply.
       I had the same idea as yours like using data type 'P'.
      But, the problem is  that there is only one currency field on the screen .There is also a field of 'Company Code'.
    Both fields are mandatory .
    Hence,the requirement is  to convert the  currency value to the currency of the company code which is input .
    The conversion  should yield the following output on the screen after pressing the enter button.
    1. When currency EQ  'JPY' ,  the value should be displayed without decimal point
      2.When currency NE  'JPY' ,  the value should be displayed with decimal point
    I am very sorry for not explaining you clearly in my first posting.
    Thanks and Regards,
    Mohan

  • Call report selection screen in module pool program with tab strip control

    Hi,
    Could anyone explain in detail to call report selection screen in module pool program with tab strip control.
    Thanks
    Mano

    Hi,
    Refer std program:
    demo_sel_screen_in_tabstrip.
    demo_sel_screen_with_tabstrip.
    Call your program with SUBMIT stmt form module program.
    Reward points if this Helps.
    Manish

  • How can i declare a selection screen in a DP program with transaction code.

    hi friends,
    How can i declare a selection screen in a DP program with transaction code. What are the events and flow logic..

    Search in SCN/Google for Module-pool programming basics.

  • Calling the selection screen of the calling program after the execution of

    Hi all,
    I had created a program for a purchase order display.
    It has three radio-buttons from where i am calling different programs.
    I am using submit in the calling program and get parameter in at selection-screen output of the called program.
    I am getting the end report without the display of the selection screen of called program. But when i am clicking back on the end-report then i want to come back on the selection screen of the calling program. But i am coming out of the execution.
    Can anyone please tell me how to call the selection screen.
    Thanks in advance,
    Regards
    vamsi

    Hi, when you do the SUMBIT statement, make sure that you are using the extension........  AND RETURN.
    Submit <report> <b>AND RETURN</b>.
    This should return control to the caller.
    Regards,
    Rich Heilman

  • Add selection screen field in standard program

    Hi Friends,
    I have a requirement to add a language selection screen field in standard programs (RFSUSA00, RFITEMGL, RFIDPL11, RFBELJ10_NACC, RFIDPL06, RAGITT_ALV01 , RFASLD15 , S_PL0_86000028 , RFCASH00 , RFIDPL18).
    This is such that when I select the appropriate language the output should get printed in that paticular language. Can someone help me with how to do this?
    Regards,
    Dikshitha

    Hi Dixitha,
    Use implicit enhancement option.
    Desplay the report in se38.
    In Menu, go to Edit > Enhancement Operations > Show Implicit Enhancement Options.
    The system will show you lines (in color) where you can add your enhancement.
    This function will allow you to add business rules, substitute fields, do extra calculations, and other unique, non-standard requirements.
    Reddy

  • Subscreen selection screen for function pool program

    Hi,
    I have a requirement wherein i need to make the parameter field flexible( meaning can exclude, include values etc). Same function as select-options. The parameter was created in a dialog progmming.
    The problem here is that i am using function pool. I have tried to use subscreen but it is only applicable on report program. Is anyone knows if this is possible. Or is there any way to make the field as select-option without using call subscreen?
    Please help!
    Thanks in advance!

    Hi,
    No need to create separate Fields ,only create as parameter.
    for your Reference check below code.
    DATA : lv_title             TYPE sy-title,
                ls_description TYPE rsfldesc,
                lt_selopt          TYPE STANDARD TABLE OF rsdsselopt.
    PARAMETER : p_field TYPE ausp-atwrt .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
      lv_title = 'TEST'.
      ls_description-type    = 'C'.
      ls_description-length  = '30'.
      ls_description-olength = '30'.
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
        EXPORTING
          title                    = lv_title
          description       = ls_description
          help_field         = 'AUSP-ATWRT'
        TABLES
          range               = lt_selopt
        EXCEPTIONS
          no_range_tab      = 1
          cancelled         = 2
          internal_error    = 3
          invalid_fieldname = 4
          OTHERS            = 5.
      IF sy-subrc NE 2.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • To use the selection screen entry in another program

    dear all,
    i have a requirement that i want to use the selection screen entry of my zmodule pool to the selection screen of a zreport and want to use its output in my module pool.
    how could i do this in my module pool programing??
    i hope u get my question, i want to use the output of my zreport in my module pool with the same selection screen as given in module pool.,directly in my module pool output without opening my zreport seperately for this same selection screen data

    Hi,
      You can use SUBMIT statement in your module program to call the zreport program in background.
    Press F1 on Submit statement and you will find required detials of this statement. For using submit statement
    you have to create an internal table of type RSPARAMS and pass it in the submit statement.
    eg.
    DATA :
    *  table to be passed to background report 'ZREPORT1'
        int_rspar TYPE TABLE OF rsparams,
        ws_rspar TYPE rsparams.
    CONSTANTS: c_include     TYPE rsparams-sign               VALUE 'I',
               c_kind        TYPE rsparams-kind               VALUE 'S',
               c_between     TYPE rsparams-option             VALUE 'BT'.
    *Preparing the table to be passed to the background report.
    *populating SELECT-OPTION for knb1-kunnr (Customer Number)
    CLEAR : ws_rspar.
    ws_rspar-selname = 'S_KUNNR'. "Should be the name of select option as in                               the called report
    ws_rspar-kind = c_kind.
    ws_rspar-sign = c_include.
    ws_rspar-option = c_between.
    ws_rspar-low = '1'.
    ws_rspar-high = '100'.
    APPEND ws_rspar TO int_rspar.
    *populating SELECT-OPTION for knb1-bukrs (Company code)
    CLEAR : ws_rspar.
    ws_rspar-selname = 'S_BUKRS'.
    ws_rspar-kind = c_kind.
    ws_rspar-sign = c_include.
    ws_rspar-option = c_between.
    ws_rspar-low = 'a'.
    ws_rspar-high = 'z'.
    APPEND ws_rspar TO int_rspar.
    submit zreport
      with selection-table int_rspar
          EXPORTING LIST TO MEMORY
              and return.
    The above code will execute the zreport in backgournd.
    Now to get the output of the zreport :-
    *This internal table stores the value
    *Of output listed to memory
    DATA BEGIN OF itab_list OCCURS 0.
    INCLUDE STRUCTURE abaplist.
    DATA END OF itab_list
    * To read from the memory. The output of the program that is executed in background is then populated in the itab_list table.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = itab_list
    EXCEPTIONS
    not_found = 4
    OTHERS = 8.
    * To write it onto the output
    CALL FUNCTION 'WRITE_LIST'
    EXPORTING
    WRITE_ONLY = 'X'
    TABLES
    listobject = itab_list
    EXCEPTIONS
    EMPTY_LIST = 1
    OTHERS = 2
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Bhavesh.

  • Selection Screen - Wage Type Ranges

    Dear Experts,
    I am in the process to prepare functional specifications for the custom reports on payroll.  we need to maintain fields to select  wage type ranges from and to with F4 option.
    Iam preparing the FS for this selecton screen, now i need to specify from where (which table) the system should fetch (show) all the wage types if the user click on the F4 button to choose the wage type ranges in the selection screen
    Based on this wage type ranges only the custom program should show the results from RT.
    Please advice me asap
    Regards,
    Siri

    Hi Anil ,
    Type M are module pool programs.
    For these you have to create you screen and then determine their flow in your program.
    These are executed by transactions.
    Search tutorials on module pool program .
    Hope its help you

  • Skipping Selection Screen for a report program

    Hi guys,
    I have a report program that works in 2 modes - Create and modify ( There is a toggle button in the ALV report). Its an editable ALV grid. There are 2 tcodes - zcreate and zmodify to access the same report in 2 above modes. For zmodify, i have a selection screen. How do i skip the selection screen for zcreate ?
    Here is my report program
    REPORT ZSWR_RCKDVOLS .
    INCLUDE ZSWR_RCKDVOLS_TOP.
    INCLUDE ZSWR_RCKDVOLS_CLDEF.
    INCLUDE ZSWR_RCKDVOLS_CLIMP.
    INCLUDE ZSWR_RCKDVOLS_SELSCR. " Selection Options are written in this.
    INCLUDE ZSWR_RCKDVOLS_PBO.
    INCLUDE ZSWR_RCKDVOLS_PAI.
    INCLUDE ZSWR_RCKDVOLS_FORM.
      INITIALIZATION
    initialization.
      perform layout_build.
      AT SELECTION-SCREEN
    at selection-screen on s_locid.
      clear lv_plnt.
      select single werk from oijrra
                          into lv_plnt
                          where locid in s_locid and rpart = gc_rpart.
      perform memory_id_build.
      START-OF-SELECTION
    start-of-selection .
      perform fieldcatalog.
      perform fill_internal_table.
      perform build_outtab.
    END-OF-SELECTION.
      CHECK: NOT gi_zswt_rckdvols[] IS INITIAL.
      set SCREEN 100.        "Main Screen
    A sample code will be greatly helpful.
    Thanks,
    SHK

    So if we were to implement this in your program.....
    report zswr_rckdvols .
      include zswr_rckdvols_top.
      include zswr_rckdvols_cldef.
      include zswr_rckdvols_climp.
    <b>  include zswr_rckdvols_selscr. " Selection Options are written in this ".
    * Add this line into your selection screen include.
      parameters: p_switch type c no-display.</b>
      include zswr_rckdvols_pbo.
      include zswr_rckdvols_pai.
      include zswr_rckdvols_form.
    * INITIALIZATION
    initialization.
      perform layout_build.
    * AT SELECTION-SCREEN
    <b>at selection-screen output.
      if sy-tcode = 'ZCREATE'
        and p_switch = space.
        submit zswr_rckdvols
               with p_switch = 'X'
                     and return.
        leave program.
      endif.</b>
    at selection-screen on s_locid.
      clear lv_plnt.
      select single werk from oijrra
      into lv_plnt
      where locid in s_locid and rpart = gc_rpart.
      perform memory_id_build.
    * START-OF-SELECTION
    start-of-selection .
      perform fieldcatalog.
      perform fill_internal_table.
      perform build_outtab.
    end-of-selection.
      check: not gi_zswt_rckdvols[] is initial.
      set screen 100. "Main Screen
    Regards,
    Rich Heilman

  • How to pass Selection screen values to another program's selection screen

    Hello,
    I have a requriement where in which i need to pass the selection screen values (say list of pernrs) and few others of one program to selection screen of another. 
    One option that i came across is using Submit. But am unware how to pass only the selection screen values (there wont be any data processing or filtering).  Just the values of one prgm's selection screen are to be sent to another.
    Thanks
    RK

    prog1.
    data:lt_params type table of RSPARAMS.
    data:wa like line of lt_params.
    parameters:pa1 type sy-datum.
    select-options:so1 type sy-dtaum.
    wa-SELNAME = 'PA2'.               "Seletion screen field name
    wa-KIND     = 'P'.                    "P-Parameter,S-Select-options
    wa-SIGN     = 'I'.                    "I-in
    wa-OPTION     = 'EQ'.               "EQ,BT,CP
    wa-LOW     = pa1.                    "Selection Option Low,Parameter value
    append wa to lt_params.
    loop at so1.
    wa-SELNAME = 'SO2'.               "Seletion screen field name
    wa-KIND     = 'S'.                    "P-Parameter,S-Select-options
    wa-SIGN     = 'I'.                    "I-in
    wa-OPTION     = 'EQ'.               "EQ,BT,CP
    wa-LOW     = so1-low.               "Selection Option Low,Parameter value
    wa-HIGH     = so1-high.               "Selection Option Low,Parameter value
    append wa to lt_params.
    endloop.
    CALL FUNCTION 'SUBMIT_REPORT'
      EXPORTING
        report                 = 'ZPROG2.'   "report name of ur tocde
        RET_VIA_LEAVE          = ''            "IF 'X' returns to the called program after execution
        SKIP_SELSCREEN         = 'X'       "If 'X' selection screen of called program is not displayed
    TABLES
       SELECTION_TABLE        = lt_params       "Contains values to the selection screen
    EXCEPTIONS
      JUST_VIA_VARIANT       = 1
      NO_SUBMIT_AUTH         = 2
      OTHERS                 = 3
    Prog2.
    parameters:pa2 type sy-datum.
    select-options:so2 type sy-dtaum.
    write pa2.
    skip 1.
    loop at so2.
    write:so2-low,so2-high.
    skip 1.
    endloop.
    Edited by: Keshu Thekkillam on Aug 20, 2009 3:22 PM

  • Sending selection screen information to another program.

    Hi Friends ,
                             we have a requirement here.
    I have 2 reports , each having a selection screen , and finally after entry in selection screen, the result is generated as alv reports.
    Current requirement is, in teh first report, i had to make the selection screen of the second report [ in blocl 2] along with the existing first report selection screen  [block 1]  . So, now there are two blocks  in  the first report.
    Now the requirement is , whn i fill up the selection criteria of the second report in the  screen, on execution of the report, the program should be able to collect the secelction screen information from the firts report, block 2  , and submit it in the second report, and execute the second report , and generate the output.
    I am just uncomfortable / unaware of the syntax, or code  to SUBMIT the selection screen information to the second report , from the first report.
    Can any one help me with the necesary code in the firts report to submit the block 2 information, and the code in report 2 , to receive it.
    Regards,
    Arnab.

    Hi Bala / All ,
          as per given code by you, I designed my sample code as follows. Let me tell you, I have 4 parameters in selection screen block, that I needed to send to the program zs2 from zs1.
    REPORT  ZS1.
    *DATA text TYPE c LENGTH 10.
    DATA: text TYPE c LENGTH 10,
    rspar_tab TYPE TABLE OF rsparams,
    rspar_line LIKE LINE OF rspar_tab,
    range_tab LIKE RANGE OF text,
    range_line LIKE LINE OF range_tab.
    SELECTION-SCREEN BEGIN OF block b1.
    SELECT-OPTIONS: selcrit1 FOR text,
    selcrit2 FOR text,
    selcrit3 FOR text,
    selcrit4 FOR text,
    SELECTION-SCREEN END OF block b1.
    rspar_line-selname = SELCRIT1.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-low = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    rspar_line-selname = SELCRIT2.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-low = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    rspar_line-selname = SELCRIT3.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-low = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    rspar_line-selname = SELCRIT4.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-low = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign = 'E'.
    range_line-option = 'EQ'.
    range_line-low = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign = 'E'.
    range_line-option = 'EQ'.
    range_line-low = 'K'.
    APPEND range_line TO range_tab.
    *SUBMIT report1 USING SELECTION-SCREEN '1100'
    *WITH SELECTION-TABLE rspar_tab
    *WITH selcrit2 BETWEEN 'H' AND 'K'
    *WITH selcrit2 IN range_tab
    *AND RETURN
    SUBMIT RHALESMD
    WITH SELECTION-TABLE rspar_tab
    WITH selcrit1 IN range_tab
    WITH selcrit2 IN range_tab
    WITH selcrit3 IN range_tab
    WITH selcrit4 IN range_tab
    AND RETURN.
    In the debugging mode I can see rspar_tab  getting populated with data.I wish to know , if this process is OK, then I guess the activities in this program is done, but how do i receive this selection screen data at the zprogram 2. I mean this must have some receiving parameters / coding  at the  receiving program also!!
    Please suggest !!
    Regards,
    Arnab.

  • Selection screen in Logical Database programming

    In my Executable program,i have used 'GET PERNR' .
    but i don't need the standrd selection screen as such.I want to modify the std selection screen . Instead of allowing user to select the PERNR's , i want to set their PERNR's by default .
    Advance Thanks .
    J

    You have write this in your INITIALIZATION and AT SELECTION-SCREEN OUTPUT events.
    In your INITIALIZATION event, default the PERNR to the PERNR of the employee who is running it.
    In the AT SELECTION-SCREEN OUTPUT, add the code to make it display only as follows.
    LOOP AT SCREEN.
      IF SCREEN-NAME = PERNR.
        SCREEN-INPUT =0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    Srinivas

Maybe you are looking for

  • Testing the SD data from R/3 in BW

    Hi All, I am extracting the sales data into Bw. I want to test the data extracted with the data in R/3. I do not know the SD transactions in R/3 to test the data. Can someone please provide me the transaction codes to see the following in R/3. Sales

  • Satellite R630 - Driver issues on Win 7 64bit after SP1 upgrade

    Need your help here guys, My Satellite R-630 is less than a year old, running a Windows 7 Home Premium on 64 bit. For a while, I have been experiencing BSOD's, which I traced through the Event Viewer to here: http://technet.microsoft.com/en-us/librar

  • Help connecting to external heart rate monitor

    From all I've read, chest strap heart rate monitors seem to be more accurate. So I will continue to use my wahoo tickr for my gym workouts. I followed the instructions to pair my watch to the tickR from the settings menu under Bluetooth but it just c

  • Error in Processing Material Dimension

    Hi We are on BPC 7.5 MS. The Material Dimension has 70000 (SEVENTY THOUSANDS MATERIAL IDS). When we are porcessing from the front end through BPC Admin COnsole, its taking about 3 hours to process and also at the end its saying the "THREAD WAS BEING

  • Execute .cmd command file on application server

    Hi all, I have written a dosprogram with .cmd trigger that i want to execute via an ABAP statement. Is there a function module that can execute this specific command file on the server? If so, can someone send an example of such a coding? Thanks in a