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.

Similar Messages

  • 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

  • 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

  • Selection screen in module pool programming..

    hi,
    I designed some screen elements for KUNNR and MATNR and handled their value selection thru POV request.
    I want to select data from my table using these values. Will a simple select statement with AND condition on these values work ? I doubt as even if the user does not enter value for one of these, my select is giong to fail. for e.g. he enters value for KUNNR but not for MATNR.
    If that is so then shud i need to design a screen which must display select options like for KUNNR, MATNR etc ? if yes then the value that is displayed there when user selects F4 must be controlled by me. how to design this in module pool ?? where to write statements related to selection screen definition and how to handle its selection ?
    thks

    it is possible.
    I am involved in this topics check my post for one method .
    https://forums.sdn.sap.com/click.jspa?searchID=14529204&messageID=1412188
    https://forums.sdn.sap.com/click.jspa?searchID=14529204&messageID=1501162
    in the above post there is alternative by Rich. that is simple and easy.
    Regards
    Vijay Babu Dudla

  • Selection- screen in module pool

    hi all,
            how to create selection screen in module pool programing,
    in screen attributes of module pool, 4 screens are present, but selection screen radio button has been disabled.
    how to work by using selection screen radio button.
    Regards
    Suprith

    HI Suprith,
    You ll find a LAYOUT button on the application tool bar just click that button sceen painter sceen will be opend there you have to design your selection screen. Letf side of the sceen painter you see the options use the options as per your requiment and activate . If you  are using module pool program go to SE93 create the t-code and give the program name and the screen name which you have created in se51.
    hope this will help you...
    reward if useful
    regards,
    sunil kairam.

  • Doubt in Selection-Screen for Program type "Function Group"

    Hi Gurus,
    I created a Function group in that i created one screen and writtem the Screen flow logic. In that screen I called a Function module "COMPLEX_SELECTIONS_DIALOG" For Creating a selection-Screen.
    The code snippet is like below.
    CASE ok_code .
        WHEN c_clk1.
          CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
         EXPORTING
           title                   = text-002
           text                    = 'Material Number'
           signed                  = 'X'
            lower_case              = ' '
            no_interval_check       = ' '
             just_display            = ' '          " Un commented by Srihari
             just_incl               = 'X'          " Un commented by Srihari
            excluded_options        =
            description             =
            help_field              =
            search_help             =
           tab_and_field           = st_tab
          TABLES
            range                   = r_matnr
         EXCEPTIONS
           no_range_tab            = 1
           cancelled               = 2
           internal_error          = 3
           invalid_fieldname       = 4
           OTHERS                  = 5.
    it works fine. But the problem is if i click the multiple selection button for the select-option in selection screen and enter the values and copy those value. In the multiple selection button green button is not coming like noram report selection-screen. Please remember I used the program type as "Function Group" not "Module Pool".
    Please send your suggestions.
    Thanks,
    Srihari.

    Ok, I am not 100% sure, if I understand you correctly, you said, you created one screen to 'simulate' a standard selection screen behavior without using select-options statement?
    If that's not correct, could you please post a few more details on what exactly you are doing.
    I had to 'simulate' a select-option behavior which I did as follows:
    - I created a range variable to store the values (s_ctby)
    - on the screen I defined the LOW (s_ctby-low), HIGH (s_ctby-high) and the multiple selection field pushbutton
    - In the PBO I set the icons for the multiple selection pushbutton
      READ TABLE s_ctby INDEX 2 TRANSPORTING NO FIELDS.
      IF sy-subrc NE 0.
        gv_createby = gc_icon_enter_data.
      ELSE.
        gv_createby = gc_icon_disp_data.
      ENDIF.
    - In the PBO make sure that any values entered on the screen are transferred to the range
    * transfer any changed values into the correct range for user transaction
    * (screen 0110) because that screen just 'simulates' a selection screen
    * so we have to make sure that any data the user enters in the selection
    * fields is passed into the appropriate ranges
      IF sy-tcode EQ gc_trans_user.
    *   created by
        IF NOT s_ctby-high IS INITIAL.
          s_ctby-sign   = c_i.
          s_ctby-option = c_bt.
          IF s_ctby[] IS INITIAL.
            INSERT s_ctby INDEX 1.
          ELSE.
            MODIFY s_ctby INDEX 1.
          ENDIF.
        ELSEIF NOT s_ctby-low  IS INITIAL AND
                   s_ctby-high IS INITIAL.
          s_ctby-sign   = c_i.
          s_ctby-option = c_eq.
          IF s_ctby[] IS INITIAL.
            INSERT s_ctby INDEX 1.
          ELSE.
            MODIFY s_ctby INDEX 1.
          ENDIF.
        ELSEIF s_ctby-low  IS INITIAL AND
               s_ctby-high IS INITIAL.
          DELETE s_ctby INDEX 1.
        ENDIF.
    - If the user hits the multiple selection pushbutton
        WHEN gc_fc_create_by.
    *     if the user hits the multiple selection button on the screen
    *     we call the standard SAP functionality to show the multiple
    *     selection popup SAP uses on a standard selection screen
          CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
            EXPORTING
              title             = text-t02
            TABLES
              range             = s_ctby
            EXCEPTIONS
              no_range_tab      = 1
              cancelled         = 2
              internal_error    = 3
              invalid_fieldname = 4
              OTHERS            = 5.
          IF sy-subrc NE 0 AND NOT sy-msgty IS INITIAL.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    *     now update the header line so the screen fields display the correct values
          CLEAR s_ctby.
          READ TABLE s_ctby INDEX 1.
    Hope that helps,
    Michael

  • Submit program for function pool

    Dear Experts,
                       i am using submit program for a standard report
       submit SAPLRHPA_REPORTING
                   with APPSELECT_HISTO eq  'X'
                   and return.
    it's going to dump how to use function pool programs in submit statements.
    You attempted to start the ABAP/4 program "SAPLRHPA_REPORTING" with SUBMIT, but
    attributes specify this program as type "F" instead of "1". You can
    only start programs of type 1 with SUBMIT.
    Thanks and Regards,
    Thirukumaran. R

    Hi
    As per my knoweldge i think you cant submit the fuction pool using by submit.
    Alternate way is call the function module which is within the function pool .
    Or if you want to execute a particular routine within a function pool you can use as below
    PERFORM Routine_name(saplrhpa_reporting)
                                           USING parameters.
    Hope this answer helps you
    Cheers.
    J.

  • 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

  • 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

  • Selection screen in mod pool prog

    hii everybody
    i want to creat a selection screen using mod pool ..but when ever i am creating a screen then the 4rth option which is of selection screen is automaticaly getting greyed out ... so how do i create it
    bye thanks

    Hello Rohit Gupta
    Pls find the following code
    Create an Executable Program like this.
    report ztest_program1.
    TABLES : vbrk , vbrp .
    data: ok_code type sy-ucomm.
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
    PARAMETERS : p_vkorg TYPE vbrk-vkorg OBLIGATORY DEFAULT '1000'.
    SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln,
                     s_posnr FOR vbrp-posnr.
    SELECTION-SCREEN END OF SCREEN 400 .
    START-OF-SELECTION .
    CALL SCREEN 100 .
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      set PF-STATUS 'ZPROGRAM5'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    if sy-ucomm eq '&BACK' or sy-ucomm eq '&EXIT' OR sy-ucomm eq '&CANCEL'.
       LEAVE PROGRAM.
    ENDIF.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Create a screen named 100 like this
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    call SUBSCREEN sel INCLUDING sy-repid '400'.
    PROCESS AFTER INPUT.
    call SUBSCREEN sel.
    MODULE USER_COMMAND_0100.
    Create a Sub screen area named SEL in side the Layout to display the Selection screen.
    In attributes add OK_CODE.
    Now you can see the Grey coded option enabled.
    Regards
    Veera

  • Submit function pool program

    hi all,
    i am using submit statement in Z program and calling standard program of SM37, but problem is that it is going for dump and saying that we cant use submit for function-pool.
    can anyone please tell me that how can i submit? can i call this by using call transaction? actually i have to pass selection screen parameters also from my Z program and have to skip standard selection screen.
    plz help.
    regards.

    saurabh srivastava,
    There are few things regarding your query, which I need to clarify
    <li>Submit statements can be used to call Report programs (Type 1 means executable). So program for SM37 transaction is SAPLBTCH which means you can not use SUBMIT statement. SAPLBTCH is module pool program. You can not use Selection-screen statement for module pool program.
    <li>Call transaction can be used to call either report programs or module programs. Which means if transaction is assigned to them, we can use. As I said before program is module pool program. You can still use below statement.
    CALL TRANSACTION 'SM37' and SKIP FIRST SCREEN.
    <li>If you want to use AND SKIP FIRST SCREEN statement , need to follow the below conditions
    "1.For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
    "2.All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
    <li>Please press F1 help on * and SKIP FIRST SCREEN* statement to see how to use.
    Thanks
    Venkat.O

  • 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

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

  • Variants on tabbed selection screen for ALV reports

    Scenario: We use a tabbed selection screen for an ALV report. We create a variant, make a selection field on the second tab mandatory & save it without a value. When we run the report with the saved variant it does not check that the required field on the second tab is populated before it executes.
    Question: How can I code such a check?
    Edited by: Alridge Tom on Jul 4, 2008 3:43 PM

    Hi,
    try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
    START HERE
    PARAMETERS: pa_vari TYPE disvariant-variant.
    INITIALIZATION.
      g_repid = sy-repid.
      CLEAR e_variant.
      e_variant-report   = sy-cprog.
      e_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = 'A'
        CHANGING
          cs_variant = e_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        pa_vari = e_variant-variant.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
      PERFORM alv_variant_f4 CHANGING pa_vari.
    *&      Form  ALV_VARIANT_F4
    FORM alv_variant_f4 CHANGING pa_vari.
      DATA: l_exit(1) TYPE c.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant       = e_variant
          i_tabname_header = 'ANYTHING'
          i_save           = 'A'
        IMPORTING
          e_exit           = l_exit
          es_variant       = e_variant
        EXCEPTIONS
          not_found        = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'  NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF l_exit = space.
          pa_vari = e_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                               " ALV_VARIANT_F4
    END
    Hope iy helps!
    Alfonso

  • Selection screen for submit in BSP

    Hi Experts,
    I have gone throught the link to submit the program in BSP using varients, but i even want to see the selection screen for tht so tht user can post his own values over there.
    I tryed SUBMIT with different options but i am not able to see the selection screen for it,pls help me its urgent.
    thanks in advance.
    Saurabh.

    hi,
    the submit i have made it the way u told me..before itself..so thts fine..
    but value which i get in first.htm of these dates is not getting transfered to the next.htm
    thought i am able to get the value through the navigation->set_parameter...
    really i feel this issue is bit getting longer....
    i guess i used my ful day on it...
    thanks for ur great help..but pls let me know is there any proble here in my event handler in first .htm
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
    See if upload is triggered from button
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event ?= CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event->name = 'button' AND event->event_type = 'click'.
        DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
        button_event ?= event.
      ENDIF.
      CASE event->id.
        WHEN 'ok'.
          DATA: date1 TYPE REF TO CL_HTMLB_INPUTFIELD.
          DATA: date2 TYPE REF TO CL_HTMLB_INPUTFIELD.
         date1 ?= CL_HTMLB_MANAGER=>GET_DATA(
                              request = runtime->server->request
                              name    = 'inputField'
                              id      = 'fromdate'
          IF date1 IS NOT INITIAL.
            CALL FUNCTION 'CONVERSION_EXIT_PDATE_INPUT'
              EXPORTING
                INPUT         = date1->value
             IMPORTING
               OUTPUT        = p_date.
          ENDIF.
          date2 ?= CL_HTMLB_MANAGER=>GET_DATA(
                              request = runtime->server->request
                              name    = 'inputField'
                              id      = 'todate'
          IF date2 IS NOT INITIAL.
            CALL FUNCTION 'CONVERSION_EXIT_PDATE_INPUT'
              EXPORTING
                INPUT         = date2->value
             IMPORTING
               OUTPUT        = p1_date.
          ENDIF.
          navigation->set_parameter( 'p_date' ).
          navigation->set_parameter( 'p1_date' ).
          navigation->next_page( 'NEXT' ).
      ENDCASE.
    ENDIF.
    pls help me out expert.
    thanks,
    Saurabh

Maybe you are looking for

  • ALEAUD01 IDOC problem with Senderpartner Number

    Hi, I have scenario like R3 -XI-File NFS.so we have created a third party Receiving system(TEST_XYZ)as a business system maintain in SLD. when the IDOCs sent from sender R3 system acknowledgments been sent back to R3 system from XI,but XI system gene

  • Created multiple sites.. 1 on dotmac and want to save 2nd to folder...

    I have created a home website and wanted to create one for school.... I'm a teacher. How can I save the 2nd site to a folder to store for school w/o including my original site? I've already made the site and hope I haven't wasted my time. Thanks!

  • Problem with Pro K5400

    All of a sudden about half of my sentences are being cut in half (horizontal blank streaks). But only in black.  The other colors work perfectly fine. I've aligned the print heads, cleaned the print heads and replaced the black cartridge (which was o

  • ITunes Recognizing iPod Shuffle As iPod

    My wife has a iPod Nano that has synced without problems with iTunes. She recently purchased me a iPod Shuffle which had difficulty syncing with iTunes, but did eventually sync. After a few weeks, iTunes would not recognize it any longer and kept pro

  • HRP-Tables not delete

    Hello, everybody! I need your advice. I made copy of one org.unit for example 50000100 with evaluation path O-O-S-P from my sender system. After execution I saw my data in reciever system. All data from PA-tables was deleted and inserted only transfe