Select-options and parameters

hi,
In How many ways we can define select-options and parameters.

hi uday,
Usually we use PARAMETERS for single value input and
SELECT-OPTIONS is used to give a range of input values for a single field
SELECT-OPTIONS implicitly consists of internal table with fields
OPTIONS
LOW
HIGH
SIGN
eg:
      DATA: G_VBELN TYPE VBAK-VBELN.
      SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
      PARAMETERS : P_VBELN LIKE VBAK-VBELN.
      SELECT-OPTIONS: S_VBELN FOR G_VBELN.
      SELECTION-SCREEN END OF BLOCK B1.
   o/p:
          P_VBELN: _________________.
         S_VBELN:___________ TO  ____________.
reward if helpful
regards.
shashikanth naram.

Similar Messages

  • Select-options and Parameters, when to use what?

    Hi gurus,
    I have been using Parameters for long. Now I want to choose a range of values, which I need to retrieve from database.
    I tried using select-options. Can't I use 2 parameters that is parameter1 and parameter2 and mention query BETWEEN para1 AND
    para2, and when I use NO INTERVALS and NO EXTENSION together, it behaves same like parameter, then why did SAP gave these
    extensions.

    Hi friend,
    Simple differences between Select-options and parameters.
    Select-Options Uses keyword 'for'                         
    Parameters Uses keywords 'like', 'type'     
    Select-Options  Uses operator 'in'                         
    Parameters Uses operator '='
    Select-Options  Provides ranges for selection     
    Parameters  No ranges only single value
    Select-Options Creates selection table                              
    Parameters No selection table
    Select-Options  When i/p blank all records selected          
    Parameters   When i/p blank none is selected
    Note:
    Select options can act as parameters by using 'no-extension' 'no intervals', but all records will be selected when i/p is blank unlike parameters.
    Might be helpful..
    Thanks...
    Edited by: Guest77 on Feb 10, 2009 5:44 AM

  • HI major diffrence in select-options and parameters

    Hi,
      Can any one explain me the major diffrence between select options and parameters.
    I know that in select options we can give a range of values and in parameter one value.
    Thanks

    Hello Hari,
    I would see following differences:
    1. As you have mentioned, many values/ranges can be given in the SELECT-OPTIONS. However, the parameter can hold only one value.
    2. In the run time, we see the data w.r.t a select option as an Internal table and Parameter may be accessed as a global variable.
    3. Consider following statements:
       a. select-options: s_matnr for mara-matnr no-extension no intervals.
       b. parameters: P_MATNR like mara-matnr.
    Both the statements look same on the selection screen.
    consider the SQLs:
    <b>select * into corresponding fields of table g_t_mara
    from mara
    where
    matnr in s_matnr.</b>
    and
    <b>select * into corresponding fields of table g_t_mara
    from mara
    where
    matnr eq p_matnr.</b>
    both the SQLs give the same output if the user gives a material number on Selection screen.
    If the user does NOT give any input in selection screen, the first SQL will fetch all data from DB, whereas the SQL with the PARAMETER will fail.
    So I think we should keep in mind the requirement and code accordingly.
    I hope this helps you.
    Best Regards,
    Murugesh AS

  • Symaltaneous use of select-option and parameters in smartforms .

    hello Abaper,
    I am design a smartforms . we have given some input. when we use only parameters it works properly. as same when we use select-option only its works .
       But when i use both parameter and select option at that time error generate .
      Actually call function is not works .
    So please give me proper idea how to solve this problem .
    Regards
    kamal kishore

    Hi ,
    Still problem is not solved.
    i want to call following fields but function modules show run time error. IF separately i call only parameter its run properly.
    in the same way if i call only select option is runs properly.
    please suggest me how can i call both the things.
    PARAMETERS: P_BUKRS   TYPE BSEG-BUKRS        OBLIGATORY,
                P_GJAHR   TYPE BSEG-GJAHR        OBLIGATORY.
    parameters: P_SECCO type  SECCODE-SECCODE   OBLIGATORY.
    *SELECT-OPTIONS :  P_SECCO FOR  SECCODE-SECCODE   OBLIGATORY.
    PARAMETERS: P_QSCOD   TYPE J_1IEWTNUMGR-QSCOD OBLIGATORY.
    SELECT-OPTIONS: P_BUDAT FOR BKPF-BUDAT        OBLIGATORY,
                P_BLART   FOR BKPF-BLART,
                P_J_HLN   FOR J_1IEWTCHLN-J_1IEXTCHLN,
                P_J_HDT   FOR J_1IEWTCHLN-J_1IEXTCHDT OBLIGATORY,
                P_LIFNR   FOR LFB1-LIFNR.
    regards
    kamal
    Edited by: kamal_kishore_sah on Apr 12, 2011 7:44 AM

  • Select option and parameter.

    I have select options and parameters in my selection screen. While extracting the data I am using both the select option and a parameter in where condition.  But that select statement is not returning any data. Could any body tell me what might be the reason.
    Thanks,
    bsv.

    Hi,
      See this example code it works.
    tables spfli.
    parameters p_carrid type spfli-carrid obligatory.
    select-options s_connid for spfli-connid.
    data itab type table of spfli with header line.
    select *
       from spfli into table itab
    where carrid eq p_carrid
       and connid in s_connid.
    loop at itab.
      write: / itab-carrid,
               itab-connid.
    endloop.
    Note : Dont leave blank for parameters because it take as space and when you select from table it is unsuccessful.
    Plzz Reward if it is useful,
    Mahi.

  • How to create a selection option or parameters in a subarea of the screen

    Hi Experts,
        My program have a screen 1001 and it is splited into two parts: the first is a Subarea for selection option, and the last is a table control. Now I want to create some selection option and parameters in the first subarea just like we do in screen 1000. Do we have any convenient way to do that?
    Thanks in advance
    Joe

    Hi Joe,
    Yes ,it can be done like below code:
    TABLES : mara.
    SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_matnr FOR mara-matnr,
                    s_matkl FOR mara-matkl,
                    s_mtart FOR mara-mtart.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 1001.
    DATA: number(4) TYPE n VALUE '1001'.
    START-OF-SELECTION.
      CALL SCREEN 100.
    in screen flow logic .write below statements.
    first declare the subscreen area  'AREA' in screen.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    CALL SUBSCREEN area INCLUDING sy-repid number.
    PROCESS AFTER INPUT.
    CALL SUBSCREEN area.
    MODULE USER_COMMAND_0100.
    Reward if useful,
    Regards,
    Talwinder

  • Select options and radio button problem

    Hi All,
    In selection screen I have a select option and two radio button default is disable when I input value on select option, it will enable radio button. How can I do this?
    Thanks.
    mlai

    Please go through the below code and reward points if u find it useful:
    tables : pa0000.
    selection-screen begin of block b1 with frame title text-001.
    select-options : s_pernr for pa0000-pernr.
    parameters : r1 radiobutton group g1 modif id abc.
    parameters : r2 radiobutton group g1 modif id abc.
    selection-screen end of block b1.
    at selection-screen output.
    if s_pernr[] is initial.
    loop at screen.
    if screen-group1 = 'ABC'.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.
    else.
    loop at screen.
    if screen-group1 = 'ABC'.
    screen-invisible = 0.
    modify screen.
    endif.
    endloop.
    endif.
    Thanks
    Vasu

  • Passing SELECT-OPTIONS and Internal Tables to SUBROUTINES

    Hi Guys
    In the code below my colleague has created her own table types in order to pass a select option and internal tables to her subroutine. Is there an easier way of making them known to the subroutine.
    data : v_vbeln type vbeln_vf,
          it_bdoc type table of vbrp,
          it_t006 type table of t006a,
          wa_bdoc type vbrp,
          wa_t006 type t006a,
          it_bdoc2 type table of zsswathi_st_vbeln,
          wa_bdoc2 type zsswathi_st_vbeln
    select-options s_vbeln for v_vbeln matchcode object zswathi_vbeln obligatory.
    start-of-selection.
    perform bdoc using s_vbeln[]
                 changing it_bdoc
                          it_bdoc2
                          it_t006.
      loop at it_bdoc2 into wa_bdoc2.
    form bdoc using f_s_vbeln type ZSWATHI_ST_SELECT_OPTION_TA_TY       " all these are table types. for select options, a structure is created and then a table type for it is created.
            changing f_it_bdoc type zswathi_vbrp_ty_ta
                     f_it_bdoc2 type zswathi_vbeln_ty_ta
                      f_it_t006 type ZSWATHI_T006_TA_TY.
    select * from vbrp into table f_it_bdoc where vbeln in f_s_vbeln.
          if f_it_bdoc is not initial.
          select  vbeln sum( netwr ) prsdt from vbrp into table f_it_bdoc2 where vbeln in f_s_vbeln group by vbeln prsdt.
          sort f_it_bdoc2 by vbeln.
          "select * from t006a into table it_t006 for all entries in it_bdoc where msehi = it_bdoc-vrkme.
          select * from t006a into table f_it_t006 for all entries in f_it_bdoc where msehi = f_it_bdoc-vrkme.
       endif.
        endform.

    Hi Brett,
    1. you can use a select-options-range in a FORM subroutine also without passing it as a parameter because parameters and select-option range tables are global fields in their program.
    2. If you need a parameter, declare it as type table or type standard table or type any table. You do not need any special table type.
    Regards
    Clemens

  • How to create a Select-option and a pushbutton together

    Hi Experts,
    I have defined a selection screen in my module pool program and I am including this screen in my Module pool Dynpro. Now, my problem is that if I write the following piece of code to define my selection screen, it gives me an error that "Error when generating the selection screen "1010" of report "ZTESTHIM_MOD" ".
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr NO INTERVALS,
                    s_matkl FOR  mara-matkl NO INTERVALS,
                    s_mtart FOR mara-mtart NO INTERVALS,
                    s_ersda FOR mara-ersda NO INTERVALS.
    SELECTION-SCREEN PUSHBUTTON 10(5) pubu USER-COMMAND test.
    SELECTION-SCREEN END OF SCREEN 1010.
    Please help me whats the reason for this.
    Also, if I define the select-options within a block and pushbutton outside it, the code is working fine.
    The problem is that I want a select-option and a pushbutton in the same line.
    Please help me out.
    Useful answers will be duly rewarded.
    Thanks in advance.
    Regards,
    Himanshu
    null

    Hi,
    You have declared so many select options in one line and also you want to include a push button in the same line, this is not possible.
    Since the visible lenght of the line is less than the number of fields you want to display this will not be possible.
    What you can do is instead group then using
    SELECTIOn-SCREEN BEGIN OF BLOCK b1.
    here use lines
    SELECTION-SCREEN END OF BLOCK b1
    Regards,
    Sesh

  • Select-Options and check box on Selection Screen

    Hi Guru's,
    I have to develop a webdynpro report(static). I have a combination of select options and checkboxes on the selection screen. Can you please help me how to design this static selection screen.
    Thanks,
    Pradeep

    Hi Pradeep,
    WDP ABAP does not directly provide the selection screen options as in ABAP programming.
    You can achieve the selection screen functionality using the WDR_SELECT_OPTIONS component usage. Go through the WDP component WDR_TEST_SELECT_OPTIONS.
    Regards
    Wenonah

  • Select-options and ranges

    Hi all,
    Belated Happy Holi.
    Can u  explain me the difference between
    Select-options and ranges?
    When, where and how to use them ?
    I know the basic differences, but i need to know in deep .
    could u give me the informatin with a scenario please ?
    Thanks in advance
    Ravi

    HI
    <u>SELECT-OPTIONS:</u> Declare an internal table that is also linked to input fields on a selection screen
    <u>RANGES:</u> Declare an internal table with the same structure as in select-options, but without linking it to a selection screen.
    FOR FURTHER DOCUMENTATION PLEASE GO THROUGH THE LINK
    <a href="http://72.14.203.104/search?q=cache:btyoj86smhEJ:www.sap-img.com/abap/difference-between-select-options-ranges.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=1">Difference Between Select-Options & Ranges</a>
    <a href="http://72.14.203.104/search?q=cache:EJgiHLpghDEJ:help.sap.com/saphelp_nw04/helpdata/en/fc/eb3034358411d1829f0000e829fbfe/content.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=4">Statical Declaration</a>
    <a href="http://72.14.203.104/search?q=cache:VWS1erlabRIJ:help.sap.com/saphelp_nw04/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=5">Selection tables</a>
    REGARDS
    ANOOP
    Message was edited by: ANOOP R.S

  • SELECT-OPTIONS and data collection

    Hi All,
    I have one inputfield (say users) via SELECT-OPTIONS and it goes to an internal table called "userlist" with values USER1, USER2 etc...(Example)
    Now, when I query the database with "userlist" as the input, I'm not able to do so because SELECT-OPTIONS contains an Internal table with values LOW, HIGH etc...
    So my input value goes like this IEQUSER1, IEQUSER2 etc......
    Could anyone tell me what should I do in order to get USER1, USER2 etc.
    Thanks in advance,
    Pradeep

    Hi All,
    Sorry. I'm getting the error: 'Line structure of table USERLIST is incorrect'.
    My coding is as follows:
      tables : usr02.
    data: begin of users,
        users type XUBNAME,
    end of users.
      data : it_usr02 like table of usr02.
      data : l_userlist type xubname,    "This is a data elemnt thats already in the system of type BNAME
             p_userlist like l_userlist.
      select-options: userlist for users.
      loop at userlist into l_userlist.
        select * from usr02 into corresponding fields of table it_usr02 where bname in userlist.
      endloop.
    ENDFUNCTION.
    Could you please help?
    Thanks and Regards, Pradeep

  • Select-options  and button not aligned on same line

    Hi,
    My goal is to show selection screen with One Select-option & a search button
    For this I have created a GROUP inside ROOTUIELEMENTCONTAINER
    Following are the settings
    ROOTUIELEMENTCONTAINER ( Layout -Matrix layout)
    GROUP ( Layout -Matrixlayout , Layout Data : MatrixHeadData)
    ViewContainer with select options: (layout -MatrixHeadData)
    Button:(Layout - MatrixData)
    In SE80/view/layout  Select-options &  Button are aligned on same straight line
    but in output view button has been moved upwards I mean they are not in line.
    What else do i need to look?
    rgds
    vara

    Hi Vara,
    Please explain your problem in a better way becaiuse I am getting little confused here. Is the search button coming in next row?? Or the select-option and search button are coming in same row but their alignment is different?? If they are coming in different row, then set the width of your view which contains your search button. Just go that view and set the WIDTH and HEIGHT (say 100px) of the ROOTUIELEMENTCONTAINER.  Set the layout of your main view (which contains all the view containers) as matrix layout.
    Please explain.
    Regards
    Arjun

  • Difference between select-option and range

    Hi,
      wat are the difference between  select-option and range
    where u have to use those and give the syntax for the range option.
      if u use range option in report programming there is any advantages ?
      pls reply for this ..
    thanks
    rams

    Hi,
    Not much of a difference,
    A Select-Option could be like,
    SELECT-OPTIONS sel FOR f
    And a Range could be like,
    DATA: BEGIN OF sel OCCURS 10,
             SIGN(1),
             OPTION(2),
             LOW  LIKE f,
             HIGH LIKE f,
          END   OF sel.
    Here they both function the same. But then the Select-Options has numerous options associated with it than the RANGE option.
    Hope it helps,
    Pradip Parmar.

  • Web Dynpro ABAP - Select Option and ALV Component Usage

    Hi,
    I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
    Web Dynpro ABAP - Select Option and ALV Component Usage  
    In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
    Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
    I implemented and generated the web dynpro with success but when i execute a test i get a dump on select-option definition.
    Note
    The following error text was processed in the system ECD : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server ITAWSECCS01D_ECD_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    I went in debug and the piece of code dumping is:
    lt_range_table =
    wd_this->m_handler->create_range_table( i_typename = 'S_PROJ' ).
    Is there someone who can help me?
    Thanks in advance,
    Stefano.

    Hi,
    I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
    Web Dynpro ABAP - Select Option and ALV Component Usage
    In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
    Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
    I implemented and generated the web dynpro with success but when i execute a test i get
    an error as
    Note
    The following error text was processed in the system EI6 : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server EC6IDES_EI6_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    I have created a table zmy_table and trying to make USERID field as a select-options.I've written the code as shown below .
    data: itab type standard table of zmy_table,
    wa type zmy_table.
    data:
    node_employee type ref to if_wd_context_node,
    elem_employee type ref to if_wd_context_element,
    stru_employee type wd_this->element_employee ,
    item_userid like stru_employee-userid.
    navigate from <CONTEXT> to <EMPLOYEE> via lead selection
    node_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
    @TODO handle not set lead selection
    if ( node_employee is initial ).
    endif.
    get element via lead selection
    elem_employee = node_employee->get_element( ).
    @TODO handle not set lead selection
    if ( elem_employee is initial ).
    endif.
    alternative access via index
    Elem_Employee = Node_Employee->get_Element( Index = 1 ).
    @TODO handle non existant child
    if ( Elem_Employee is initial ).
    endif.
    get single attribute
    elem_employee->get_attribute(
    exporting
    name = `USERID`
    importing
    value = item_userid ).
    select *
    from zmy_table
    into table itab
    where userid = item_userid.
    node_employee = wd_context->get_child_node( 'EMPLOYEE' ).
    node_employee->bind_elements( itab ).
    Is there someone who can help me and can tell am i doing wrong?
    Thanks in advance,
    Dheeraj

Maybe you are looking for

  • How to install redhat linux on my macbook pro marvericks osx as a dual boot

    how to install redhat linux on my mac as a dual boot

  • How to get rid of freeform input layer

    Hey.Somehow i have started getting a gray layer for drawing letters every time i have a text input field.i dont know how to get rid of it permanently.also i can no longer hold down a letter to get a capital letter and the autocorrect doesnt work.help

  • What the heck, can't hurt to ask

    Apparently it is okay that Flex 3.0 beta has a huge gap when using the 'disableddays' mxml function to eliminate the charting of blank days like weekends in a chart. So for every chart there is about 30% emptyspace when your horizontal axis are dates

  • Login page  and -Xlint message on compilation

    i have a login page which ought to call up another page once the password entered corresponds with the data on the table in the database. I tried to compile the code in the file Enter.java and i got the following message on the command prompt: NOTE:

  • How to find gaps(on 10.2)

    Input Data - date from to 20.04.2009 5001 5006 20.04.2009 5820 5823 21.04.2009 3121 3124 Required Output - date gaps 20.04.2009 5002 20.04.2009 5003 20.04.2009 5004 20.04.2009 5005 20.04.2009 5821 20.04.2009 5822 21.04.2009 3122 21.04.2009 3123 Thank