Alphanumeric values in Select-Options

Hi ABAP gurus,
There is a select-options for a report like
data : opt1(4) type c.
select-options : g_count for opt1.
g_count would take alphanumeric values like for example
A123 to AB46  . Now it is required to take all the values range
from A123 to AB46 in an internal table .
How do i solvthis .
thanks
ABAP Developer1

hi  ,
it is not possible for select-option to get values between  'A123'  AND 'AB1234' ETC ...
you have to pass those values with  static values  while passing  in selection screen .
OR  you can maintain one table with this values and after selecting those  values  you can pass through ranges  .
regards
Deepak.

Similar Messages

  • Getting values from select option

    Hi,
    I have a requirement where the user is going to pass values in select-option  in low and high. lets say s_bwart(movement types).
    now i have to fetch this bwart values into an internal table.
    my internal table will be having only one field that is bwart. so how do i populate my internal table with those values. could any body help me in this.
    Thanks in advance
    neha

    Hi, when using SELECT-OPTIONS, use can pretty much do any kind of selection he wants, including ranges, and excluding values, so the best way to handle it is to select from the data base when the user executes the report.  for example.
    data: begin of ibwart occurs 0,
          bwart type mseg-bwart,
          end of ibwart.
    select-options: s_Bwart for mseg-bwart.
    start-of-selection.
    select bwart into table ibwart
               from <b>T156</b>
                     where bwart in s_bwart.
    Regards,
    Rich Heilman

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • How to set default value in select option for ABAP query

    Hi experts,
    What is the way to set up default values for select-options in ABAP query.
    e.g.
    I have one field 'Year' in my ABAP query selection screen.
    I want value of current year to be appeared here whenever user execute report
    Thanks in Advance
    -Harkamal

    Hi Harkamal,
    execute your Query via SQ01. On Selection-Screen
    goto save Variant. Mark your field
    as selection variable an press Button election variable.
    Take variable from TVARV and use it.
    Than save the Variant.
    Look at TVARV if the 'Year' is updated to the actualYear!
    regards, Dieter

  • How to Captured Value into Select-Options Range Table Without "Enter"

    Hi,
    I defined a set of Select-Options in the Web Dynpro. I found that the value for the Select-Options will not be captured whenever I manually type in the value instead of choosing it from F4 Help Drop Down.
    However, this problem can be resolved if I manually type in the value for Select-Options in the Selection Field and I press "Enter". Without pressing "Enter" value will not be captured.
    Any solution for this issue? Please help.

    Hi Kris,
    My problem is only when the user key in the value themselves rather than choosing it from Select-Options drop down value. Most of the time user will know what value to key in and will skip the step to choose from the Drop Down List. Thus, if this happen, the value keyed in by the user will not be able to capture into the range table.
    I am using this logic to capture the value for selection item:
      wd_this->m_helper->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Values From Selection Screen
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PERNR`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_pernr>.
          WHEN `BUKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_bukrs>.
          WHEN `STAT2`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_stat2>.
          WHEN `WERKS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_werks>.
          WHEN `BTRTL`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_btrtl>.
          WHEN `PERSG`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persg>.
          WHEN `PERSK`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persk>.
          WHEN `ABKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_abkrs>.
          WHEN `BEGDA`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_begda>.
        ENDCASE.
      ENDLOOP.
    E.g. User key in the BUKRS without using the Drop Down Value provided by the Select-Options. For this case, <fs_bukrs> table will be initial as no value is captured.
    Edited by: Girish Nabar on Apr 21, 2011 8:55 AM

  • Passing value to select options screen.

    Hi All,
    Can anybody help me how to pass a value to select option screen from another screen?
    It's like a user enters a value in a input field and press a button to navigate to the next screen which contains the select option fields.How can i show the value enterd in the previous screen to be shown in one of teh  input field in the select option screen.

    Hi,
    Store the values that you have to pass in a global variable declared in component controller and
    Use the following piece of code in the second view,
    DATA: lt_range_table TYPE REF TO data,
              rt_range_table TYPE REF TO data,
              read_only TYPE abap_bool,
              typename TYPE string.
    * create a range table that consists of this new data element
      lt_range_table = lo_r_helper_class->create_range_table( i_typename = 'MATNR' ).
    FIELD-SYMBOLS: <tab> TYPE INDEX TABLE,
    <struct> TYPE ANY,
    <wa> TYPE ANY,
    <option> TYPE char2,
    <sign> TYPE char1,
    <high> TYPE ANY,
    <low> TYPE ANY,
    <wa_values> TYPE ANY.
    ASSIGN lt_range_table->* TO <tab>.
    APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
    ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
    ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
    ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
    ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
    <sign> = 'I'. "Default sign which you want to give
    <option> = 'EQ'. "Default option you want to give
    <low> = 'M-01'." pass your valriable name here
    *<high> = 'High_value'.
    * add a new field to the selection
      lo_r_helper_class->add_selection_field( i_id = 'S_MATNR'
      i_description = 'Material'
      it_result = lt_range_table ).
    Regards,
    Radhika.

  • Values of select-option in various variants

    Hi all,
    does anybody know a report to determine the values of a specific select-option in various variants of a program?
    I know the function module RS_VARIANT_CONTENTS to get the values of select-options in one variant of a program (TABLES-parameter VALUTAB), but I need it for many variants (like a prgram which calls the function module for all variants of a program).
    Does anybody know a possibility?
    Thanks
    Daniel

    You will probably have to write your own code for this. You could still check the where-used-list of RS_VARIANT_CONTENTS (or related function modules in the same function group) to see if there is any available standard program for your purpose.
    If you find one, please let us know here in this thread.
    Thomas

  • Default  value for select options.

    Hi folks
    I have to default four values in select-options.
    eg.,
    S_lfart for likp-lfart, default zse, zin, znd, zps.
    Thanks in Advance,
    Rao

    Hi,
    Go through the following syntax:
    SELECT-OPTIONS <sel> FOR <f>
                   [DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>]
                   [MEMORY ID <pid>]
                   [LOWER CASE]
                   [OBLIGATORY]
                   [NO-DISPLAY]
                   [MODIF ID <key>]
                   [NO-EXTENSION]
                   [NO INTERVALS]
                   [NO DATABASE SELECTION].
    Declares a selection table <sel> for the field <f>. For <sel>, places input fields on the corresponding selection screen. The additions allow you to set a default value, accept input in lowercase, define a required field, suppress or modify the display on the selection screen, restrict the selection table to a line or a selection to a single field, or prevent input from being passed to a logical database
    Regards,
    Bhaskar

  • Set of default values for Select-Options

    Hi Gurus,
    I have a requirement where I need to set default values for select options
    ex: SELECT-OPTIONS: S_MTART FOR MARA-MTART
    default values must be ERSA - HIBE- FHMI - DIEN - GEST
    Please tell me how to do it.
    Effective replies will be rewarded with full points
    Karthik

    Hi,
    For each SELECT-OPTION, you can only specify one DEFAULT.
    You must specify the default value g in its internal format, e.g. "SELECT-OPTIONS DATE FOR SY-DATUM DEFAULT '19931224'", not "... DEFAULT '24.12.1993'".
    The default value g should normally be a literal because, at runtime when you use SUBMIT, it is transferred to the selection options table sel so early that no value can be assigned to the field g. System fields like SY-DATUM are an exception here because the system usually assigns values to them as soon as the report processing starts.
    When you use user-defined selection screens in your programs that you do not call using SUBMIT, the DEFAULT value is transfered when the selection screen is first called. In this case, therefore, you can use other fields g.
    regards,
    sowjanya
    Message was edited by: sowjanya suggula

  • Difference between Multiple single values and Selection option variables

    Hi !
    Can any one tell me the difference between variable types:
    Multiple single values and Selection option?
    I used each one of them for selecting values for a characteristic but could not notice a difference in choosing values.
    Is there some difference in functionality or can they be used interchageably?
    Regards,
    Sri Harsha

    Harsha,
    When you go for slection option, in the variable input screen you will be having a button in the last where you can give your slections. There you can maintain either multiple single values and Multiple intervals or else not equal to also..
    Just check out there... you will be having tabs for each..
    Assign Points if it helps
    Gattu

  • How to assign list of default value for select-option variable???

    Hi every one
    This is Deepak,
    I want to know how to assign list of default value to select-option variable ? please any body tel me solution
    for example
    select-option matnr for mara-matnr default ..............and here i want to give more than 1 values that will be default value and use can choose any one at the time of input .
    Thank you in advance
    Deepak

    Hi.
    Check the following sample code.
    REPORT ztn_test.
    " It is example for list populating.
    TABLES:knvp.
    data: BEGIN OF itab OCCURS 10,
          kunnr like knvp-kunnr,
          END OF itab.
    data: wa_itab like itab.
    TYPE-POOLS: vrm.
    DATA: name TYPE vrm_id,
    list TYPE vrm_values,
    value LIKE LINE OF list.
    PARAMETERS: s_kunnr(20) type c  as LISTBOX VISIBLE LENGTH 40 .
    AT SELECTION-SCREEN OUTPUT.
    SELECT kunnr from knvp  into  CORRESPONDING FIELDS OF TABLE itab WHERE parvw = 'SP'. " SP for ur requirement
    " I have used loop to populate some values from table
    loop at itab into wa_itab.
      name = 'S_KUNNR'.
      value-key = sy-tabix.
      value-text = wa_itab-kunnr.
      append value to list.
      clear wa_itab.
    endloop.
    " If u want individaully assign the values change the code as
    name = 'S_KUNNR'." Select option name
      value-key = 1." Index
      value-text = 'VAL1'.
      append value to list.
    name = 'S_KUNNR'." Select option name
      value-key = 2." Index
      value-text = 'VAL2'.
      append value to list.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING id = name
    values = list.
    Edited by: tahir naqqash on Feb 21, 2009 4:38 PM

  • How to pass values to select options of custom transactions?

    I have to call custom transaction-ZMM_POST  from my custom report.
    I have to pass values to select options(Not to parameters) of ZMM_POST  from my report only.
    Please tell me how to pass values to select options of custom transactions?

    Have you tried this?
    DATA: T_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS WITH HEADER LINE.
    T_RSPARAMS-SELNAME = "S_BUKRS".
    T_RSPARAMS-KIND = "S".
    T_RSPARAMS-SIGN = "I".
    T_RSPARAMS-OPTION = "BT".
    T_RSPARAMS-LOW = "100".
    T_RSPARAMS-HIGH = "300"
    APPEND T_RSPARAMS.
    SUBMIT Z_DUMMY WITH SELECTION-TABLE  T_RSPARAMS.
    Greetings,
    Blag.

  • Passing multiple values to select-option low by submit at one go from zpro.

    Hi all,
    I have a requirement pass descrete multiple values form my z-program to to select-option low on selction screen of standard SAP program using SUBMIT statment at one go.At the same time select-option high will be empty.I will be thankful if anybody can help me in this regard.
    Sandeep.

    Hi Check this link...on submitting programs
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db9d7535c111d1829f0000e829fbfe/frameset.htm
    here is the code . we are calling the same program....you can call any other program as well.
    REPORT  demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS      paramet(14) TYPE c.
    SELECT-OPTIONS  selecto FOR number.
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
          rspar TYPE TABLE OF rsparams,
          wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
         / 'Selection 2'.
    AT LINE-SELECTION.
      CASE sy-lilli.
        WHEN 4.
          seltab-sign = 'I'. seltab-option = 'BT'.
          seltab-low  = 1.   seltab-high   = 5.
          APPEND seltab.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH paramet eq 'Selection 1'
                          WITH selecto IN seltab
                          WITH selecto ne 3
                          AND RETURN.
        WHEN 5.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
          wa_rspar-low  = 14.  wa_rspar-high = 17.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
          wa_rspar-low  = 'Selection 2'.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
          wa_rspar-low  = 10.
          APPEND wa_rspar TO rspar.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          AND RETURN.
      ENDCASE.

  • Providing Default values to Select-Options in WD ABAP

    Dear Experts,
    Using reusable component  WDR_SELECT_OPTIONS im able to create select-options successfully ... I need your guidance to provide default values(type date) on the same select-options.
    Thanks a lot.
    Regards
    Siva Mandapudi.

    I do not see the relevance of this thread to FPM. Please follow this thread for your solution.
    [Default the value in  Parameter in wdr_select_options|Default the value in  Parameter in wdr_select_options]

  • Default Values for Select-options In Webdynpro-ABAP

    Hi Freinds,
    Kindly,Help me in setting the Default values for the Select-options in Webdynpro ABAP.
    Here the Node and the Attributes are Created Dynamically, and then Displayed Select-options Component View.
    Regards,
    Xavier.P

    Xavier Reddy Penta sent me this question via email and I answered it directly yesterday. Here is the solution that I provided to him, so that it is stored with the original question:
    I believe your problem is that you are not setting the value into the range correctly.  You are setting it directly into the field symbol of the range like such:
    <FS> = L_STRING2.
    But ranges are deep objects. They have four fields: Sign, Option, High, and Low. This is from the online help:
    1.     sign of type c and length 1. The content of sign determines for every row whether the result of the condition formulated in the column is included or excluded in the entire resulting set for all rows. Evaluable values are "I" for include and "E" for exclude.
    2.     option of type c and length 2. option contains the selection option for the condition of the row in form of logical operators. Analyzable operators are "EQ", "NE", "GE", "GT", "LE", "LT", "CP" and "NP" if column high is initial, and "BT", "NB" if column high is not initial. With the options "CP" and "NP", the data type of the columns low and high must be of the data type c, and special rules apply for entries on the selection screen.
    3.     low of the data type defined after FOR. This column is designated for the comparison value or the lower interval limitation.
    4.     high of the data type defined after FOR. This column is designated for the upper interval limitation.
    So when you are moving the value into the field symbol you are setting it into the sign column.
    Here is an example of how you can access the components of the range:
    * create a range table that consists of this new data element
        lt_range_table =
          wd_this->lv_sel_handler->create_range_table(
               i_typename = l_typename ).
        IF l_fieldname = 'CARRID'.
          FIELD-SYMBOLS: <tab>         TYPE INDEX TABLE,
                             <struct>      TYPE ANY,
                             <wa>          TYPE ANY,
                             <option>      TYPE char2,
                             <sign>        TYPE char1,
                             <high>        TYPE ANY,
                             <low>         TYPE ANY,
                             <wa_values>   TYPE ANY.
          ASSIGN lt_range_table->* TO <tab>.
          APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
          ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
          ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
          ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
          ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
          <sign> = 'I'.
          <option> =  'EQ'.
          <low> = 'AA'.
        ENDIF.

Maybe you are looking for

  • How to get the data from multiple nodes to one table

    Hi All, How to get the data from multiple nodes to one table.examples nodes are like  A B C D E relation also maintained Regards, Indra

  • Acrobat Reader 11 closes immediately, won't open pdf's

    Just reformatted mioy computer and upgraded to Windows 7 Ultimate, now I cannot open PDF's - the reader closes immediately - doesn't open the PDF at all.  I can't even open Reader XI by itself.  I tried uninstalling and rolling back to Reader 10... s

  • Iphone 5 stuck at logo sign

    My Iphone 5 began to restart by itself for no reason. I proceeded to reset all of the settings back to default. It appeared to be working until it stopped loading. Now, it's just stuck on the Apple logo. I've searched for every possible way to fix it

  • Lenovo ix2 cannot create shared folder

    Hi all! I have made a factory reset of my ix2, keeping user names but deleting all shared folders and content. Now I want to create new shares but got error message saying "creattion new shares not possible because of problem with status of pools.  C

  • How to make a shortcut?

    In the Finder, the shortcut Shift-⌘-A brings up the Applications window while Shift-⌘-D shows the desktop. Is it possible to set other Finder shortcuts e.g. to bring up a documents window. I can't figure out how to do it using System Preferences - Ke