Dynamic Selection Options

Hi Guru's,
The requirement is something like this:
  1. The user enters the technical name of the table.
  2. The users enter a number of selection options to
     fetch the data from the table user enters. The
     number of selections options need to be dynamic.
Can you please let me know, which way I need to go in order to get this report done.
Any suggestions greatly appreciated.
Regards,
GPK.

Hi Praveen,
check this code , this program display the output in ALV for the entered table name (any), also fetchs the records based on the entered number of rows on the selection screen. you can give where condition also, based on where condition it will bring the rows from the table.
REPORT y_test LINE-SIZE 250 .
TYPE-POOLS: slis. " ALV Global Types
DATA: BEGIN OF ty_work ,
buffer(30000),
END OF ty_work.
DATA : work LIKE ty_work OCCURS 0 WITH HEADER LINE,
ws_rec LIKE sy-tabix,
ws_repname LIKE tbprogref-progname,
ws_tabname LIKE dd03l-tabname,
i_fields LIKE dd03l OCCURS 0 WITH HEADER LINE,
ws_flag(1) TYPE c.
FIELD-SYMBOLS <d>.
ASSIGN COMPONENT 0 OF STRUCTURE work TO <d>.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS : p_mandt LIKE t000-mandt,
p_rows LIKE rseumod-tbmaxsel DEFAULT 100.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS : p_tab LIKE dd03l-tabname OBLIGATORY MEMORY ID dtb,
p_opt LIKE rfc_db_opt-text.
SELECTION-SCREEN END OF BLOCK b1.
FIELD-SYMBOLS :
<lt_data> TYPE table. " Data to display
DATA:
lp_table TYPE REF TO data,
ls_layout TYPE slis_layout_alv.
FIELD-SYMBOLS: <wa> TYPE ANY, <comp> TYPE ANY.
ASSIGN work TO <wa> CASTING TYPE (p_tab).
Create internal table
CREATE DATA lp_table TYPE STANDARD TABLE OF (p_tab)
WITH NON-UNIQUE DEFAULT KEY.
ASSIGN lp_table->* TO <lt_data>.
START-OF-SELECTION.
TRANSLATE p_opt TO UPPER CASE. "#EC SYNTCHAR
Read data
SELECT * FROM (p_tab)
CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE <lt_data>
UP TO p_rows ROWS
WHERE mandt = p_mandt
AND (p_opt)
ORDER BY PRIMARY KEY.
DESCRIBE TABLE <lt_data> LINES ws_rec.
ls_layout-zebra = 'X'.
ls_layout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_structure_name = p_tab
is_layout = ls_layout
TABLES
t_outtab = <lt_data>.
Regards
Appana
*reward points for useful answers

Similar Messages

  • How to get dynamic select options from logical database?

    Hi,
    in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
    Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
    WHERE bukrs = p_burks AND ... AND
    (where_tab)
    Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
    Thanks in advance.
    Regards,
    Ivaylo Mutafchiev
    Senior SAP Abap Consultant

    Hi,
    Try to use the following fm in your report and check
      call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
        exporting
          curr_report        = sy-cprog
          mode_write_or_move = 'M'
        importing
          p_trange           = gt_dyn_trange
        exceptions
          not_found          = 1
          wrong_type         = 2
          others             = 3.
    PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values

  • Dynamic Selection option in the selection screen

    Hi ,
    I have a requirement like this ....
    The user wants some fields to be default available in the selection screen. But they also want to be able to select the data based on additional fields (all the remaining fields ) which they want to see in the dynamic selection .
    The basic list for selections should be limited to the fields listed in the specifications provided to me and the remaining fields should be made available through the dynamic selection option.
    In the transaction FBL3N , this facility is provided.
    Kindly help me with this..
    thanks,
    Sumit .

    Hi Sumit,
    To include dynamic selection check this sample code.
    TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
    TYPE-POOLS : vrm,
                 icon.
    *SELECTION SCREEN FIELDS
    TABLES : sscrfields.*GLOBAL DECLARATIONS
    DATA : flag TYPE c,
          tablename(10),
          mmtable LIKE dd02l-tabname,
          sdtable LIKE dd02l-tabname,
          hrtable LIKE dd02l-tabname.*DECLARATIONS FOR SELECTION SCREEN STATUS
    DATA it_ucomm TYPE TABLE OF sy-ucomm.***********SELECTION-SCREENS**********************
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.*FOR DYNAMIC DISPLAY OF MODULES
    PARAMETERS :  pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
                  pb RADIOBUTTON GROUP rad MODIF ID rad,
                  pc RADIOBUTTON GROUP rad MODIF ID cad.SELECTION-SCREEN SKIP.**TO INCLUDE DYNAMIC ICONS
    SELECTION-SCREEN COMMENT 2(6) text_001.*DYNAMIC LIST BOX BASED ON USER SELECTIONS
    PARAMETERS one AS LISTBOX VISIBLE LENGTH 20  MODIF ID mod.
    PARAMETERS two AS LISTBOX VISIBLE LENGTH 20   MODIF ID rad.
    PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.SELECTION-SCREEN END OF BLOCK blk1.*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
    SELECTION-SCREEN: FUNCTION KEY 1,
                      FUNCTION KEY 2,
                      FUNCTION KEY 3.**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
    AT SELECTION-SCREEN OUTPUT.*CLICK OF FIRST RADIO BUTTON
      IF pa = 'X'.
        sscrfields-functxt_01 = 'Materials Management'.
        WRITE icon_plant AS ICON TO text_001.
    *CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
        LOOP AT SCREEN.
          IF screen-group1 = 'MOD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'RAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.*CLICK OF SECOND RADIO
      IF pb = 'X'.
        sscrfields-functxt_02 = 'Sales And Distribution'.
        WRITE icon_ws_ship AS ICON TO text_001.
        LOOP AT SCREEN.
          IF screen-group1 = 'RAD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'MOD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.*CLICK OF THIRD RADIO
      IF pc = 'X'.
        sscrfields-functxt_03 = 'Human Resources'.
        WRITE icon_new_employee AS ICON TO text_001.
        LOOP AT SCREEN.
          IF screen-group1 = 'RAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'MOD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
    *WITH F8 BUTTON DISABLED  APPEND :  'PRIN' TO it_ucomm,
                'SPOS' TO it_ucomm,
                'ONLI' TO it_ucomm.  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = sy-pfkey
        TABLES
          p_exclude = it_ucomm.
    **EVENT ON THE SELECTION
    AT SELECTION-SCREEN.* LIST BOX ONE VALUES
      CASE one.
        WHEN '1'.
          mmtable = 'MARC'.
        WHEN '2'.
          mmtable = 'MARA'.
        WHEN '3'.
          mmtable = 'MARD'.
        WHEN '4'.
          mmtable = 'MARM'.
      ENDCASE.* LIST BOX TWO VALUES
      CASE two.
        WHEN '1'.
          sdtable = 'VBAK'.
        WHEN '2'.
          sdtable = 'VBAP'.
        WHEN '3'.
          sdtable = 'VBUK'.
        WHEN '4'.
          sdtable = 'VBUP'.
      ENDCASE.* LIST BOX THREE VALUES
      CASE three.
        WHEN '1'.
          hrtable = 'PA0001'.
        WHEN '2'.
          hrtable = 'PA0006'.
        WHEN '3'.
          hrtable = 'PA0022'.
        WHEN '4'.
          hrtable = 'PA0008'.
      ENDCASE.*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
    *AND ENABLING THE BUTTONS TO PERFORM F8
      CASE sscrfields-ucomm.
        WHEN 'FC01'.
          tablename = mmtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC02'.
          tablename = sdtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC03'.
          tablename = hrtable.
          sscrfields-ucomm = 'ONLI'.
      ENDCASE.*INITIALIZATION EVENT
    INITIALIZATION.*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
      PERFORM f4_value_request_pa.
      PERFORM f4_value_request_pb.
      PERFORM f4_value_request_pc.*START OF SELECTION EVENT
    START-OF-SELECTION.*SUBROUTINE FOR OUTPUT
      PERFORM output.*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PA
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
    FORM f4_value_request_pa.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'Plant Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'General Material Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Storage Location Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Units of Measure for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'ONE'.  CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 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.ENDFORM. " f4_value_request_tabname*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PB
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2FORM f4_value_request_pb.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'Sales Document: Header Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'Sales Document: Item Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Sales Document:Header Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Sales Document: Item Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'TWO'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 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.
    ENDFORM. " f4_value_request_PB*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PC
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3FORM f4_value_request_pc.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'Address Infotype 0006'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Education Infotype 0022'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Basic Pay Infotype 0008'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'THREE'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 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.
    ENDFORM. " f4_value_request_PC
    *&      Form  OUTPUT
    *       text
    *      -->P_TABLENAME  text
    *fINAL OUTPUT
    FORM output.  DATA p_table(10).  p_table = tablename.*popup to display teh selected table and
    *Continue button is clicked
      CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
        EXPORTING
          titel        = 'User Selections '
          textline1    = p_table
          textline2    = 'is the Selected table'
          start_column = 25
          start_row    = 6.*assigning the table value in p_table to the
    * Table in SE16 transaction by explicitly calling
      SET PARAMETER ID 'DTB' FIELD p_table.
      CALL TRANSACTION 'SE16'.
    ENDFORM.                    "OUTPUT
    Regards,
    Manoj Kumar P

  • FAGL_FC_VAL in ECC 6.0 M not able to get the dynamic selection options

    Hi
    While executing the transaction FAGL_FC_VAL in ecc 6 we are not getting the dynamic selection option same as ecc 5 we need business area as selection option.
    Please provide solution.. if any note to be applied we will do that. we have recently migrated to ECC 6.0
    Regards,
    Abhijeet

    Sorry. This typo was only in this forum message. Within the BPEL process it's :
    <from expression="ora:countNodes('inputVariable','payload','/ns1:Transmission/ns1:TransmissionBody/ns1:GLogXMLElement/ns1:Release') "/>
    Still 0 count.

  • Dynamic Select Options/Ranges Maintain and Display in my screen

    Hi I am trying to figure out if I can create a screen which will will read various select-options I have stored in a custom table but am having trouble finding something which will allow me to display each of 'select-options' in my dynpro... has anyone ever done this?
    I'd rather not reinvent the wheel or mimic - does anyone know of a way to basically use a loaded range and display it on a screen for display or maintenance using standard SAP routines/classes?
    Thanks in advance!
    Roc..

    @Adrian - I got your email regarding the code sample, here is a quick example of how to popup a dynamic selection for up to 5 tables...
    *& Report  ZRS_DYNAMIC
    REPORT  zrs_dynamic.
    * START Dynamic Range Selection Definitions
    * Definition of the selection_if variable, which is used to reference
    * the selections obtained
    DATA: gv_selid TYPE rsdynsel-selid.
    * Definition of the TABLES_TAB table for use in providing the list of
    * fields available for creating select options from
    DATA: gt_tables TYPE STANDARD TABLE OF rsdstabs.
    DATA: gs_tables TYPE rsdstabs.
    PARAMETERS: p_tab1 TYPE tabname DEFAULT 'KNA1',
                p_tab2 TYPE tabname DEFAULT 'KNB1',
                p_tab3 TYPE tabname DEFAULT 'KNC1',
                p_tab4 TYPE tabname DEFAULT 'KNVV',
                p_tab5 TYPE tabname DEFAULT 'KNVP'.
    START-OF-SELECTION.
      gs_tables-prim_tab = p_tab1 .APPEND gs_tables TO gt_tables.
      gs_tables-prim_tab = p_tab2 .APPEND gs_tables TO gt_tables.
      gs_tables-prim_tab = p_tab3 .APPEND gs_tables TO gt_tables.
      gs_tables-prim_tab = p_tab4 .APPEND gs_tables TO gt_tables.
      gs_tables-prim_tab = p_tab5 .APPEND gs_tables TO gt_tables.
    * Definition of Table which includes the select-option range for field
      TYPES: ty_selopt_t TYPE  rsdsselopt OCCURS 10.
    * Definition of field name and select option range table
      TYPES: BEGIN OF ty_frange,
               fieldname TYPE rsdstabs-prim_fname,
               selopt_t TYPE ty_selopt_t,
             END OF ty_frange.
      TYPES: ty_frange_t TYPE ty_frange OCCURS 10.
      TYPES: BEGIN OF ty_range,
               tablename LIKE rsdstabs-prim_tab,
               frange_t TYPE ty_frange_t,
             END OF ty_range.
      TYPES: ty_range_t TYPE STANDARD TABLE OF ty_range.
      DATA: it_ranges TYPE ty_range_t.
    * work areas
      DATA: gs_ranges TYPE ty_range.
      DATA: gs_frange TYPE ty_frange.
      DATA: gs_selopt TYPE rsdsselopt.
      DATA: gt_ranges TYPE ty_range_t.
      DATA: gt_frange TYPE ty_frange_t.
      DATA: gt_selopt TYPE ty_selopt_t.
    * Definition of the fields list avaiable
      TYPES: ty_fields TYPE STANDARD TABLE OF rsdsfields.
      DATA: it_fields TYPE ty_fields.
      DATA: gs_fields TYPE rsdsfields.
    * END Dynamic Range Selection --------------------------------------------
      CALL FUNCTION 'FREE_SELECTIONS_INIT'
        EXPORTING
          kind         = 'T'
        IMPORTING
          selection_id = gv_selid
        TABLES
          tables_tab   = gt_tables.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
        EXPORTING
          selection_id    = gv_selid
          title           = 'Select WHERE criteria for Rule'(s12)
          as_window       = 'X'
          start_row       = 7
          start_col       = 10
        IMPORTING
          field_ranges    = it_ranges
        TABLES
          fields_tab      = it_fields
        EXCEPTIONS
          internal_error  = 1
          no_action       = 2
          selid_not_found = 3
          illegal_status  = 4
          OTHERS          = 5.
    Edited by: Rocco Scocco on Jun 17, 2010 3:48 PM
    Edited by: Rocco Scocco on Jun 17, 2010 3:49 PM

  • Dynamic select-options using parameter

    Hi experts,
    It the user selects one value from dropdown list, it should generate one select-option using that name. Is it possible?
    for example, (pls see my code).
    If user selects 'Malek' from parameter, <b>and press 'ENTER'</b>
    <b>select-option should display with that name</b> like
    Malek      malek-low  malek-high
    And if user selects some other like 'Amran'. It should generate(and append)
    Malek      malek-low  malek-high
    amran      amran-low amran-high
    and so on....
    report c.
    data: t_return like ddshretval occurs 0 with header line.
    data: begin of t_names occurs 0,
           name like usr01-bname,
          end of t_names.
    parameters : i_inspec like usr01-bname.
    at selection-screen on value-request for i_inspec.
      perform get_names.
    form get_names.
      t_names-name = 'Malek'.
      append t_names.
      t_names-name = 'Amran'.
      append t_names.
      t_names-name = 'Ow CC'.
      append t_names.
      t_names-name = 'titbit'.
      append t_names.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield    = 'T_NAMES-NAME'
          dynpprog    = sy-cprog
          dynpnr      = sy-dynnr
          dynprofield = 'I_INSPEC'
          value_org   = 'S'
        tables
          value_tab   = t_names.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno with
        sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      read table t_return index   1.
    endform.                    "GET_NAMES
    Reward guaranteed,
    thanks
    kaki

    Use At selection-screen output,use screen internal table..
    User Dynamic Selection
    at selection-screen output.
      select single * from t000md.
      loop at screen.
        case screen-group1.
          when 'REL'.
            if not  p_old is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'BEL'.
            if not p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'ARB'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'MTA'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
        endcase.
      endloop.

  • Dynamic select options

    Hi,
    I need help in creating dynamic selections.
    I am working on a report program. My requirement is to generate the dynamic selection fields based on the
    name of table.
    There is a selection parameter as table name. When user enter table name and hit enter first 3 fields in the
    table should appear as select-options below the table name.
    Am not able to figure it out, plz help me.
    Thanks,

    Part 2
    PARAMETERS: p_table TYPE ddobjname DEFAULT 'T000'.
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECT-OPTIONS: s_fld01 FOR (lv_field01) MODIF ID f01.
    SELECT-OPTIONS: s_fld02 FOR (lv_field02) MODIF ID f02.
    SELECT-OPTIONS: s_fld03 FOR (lv_field03) MODIF ID f03.
    SELECT-OPTIONS: s_fld04 FOR (lv_field04) MODIF ID f04.
    SELECT-OPTIONS: s_fld05 FOR (lv_field05) MODIF ID f05.
    SELECT-OPTIONS: s_fld06 FOR (lv_field06) MODIF ID f06.
    SELECT-OPTIONS: s_fld07 FOR (lv_field07) MODIF ID f07.
    SELECT-OPTIONS: s_fld08 FOR (lv_field08) MODIF ID f08.
    SELECT-OPTIONS: s_fld09 FOR (lv_field09) MODIF ID f09.
    SELECT-OPTIONS: s_fld10 FOR (lv_field10) MODIF ID f10.
    SELECT-OPTIONS: s_fld11 FOR (lv_field11) MODIF ID f11.
    SELECT-OPTIONS: s_fld12 FOR (lv_field12) MODIF ID f12.
    SELECT-OPTIONS: s_fld13 FOR (lv_field13) MODIF ID f13.
    SELECT-OPTIONS: s_fld14 FOR (lv_field14) MODIF ID f14.
    SELECT-OPTIONS: s_fld15 FOR (lv_field15) MODIF ID f15.
    SELECT-OPTIONS: s_fld16 FOR (lv_field16) MODIF ID f16.
    SELECT-OPTIONS: s_fld17 FOR (lv_field17) MODIF ID f17.
    SELECT-OPTIONS: s_fld18 FOR (lv_field18) MODIF ID f18.
    SELECT-OPTIONS: s_fld19 FOR (lv_field19) MODIF ID f19.
    SELECT-OPTIONS: s_fld20 FOR (lv_field20) MODIF ID f20.
    SELECTION-SCREEN END OF SCREEN 500 .
    Regards,
    Rich Heilman
    Edited by: Rich Heilman on Dec 8, 2009 2:41 PM
    Edited by: Rich Heilman on Dec 8, 2009 2:41 PM

  • Problem in creating dynamic select-options creating from ';' seperated file

    Hi all,
    My requriement is selection screen fields will come from a flat file like below(first row is field names and remaining r field values)
    For example for VBAK table
    VBELN;VKORG;VTWEG;SPART
    3999202;B227;BD;XX
    file can be vary(number of fields)  and based on table .
    Please let me know how can i convert this file in to the selection-screen fields and how can i pass these values in the select statement WHERE condition....
    Thank you very much,
    Krishna D

    Hi,
    First Split the Data using Field Symbold.Because you don't know how many fields are there in the text file.
    Pass the values to the below Syntax
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
    declares a node <node> of a logical database for dynamic selections in the selection include.
    You have an Example in the Below Link.
    http://help.sap.com/SAPhelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/content.htm
    Thanks,
    Venkat.
    Edited by: Venkatesh Kolluru on Mar 4, 2011 6:32 AM
    Edited by: Venkatesh Kolluru on Mar 4, 2011 6:32 AM

  • Getting content and address of select-options (created dynamically)

    Hi guys,
    Suppose I have a dynamically created select-options in a program
    SELECT-OPTIONS it_ranges FOR ...
    Let's say I can determine its name ( IT_RANGES ) only during program execution.
    Now I know I can use field symbols to get its content like below:
    FIELD-SYMBOLS: <fs>.
    "here I will have content of the table in <FS>
    ASSIGN ('IT_RANGES[]') TO <fs>.
    ...but I would like to know how can I get the content of this select-options table through date reference
    TYPES: BEGIN OF t_ranges,
            sign TYPE c,
            option(2) TYPE c,
            low TYPE i,
            high TYPE i,
           END OF t_ranges.
    "let say tt_ranges is of the same type like IT_RANGES
    TYPES: tt_ranges TYPE TABLE OF t_ranges.
    DATA: ref TYPE REF TO data.
    CREATE DATA ref TYPE tt_ranges.
    The above will only create typed reference to table but I want it to point to my table IT_RANGES. The statement below don't work here.
    GET REFERENCE OF ('IT_RANGES[]') INTO ref.
    Is there any other way I can get (using data reference)?
    1) address of this select-options table
    2) content of this select-options table
    Thanks for help in advance
    M.
    Edited by: Marcin Pciak on Nov 28, 2008 11:33 AM

    Statement CREATE DATA would only make sense when you are trying to create the dynamic select options. You can use the addition TYPE HANDLE in order to create the Range Table. Check method implementation CREATE_RANGE_TABLE in class CL_WDR_SELECT_OPTIONS.
    Once the Select-option is created, you need to use the GET REFERENCE to get the data reference of the Select-options. We can't specify the dynamic reference with brackets in the GET REFERENCE statement. So, you need to use the field-symbols to do the dynamics.
    DATA: ref TYPE REF TO data.
    DATA: ref_fs TYPE REF TO data.
    FIELD-SYMBOLS: <fs>.
    DATA: w_range TYPE i.
    SELECT-OPTIONS it_rang FOR w_range.
    START-OF-SELECTION.
      GET REFERENCE OF it_rang[] INTO ref.
      ASSIGN ('IT_RANG[]') TO <fs>.
      GET REFERENCE OF <fs> INTO ref_fs.
      write: 'done'.
    Regards,
    Naimesh Patel

  • Select option in dialog, in a table control

    Hi Friends,
    My need is creating dynamic select options in a table control in dialog screen. How can I do my desire?
    Thanks.

    Hi,
    You can make use of
    FREE_SELECTIONS_INIT
    and
    FREE_SELECTIONS_DIALOG
    Please see the  documentation
    a®s

  • Regarding selection options

    whan i am using select-options prior to this i what to display check  box on the same line.
              when i am selecting the this check box it should execute automaticall
    could u plz explain the code clearly with example.

    search forums.
    Re: Dynamic Selection Options
    Posted on: Jul 17, 2006 5:50 PM, by user: Praveen -- Relevance: 100% -- Show all results within this thread
    am doing exactly as you had stated. But the user wants to see it something like this: 1. For the selection options, he wants to see three box's. a. Technical Name of the field selection. b. ...
    Re: regarding selection options
    Posted on: Mar 15, 2007 8:46 AM, by user: SHIBA DUTTA -- Relevance: 99% -- Show all results within this thread
    you have to use begin of line and end of line. SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN COMMENT 1(10) TEXT-001 FOR FIELD P1. PARAMETERS: ...
    Re: Restricting selection-options
    Posted on: Jan 18, 2005 8:58 AM, by user: Andreas Mann -- Relevance: 90% -- Show all results within this thread
    FOR vbak-vbeln OBLIGATORY DEFAULT '5300000000'. INITIALIZATION. PERFORM init_1001. START-OF-SELECTION. SELECT belnr FROM bkpf INTO bkpf-belnr WHERE bukrs = '0001' AND ...
    Check that at least on Selection Options are filled
    Posted on: May 25, 2006 4:37 AM, by user: Boater -- Relevance: 90% -- Show all results within this thread
    I have a program that has four selection options. The user needs to enter a selection for at least one of the four selection options. ...
    possible entry for selection-options
    Posted on: Feb 22, 2007 7:32 AM, by user: Tiwa Noitawee -- Relevance: 89% -- Show all results within this thread
    F-1 At last 3 alphabets of Prod.hierarchy is Product line (EX1, PC5) that users have to choose via selection-options like this <b>EX1</b> EXCEL 251 : F-1 <b>PC5</b> POWERTOP W-200 ...
    select-options multiple selection
    Posted on: Mar 5, 2007 3:06 AM, by user: venkateswarao gangavarapu -- Relevance: 87% -- Show all results within this thread
    hi can u send code for getting multiple selections in select-options Thanks in advance venkat ...
    Submitting Report with selection screen options
    Posted on: Apr 27, 2005 5:45 PM, by user: Rajesh Nittala -- Relevance: 85% -- Show all results within this thread
    Hi all, I have a situation, in my report i am using a selection screen which contains input select-options are store(range), date (from ..to)....after that ...
    sample program to remove standard selection-options & replace user defined.
    Posted on: Dec 7, 2005 5:37 AM, by user: Josephine Clara Arokiasamy -- Relevance: 83% -- Show all results within this thread
    The standard selection-options are provided for the logical database. i need to supress the standard selection-options ...
    Adding default value for a select-options in a selection-screen
    Posted on: May 26, 2006 11:51 AM, by user: sid alpay -- Relevance: 77% -- Show all results within this thread
    hello gurus, i have a report program with the following select-options in a selection-screen block:
    select-options: so_site for MyTable-werks.
    i want the so_site ...
    Adding Selection Options Fields in Report(Using Query)
    Posted on: Aug 25, 2004 5:26 AM, by user: lijo joseph -- Relevance: 76% -- Show all results within this thread
    Hi, how can we add Selection Fields Options in Query Reports Which we create using SQ01. I need a default option by which ...
    Getting the selection parameters/options in a diffrent program
    Posted on: May 11, 2006 3:05 AM, by user: Chad Cheng -- Relevance: 75% -- Show all results within this thread
    use Submit to get a report from a diffrent program and I am using variants to get the value of the selection criteria. However, for a less tedious approach, I think it would be better if I get the selection ...
    Read options from selection-screen
    Posted on: Aug 24, 2006 3:30 PM, by user: Silke Eng -- Relevance: 75% -- Show all results within this thread
    Hi Kiran, as all other questions are answered already, remains the one on the select-options. Function module <b>RS_REFRESH_FROM_SELECTOPTIONS</b> returns those. Kind regards, Silke ...
    Selection screen for SAP Query: OR between options
    Posted on: Jun 29, 2006 3:04 PM, by user: Tania Pouli -- Relevance: 74% -- Show all results within this thread
    need a variant where either of two fields should not be 0. Is there some way to add an OR between two selection options? I can't change the actual query because it's used with many other variants. Thanks ...
    Pass internal table of selection-options through method!
    Posted on: Nov 22, 2004 3:49 PM, by user: Frank Roels -- Relevance: 74% -- Show all results within this thread
    I created a selection screen with multiple select-options. Now I want in a method of a class work with the internal ...
    select-options: at selection-screen on value-request
    Posted on: Sep 18, 2006 10:51 PM, by user: Sumit Agarwal -- Relevance: 72% -- Show all results within this thread
    one field is dependent on the values of the other field in the select-options. I am using the "at selection-screen on value-request event on" to populate the select-options field, S_AUFNR, that is dependent ...
    Pages: 16 [ 1 2 3 4 5 6 7 8 9 10 |

  • RFDOPR10 dynamic selection to add customer group field

    Hello,
    I am trying to add the customer group field in the dynamic selection
    option, when running the RFDOPR10 report. I don't seem to find the
    option to add the customer group field (KNVV-KDGRP). I tried looking in
    the config, but was not able find this report. I also looked for any
    OSS notes, but didn't find anything either.
    Can anyone please tell me if this possible to do? Thanks.
    Ahsan

    you have to update all the following routines in program RM07MLBD which load stock
    IF      BWBST = 'X'.
    *   select the valuated stocks
        PERFORM                  AKTUELLE_BST_BWBST.
      ELSEIF LGBST = 'X'.
    *   all own stock from storage locations or batches
        IF XCHAR = ' '.
          PERFORM                AKTUELLE_BST_LGBST_MARD.
        ELSEIF  XCHAR = 'X'.
          PERFORM                AKTUELLE_BST_LGBST_XCHAR.
        ENDIF.
      ELSEIF   SBBST = 'X'.
    *    special stocks
        CASE    SOBKZ.
          WHEN  'O'.
            PERFORM              AKTUELLE_BST_SBBST_O.
          WHEN  'V' OR  'W'.
            PERFORM              AKTUELLE_BST_SBBST_V_W.
          WHEN  'K' OR  'M'.
            PERFORM              AKTUELLE_BST_SBBST_K_M.
          WHEN  'Q'.
            PERFORM              AKTUELLE_BST_SBBST_Q.
          WHEN  'E'.
            PERFORM              AKTUELLE_BST_SBBST_E.
          WHEN  OTHERS.
    *       Angegebener Sonderbestand nicht vorhanden.
            MESSAGE S290.
            PERFORM              ANFORDERUNGSBILD.
        ENDCASE.
      ENDIF.
    But as material group is in MARA, you could fill a table from MARA using the SELECT-OPTIONS FOR MARA-MAKTL, then update the routine using a FOR ALL ENTRIES OF the result table (if not empty) (you could also use a JOIN with MARA)
    Regards

  • Working with dynamic selection screen in LDB FMF

    Hi Guys,
    I am working with LDB FMF and I have a requirement where user need the selection field in initial screen which is already comming in dynamic selection option.
    Is it possible without changing the standerd LDB.
    Atul
    Edited by: Atul Dhariwal on Jun 16, 2009 6:27 AM

    Hi,
    my requirement is to list fields from dynamic selection to appear in the main selection screen.
    user doesn't want's to click on dynamic selection option and select the fields.
    I hope i am clear this time.
    Atul

  • Making dynamic selection parameter an onscreen parameter

    Dear Experts,
    I am search on threads regarding defining new fields and adding fields to dynamic selection options, however I have not found an answer to my issue. I need to add a field XBLNR (Reference) currently in the dynamic selections of FBL1N and FBL3N into the general selection parameters in the entry screen.  Option of user going through the dynamic selection and creating variant of FBL1N is not optimal. It is prefered to have the field XBLNR (Reference) as an on screen parameter.
    How can I achieve this? I checked SE36 and OBVU to no avail. Did I miss something?
    Thanks for your time, Deb

    Also check this out:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e0039a-0d79-2c10-0aaf-9f6c062c0ffb?QuickLink=index&overridelayout=true
    http://ficoexpertonline.com/archive/Volume_05_(2006)/Issue_05_(May)/V5I5A2.cfm?session=

  • How can i create a dynamic structure based on my input from a select-option

    Hello,
    This is to develop a custom report in FI for G/L Balance based on company code.
    I have an input select-option for Company code.
    Based on the range of company code my output layout should be modified.
    I am not very much sure to create a dynamic internal based on the input from a select-option.
    Can any one please let me know how can i do this.
    I would appreciate for anyone who turns up quickly.
    Thank you,
    With regs,
    Anitha Joss.

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Help with scrolling photo gallery

    I'm using the code below to for a scrolling photo gallery. I got this from another forum on Adobe. My problem is that I can't get my images to upload. I uploaded this for an image but it's not working: <img src="images/baca_poster_small.jpg" data-cyc

  • Why does my form load in the wrong position on some pages?

    I have a contact form on the Master Page of my site which periodically loads off set to the left on some pages.   It doen't always do it and it only does it on some pages, which makes no sense as it's a Master Page element. On the below page the form

  • Can't edit Text Field Properties in Bulk, tabs dissapear?

    I'm using Adobe Acrobat X Pro and I can't seem to be able to bulk edit Text Field Properties... when selecting 1 cell, I get the following tabs: General | Appearance | Options | Actions | Format | Validate | Calculate But when I select multiple cells

  • BLOBs and Inserting Images

    Hi, I'm trying to insert an image into the database using a BLOB datatype. I'm using PHP right now to code everything. I was wondering if anybody has resolved any of the errors I've gotten, or knows how to insert images into the database. I don't hav

  • SAPGui-Iview with Modzilla Firefox opens default in a new-window

    Hello, i have created a portal role which include SAPGUI-Iviews. With Internet-Explorer apllications are working fine and integrated.With Modzilla Firefox(1.5) the gui iviews are opened outside the portal page and for each GUI-Iview call the modzilla