How to use dynamic selection screen inputs in main program

hi all,
  its a report where in it calls one dynamic selection screen( user need to enter the parameters here) after that i need to use those inputs for some check, can any buddy help how to use/ get that input parameters into main program.
regards,
vara..

Hi,
i think u have created that dynamic selection screen in seperate program and calling to ur main program.instead of that u just create that synamic selection screen program as include program and include it in ur main program.
or u need to use set/get parameter id concept.
rgds,
bharat.

Similar Messages

  • How to generate dynamic selection-screen?

    Hi all,
    I have two radio buttons on selection-screen.
    If user-selects the one, Then under the radio button another parameter should be displayed
    if he selects another radio button, the previous parameter should not  be displayed and another parameter should appear in the selection screen under the second radio button.
    Please help by giving the code to solve this problem?
    Thanks,
    Vamshi.

    Hi Vamsi,
    By using AT SELECTION-SCREEN OUTPUT and creating the MOdif id for the selection screen parameter you can achieve the dynamic selection scree..
    AT SELECTION-SCREEN OUTPUT.
    * Modify selection screen as per the radio buttons selected.
      PERFORM modify_sel-screen.
    FORM modify_sel-screen .
    * If radio button - process in range of STR's selected, display STR
    * range and Date range as input
      IF p_rb1 EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = c_ir2.
            screen-active  = c_0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    * If radio button - process from excel is selected, give option for
    * user to upload file
      ELSEIF p_rb2 EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = c_ir1.
            screen-active  = c_0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " MODIFY_SEL-SCREEN
    see the below example....
    copy the below code you can come to know how the dynamic selection screen happens..
    *                   S E L E C T I O N  S C R E E N                     *
    * Selection criteria
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_rb1  RADIOBUTTON GROUP gr1 USER-COMMAND com1 DEFAULT 'X',
                                             "Process STR's in date range
               p_rb2  RADIOBUTTON GROUP gr1. "Process STR's from Excel
    SELECTION-SCREEN BEGIN OF BLOCK c1 WITH FRAME .
    PARAMETERS : p_apover TYPE zcpeg_fg_related-pl_version OBLIGATORY.
                                                                "PJ1031008
    SELECTION-SCREEN END OF BLOCK c1.
    SELECTION-SCREEN END OF BLOCK b1.
    * Display date range to process STR's
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS: s_banfn FOR w_preq MODIF ID ir1,
                                        "Purchase requisition number
                    s_lfdat FOR w_lfdat MODIF ID ir1.
    "Date range
    SELECTION-SCREEN END OF BLOCK b2.
    * Option for uploading file to process STR's
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_file TYPE rlgrap-filename MODIF ID ir2. "File name
    SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN OUTPUT.
    * Modify selection screen as per the radio buttons selected.
      PERFORM modify_sel-screen.
    FORM modify_sel-screen .
    * If radio button - process in range of STR's selected, display STR
    * range and Date range as input
      IF p_rb1 EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = c_ir2.
            screen-active  = c_0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    * If radio button - process from excel is selected, give option for
    * user to upload file
      ELSEIF p_rb2 EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = c_ir1.
            screen-active  = c_0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " MODIFY_SEL-SCREEN
    Regards,
    Prabhudas

  • How to create dynamic selection-screen

    Hi all,
    I want to create dynamic selection-screen.in that dynamic selectio-screen i want to display date fields based on table name given in the selection-screen.
    Regards,
    Billa

    Hi Billa,
    Look into the function group SSEL, this has some SAP standard functions to work with dynamic selection screens.
    Below is sample FM, I wrote making use of standard FM from the above. This FM will take table name as input and will display a screen with all the fields within that table for selection. This can also be customized to restrict the fields for display.
    Hope this helps,
    Sumant.
    FUNCTION y_ss_test_dynamic_selection.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(TABNAME) LIKE  DD02L-TABNAME
    *"  EXPORTING
    *"     REFERENCE(DS_CLAUSES) TYPE  RSDS_WHERE
    *"  EXCEPTIONS
    *"      TABLE_NOT_VALID
    *"      OTHER_ERROR
      DATA texpr TYPE rsds_texpr.
      DATA twhere TYPE rsds_twhere.
      DATA trange TYPE rsds_trange.
      DATA BEGIN OF qcat.                    "Selections View for
              INCLUDE STRUCTURE rsdsqcat.    "Free Selectoptions
      DATA END OF qcat.
      DATA BEGIN OF tabs OCCURS 10.
              INCLUDE STRUCTURE rsdstabs.
      DATA END   OF tabs.
      DATA BEGIN OF fields OCCURS 10.
              INCLUDE STRUCTURE rsdsfields.
      DATA END   OF fields.
      DATA BEGIN OF efields OCCURS 10.
              INCLUDE STRUCTURE rsdsfields.
      DATA END   OF efields.
      DATA selid LIKE rsdynsel-selid.
      DATA actnum LIKE sy-tfill.
      DATA title LIKE sy-title VALUE 'Selection Screen'.
      DATA: maxnum LIKE sy-subrc VALUE '69'.
      CLEAR    tabs.
      tabs-prim_tab = tabname.
      COLLECT  tabs.
      DATA: position LIKE dd03l-position.
      DATA: keyflag  LIKE dd03l-keyflag.
      CLEAR fields.
      fields-tablename = tabname.
      fields-sign      = 'I'.
      DATA: step LIKE sy-subrc.
      SELECT fieldname keyflag position
        INTO (fields-fieldname, keyflag, position)
        FROM dd03l
        WHERE tabname = tabname
          AND fieldname NOT LIKE '.INCLU%'
          AND datatype NE 'CLNT'
        ORDER BY position.
        ADD 1 TO step.
        CHECK step LE maxnum.
        IF keyflag <> 'X'.
          efields = fields.
          APPEND efields.
        ENDIF.
        APPEND fields.
      ENDSELECT.
      IF sy-subrc <> 0.
        RAISE table_not_valid.
      ENDIF.
      CALL FUNCTION 'FREE_SELECTIONS_INIT'
           EXPORTING
                expressions              = texpr
                kind                     = 'F'
           IMPORTING
                selection_id             = selid
                expressions              = texpr
                where_clauses            = twhere
                field_ranges             = trange
                number_of_active_fields  = actnum
           TABLES
                tables_tab               = tabs
                fields_tab               = fields
                fields_not_selected      = efields
           EXCEPTIONS
                fields_incomplete        = 01
                fields_no_join           = 02
                field_not_found          = 03
                no_tables                = 04
                table_not_found          = 05
                expression_not_supported = 06
                incorrect_expression     = 07
                illegal_kind             = 08
                area_not_found           = 09
                inconsistent_area        = 10
                kind_f_no_fields_left    = 11
                kind_f_no_fields         = 12
                too_many_fields          = 13.
      IF sy-subrc = 0.
        CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
             EXPORTING
                  selection_id            = selid
                  title                   = title
             IMPORTING
                  where_clauses           = twhere
                  expressions             = texpr
                  field_ranges            = trange
                  number_of_active_fields = actnum
             TABLES
                  fields_tab              = fields
             EXCEPTIONS
                  internal_error          = 01
                  no_action               = 02
                  no_fields_selected      = 03
                  no_tables_selected      = 04
                  selid_not_found         = 05.
        IF sy-subrc = 0.
          CLEAR ds_clauses.
          MOVE tabname TO ds_clauses-tablename.
          READ TABLE twhere WITH KEY ds_clauses-tablename INTO ds_clauses.
          IF sy-subrc <> 0.
            RAISE other_error.
          ENDIF.
        ELSE.
          RAISE other_error.
        ENDIF.
      ELSE.
        RAISE other_error.
      ENDIF.
    ENDFUNCTION.

  • How to use At Selection Screen for fields whiledealing with Multiple Blocks

    Hi Guys,
                In my requirement i am having 4 blocks.1st block with raduio buttons for activating the opther 3 Blocks.
                  In these 3 blocks i am having some fields.
           How to do Validation for these fields.?
    I am using At Selection-screen on S-SCAD1. I am getting error"S_SCACD1 is neither a selection screen nor a Parameter"
    On the top of this" At Selection-screen on S-SCAD1" I am having"AT SELECTION-SCREEN OUTPUT."
                    Can anybody tell me how to solve this error?
    Thanks,
    Gopi.

    If you are using your block name than you should use like:
    AT SELECTION-SCREEN ON BLOCK S-SCAD1.
    Regards,
    Naimesh Patel

  • How to use dynamic select query which queries from 3 different table.

    Hi All,
    I am new to Toplink, i would like to use a named query to select some of the columns from 3 different tables with dynamic where clause.
    I have used the following lines. Please tell me how to get code for the dynamic where clause.
    First try :
    Vector objPersons = (Vector)session.executeQuery("findPersonByGlobalID",Person.class,vQueryArguments);
    The above method is not returning the vector or collection.
    Second Try:
    ReadAllQuery query = new ReadAllQuery(Person.class);
    query.useCollectionClass(LinkedList.class);
    LinkedList person = (LinkedList) session.executeQuery(query);
    The second try is returning the collection but, this fetches all the record from the table.
    1. How to query for range of records?
    2. How to query from multiple tables for some range. How to use dynamic range values ?
    Please reply with your answers or some pointers would help.
    Thanks and Regards,
    Vijay.B

    Hi,
    Did you try using a SQLCall ? It might be able to satisfy you requirements .. :-
    Employee employee = (Employee) session.executeSelectingCall(
        new SQLCall("SELECT * FROM EMPLOYEE WHERE EMP_ID = 44")
    );You can get more information here :-
    http://www.oracle.com/technology/products/ias/toplink/doc/1013/MAIN/_html/qrybas004.htm
    Regards,
    Sandeep

  • How to call dynamic selection screen from another report

    hi,
    i have transaction ZFAGLL03.
    it has got standard selection screen.. and dynamic selection screen...
    i am calling this transaction from another report, now how do i display this dynamic selection screen.....

    Try following code and see if it helps:
    TYPE-POOLS : rsds.
    TABLES:tgsb.
    DATA: trange TYPE rsds_trange,
           trange_line
             LIKE LINE OF trange,
           trange_frange_t_line
             LIKE LINE OF trange_line-frange_t,
           trange_frange_t_selopt_t_line
             LIKE LINE OF trange_frange_t_line-selopt_t,
              trange_line1
             LIKE LINE OF trange,
           trange_frange_t_line1
             LIKE LINE OF trange_line-frange_t,
           trange_frange_t_selopt_t_line1
             LIKE LINE OF trange_frange_t_line-selopt_t,
           texpr TYPE rsds_texpr.
    DATA: seltab TYPE TABLE OF rsparams WITH HEADER LINE,seltex TYPE rsds_texpr.
    SELECT-OPTIONS:so_gsber FOR tgsb-gsber.
    LOOP AT so_gsber.
       trange_line-tablename = 'FAGLFLEXA_FS'.
       trange_frange_t_line-fieldname = 'RBUSA'.
       MOVE-CORRESPONDING so_gsber TO trange_frange_t_selopt_t_line.
       APPEND trange_frange_t_selopt_t_line
       TO trange_frange_t_line-selopt_t.
    ENDLOOP.
    APPEND trange_frange_t_line TO trange_line-frange_t.
    APPEND trange_line TO trange.
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
       EXPORTING
         field_ranges = trange
       IMPORTING
         expressions  = texpr.
    submit FAGL_ACCOUNT_ITEMS_GL with FREE SELECTIONS texpr   AND RETURN .

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

  • HR-How to use dynamic selection fields in prog ..?

    Hii
         I have written a prog to select data pertaining to details of all employees who belong to a particular country . For this i have provided a dynamic selection field for selecting country (through Selection View).But when i am getting all the records for all countries.
                    How to use the dynamic selection fields in program or they behave in the same way as the standard selection given by the LDB .As if we enter a value in the std screen then the GET event acts accordingly .
    Ajitabh Pradhan

    Hi Ajitabh,
    First off, is the Dynamic Selection working? If so, try the following code.. I am assuming, you only want to look at Permanent Address.
    tables: pernr.
    infotypes: 0001,0006.
    start-of-selection.
    get pernr.
      rp-provide-from-last p0001 space pn-begda pn-endda.
      check pnp-sw-found eq 1.
      rp-provide-from-last p0006 1 pn-begda pn-endda.
      check pnp-sw-found eq 1.
      write:/ pernr-pernr,p0001-ename,p0006-land1.
    end-of-selection.
    Regards,
    Suresh Datti

  • How to use 'at selection screen on exit command'

    Hi,
    How do I use the above event in the following scenario.
    Scenario: I have a report program which has two radio buttons on the selection screen to which user command is assigned. On selection one, some fields should get disappeared on the selection screen. But one of the fields is a mandatory field, which doesn't allow to proceed unless we enter some value in that(which is redundant since anyway it will be disappearing).
    I thought 'on exit command' event works, but the user command assigned to the radio button is not of type E.
    Issuing a message at selection screen instead of making the field mandatory will work, but I don't want to do that.
    Can anyone please tell me how to handle this?
    Incorrect answers will be suitably punished.
    Thanks,
    Sumanth
    Edited by: Julius Bussche on Sep 26, 2009 12:40 PM
    Silly comment suitably modified.

    do not make that field mandatory using obligatory. so now your radio button work is done.
    now, how to make the field look like and work like mandatory field on execution:
    at selection-screen output.
    loop at screen.
       if screen-name = 'P_MAN'. " lets say this is the field which you want to make mandatory.
          screen-required = 2. "this will just  put a tick mark on the input , looks like mandatory.
       endif.
    endloop.
    now, how to check the mandatory option.
    at selection-screen.
    if p_man is initial.
      display your message to fill this.
    endif.
    hope this helps...
    and as per forum rules, kindly do not encourage people by talking about forum rules.

  • How to skip authorisation for infotype when using dynamic selection ?

    Hi folks,
    I have a problem here.
    When im using dynamic selection screen, i cannot skip authorisation for subtypes of an infotype. Eg. if my record for 0185 have records that do not have authorisation for the subtypes. Dynamic selection will filter away this record and will not get me into the Get Peras as id i use to run has authorisation configured. IT will skip out of Get Peras.
    However, if im not using dynamic selection screen, i will use the normal pnpce fields, i will be able to get the record, as i do my authorisation check using function module in the get peras, and i did not declare 0185 in the infotypes.
    May i know if there is any solution to this problem as dynamic selection screen is a standard...
    Thanks,
    lihui

    hi,
    however i cannot skip authorisation for the whole pernr as i need the authorisations for the processing reports.
    Currently the case is like this..
    i have a authorisations for infotype 0185. i have 2 subtypes records such as ZA and ZB. the user does not have authorisation to read ZB but has authorisation to read ZA.
    However, when use dynamic selection, it will skip out the pernr.
    If the pernr 0185 records has only ZA subtype but no ZB subtype, it will not skip this pernr when using dynamic selection.
    Anymore idea how to overcome this?

  • Dynamic Selection Screen Fields

    Hi All,
    I have made a copy of the program FI_RFSOPO00. This report uses dynamic selection screen. I wanted to know the names of these dynamic selection screen. As I have to make some database selections based on the user entries in these fields.
    Is there a way to find this out?
    Regards,
    Stephen

    Hi Stephen,
    1) FI_RFSOPO00 is unknown- i think you mean <b>RFSOPO00</b>
    2) RFSOPO00 uses logical datbase SDF, which uses
       free or dynmaic selections from the tables ska1,skb1
       and bsis.
    see F1 to <i>SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE dbtab </i> and ta SE36 to SDF too.
    regards Andreas

  • Dynamic selection screen fetching the value from table fields

    hi gurus,
    i have one table say ztable...and i should create a dynamic selection screen which should populate the selection screen by the table field names.
    example..if i have 3 fields im my table..my selection screen should have three selection option fields..and in future if i add one more field in my table it should automatically create another slection-option in selection screen..
    thanks
    Sudheer

    Do you mean like SE16 works. If so, you should notice that if you  amend the selection fields, the screen program is actually re-generated.
    That is what is happening. A program is being created and re-generated.
    To create a dynamic selection screen in a single program is not possible ( I may be wrong ). If it is possible, then you would have problems in defining selection screen field names and using them.

  • 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 to deal with dynamic selection screen elements when macros are used?

    Hello experts,
    This is regarding the dynamic selection screen elements. Actually the requirement is to modify the existing standard report program RFUMSV00 by copying it into a Z report, adding a few selection screen elements and new fields in the output. I actually did everything required except for the one thing that is going out of my reach.
    There are a certain fields which are coming when they are not supposed to get displayed. I don't understand the code because of its obsoleteness. Neither can I debug it because it is just data declaration.
    This is the code where there is a fault. If I copy the entire code into a new Z report, I'm getting new fields like Entry Date, Document Type, Reference Transaction,  Reference key, Logical system.
      DEFINE selection_screen_line.
      selection-screen: begin of line.
      parameters &3 like &4 default 'X' modif id mc4.
      selection-screen: comment (30) &1 for field &3 modif id mc4.
      selection-screen: comment pos_low(10) text-019
                        for field &2 modif id mc4.  "neu
      parameters &2 like rfums_alv-variante modif id mc4.
      selection-screen:
          position pos_high.
      selection-screen: pushbutton (15) text-028
                        user-command &5 modif id mc4.
      selection-screen end of line.
    END-OF-DEFINITION.
    Kindly, suggest me the right solution.

    In the program attributes ( SE38 > RFUMSV00 > GOTO > Properties ), you will find a logical database BRF declared. The include DBBRFSEL is part of the selection screen of this logical database.
    The selection screen is actually the selection screen of this logical database.
    Under the Logical Database field, there is a Selection screen field where you can input which selection screen of the logical database to be used.
    But, this is just to change the selection screen that is displayed. To completely suppress it you need to remove logical database declaration from the properties of the program and call it inside your program through function module.
    You cannot just remove it from the declaration because many of its variables are used in the program.
    So call it using function module as the first step in INITIALIZATION section of the program.
    The syntax and function module to call it in your program can be found in the following thread :
    How to hide the selection screen of a Logical datebase?
    Regards,
    Ashish

  • How to retrieve values from Dynamic Selection screen while using LDB  - PSJ

    I am having problem in PSJ Logical database. In a custom report which is using PSJ LDB, we are using PROJ and PRPS_R tables.
    When I run program it displays one dynamic selection screen, there we are giving selection criteria for PRPS (Master data WBS element) - Created on (giving some range like 2011/01/01 to 2011/01/31).
    So I want to display all WBS element which are created during the period (2011/01/01 - 2011/01/31).
    How do I retrieve the select-option low and high value of the field Created on Of WBS element if we Select data from any table based on this condition.
               Please help me.
    Thanks.

    in fact you don't have to get the values, you only need to tell to the program to take them into account :
    GET PRPS.
      CHECK SELECT-OPTIONS.

Maybe you are looking for

  • How can I change the color of a title bar?

    Ok, I have been looking for this answer for over a week now and nobody has yet given me an answer that works. So I am going to ask again. Here is a piece of code you can run to see what I am trying to do: public class RemoteDisplayFrame extends JFram

  • Class-data versus data and methods versus class-methods in OO ABAP

    Hi I was going thorugh following OO ABAP code. CLASS vessel DEFINITION.   PUBLIC SECTION.     METHODS: constructor,              drive IMPORTING speed_up TYPE i,              get_id RETURNING value(id) TYPE i.     CLASS-METHODS: start,               

  • What itunes version supports 1st gen ipod touch and iphone 4s

    I recently purchased an iPhone 4S. I also have a 1st gen iPOD touch. I am concerned that t the new version of iTunes will not support the touch. Is there a version of iTunes that supports both? Thanks Lee Ann

  • 30'' Display Resolution Misbehaving

    I have a 30" Apple cinema display. I just unhooked everything (which was working fine) and set it up in my new house. The icons are HUGE, the fonts HUGE, etc. I have the preferences set to the highest resolution, I've checked universal access and mag

  • The OC4J port number

    I have installed Oracle pids on a desktop. I want to change /Set the Port number. Where do i set the Port Number.