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.

Similar Messages

  • Pass select option and parameter with submit

    Hello,
    I have two programs and what i have to do is to use the selection screen information from program A and submit it to program B so that this second program will generate a report with this information.
    After program B is executed it creates some files in a server, which i will have to use later in program A. I cannot modify the program B since its not part of the requirement.
    But the thing is that i am having problems when submiting a select option and a parameter together.
    It would be really useful if someone could give some examples of this.
    Example of what i want to do:
    SUBMIT PROGRAM_B
    WITH S_MATNR EQ S_MATNR      ->pass all the values from a select option.
    WITH P_WERKS EQ P_WERKS    ->pass a single value from a parameter.
    AND RETURN
    Regards,
    Roberto

    Hi,
    Try this for select-options:
    SUBMIT PROGRAM_B
    WITH S_MATNR *IN* S_MATNR ->pass all the values from a select option.
    WITH P_WERKS EQ P_WERKS ->pass a single value from a parameter.
    AND RETURN
    Hope it helps.
    Regards,
    Gilberto Li
    Edited by: Gilberto Li on Feb 2, 2009 10:24 PM
    Edited by: Gilberto Li on Feb 2, 2009 10:33 PM
    Edited by: Gilberto Li on Feb 2, 2009 10:33 PM

  • Select options and parameter

    We have a parameter and select option in Selection Screen, by using the parameter and select option in the select query, with out passing the any values to the Parameter and SO, how we will get the records?

    hi check this..
    if the parameter is empty if will not work in the select statement..you can get the values for the select options with empty structures..
    check this..
    tables:mara .
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    end of itab .
    parameters:p_matnr like mara-matnr.
    select matnr  from mara into table itab
    where matnr  = p_matnr.
    loop at itab.
    write:/ itab-matnr.
    endloop.
    it will not fetch data..
    for select-options
    tables:mara .
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    end of itab .
    select-options:s_matnr for mara-matnr.
    select matnr  from mara into table itab
    where matnr  in s_matnr.
    loop at itab.
    write:/ itab-matnr.
    endloop.
    it will fetch data..
    regards,
    venkat

  • If checkbox is checked, put values in select-options and parameter...

    Hello Experts,
    Based on my selection-screen below, How do I fill p_eindt and p_monat with values if
    the user clicked on the checkbox p_end? Below is my selection-screen:
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    PARAMETER: p_bukrs TYPE bukrs OBLIGATORY.
    SELECT-OPTIONS: p_werks FOR wa_ekpo-werks OBLIGATORY NO INTERVALS,
                    p_bsart FOR ekko-bsart OBLIGATORY NO INTERVALS,
                    p_eindt FOR eket-eindt OBLIGATORY,
                    p_ebeln FOR ekko-ebeln.
    PARAMETER: p_monat TYPE monat OBLIGATORY,
               p_gjahr TYPE gjahr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
    PARAMETER: p_end AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF BLOCK b2.
    Hope you can help me guys.Thank you and take care!

    Hi,
      For F4 help for any input value in selection screen u can use:
    Ex:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_eidnt-LOW.
      SELECT DISTINCT edint INTO TABLE IT_ab FROM <tablename>..
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
    DDIC_STRUCTURE         =
         RETFIELD               = 'eindt'
        PVALKEY                = ' '
         DYNPPROG               = W_REPID
          DYNPNR                 = W_DYNNR
         DYNPROFIELD            = 'p_eindt-LOW'
        STEPL                  = 0
          WINDOW_TITLE           = 'Plant'
        VALUE                  = ' '
          VALUE_ORG              = 'S'
        MULTIPLE_CHOICE        = 'X'
        DISPLAY                = ' '
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               = 'X'
      IMPORTING
        USER_RESET             =
        TABLES
        VALUE_TAB              = it_abc
        FIELD_TAB              =
        RETURN_TAB             = IT_RETURN
        DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Try this.
    Regards,
    Vani.

  • Reading all select-option and parameter fields

    Hello All,
        I have a reaquire ment like ' i Will take a report name as input from user , and i  need to read all the fields declared with PARAMETERS and SELECT-OPTIONS. '
         one thing i can read the program and go line by line or scan the program.
    apart from this is there any other way to get all such fields declared with PARAMETERS and SELECT-OPTIONS
    Thanks & Regards
    Amarender Reddy B

    Hi,
      You can fetch it from table TVARV
    Regards,
    Prashant

  • 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

  • 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

  • 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

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

  • 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

  • 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

Maybe you are looking for

  • Access is denied  while creation hfm classic application in workspace

    access is denied while creation hfm classic application in workspace. i have given full roles and access to my admin user. still i am facing same issue. i am trying to create classic application workspace under Access is denied. Access is denied. Sho

  • Installing Oracle8i1.5 on Windows XP home

    Hi, I am a student and I am learning Oracle.I want to install Oracle 8i on my notebook.I have oracle8i for windows 98.Can I install it? or shall I have to download Oracle 8i for windows2000. shyam

  • Is anyone having a problem connecting to facetime

    My facetime calls on Iphone 5 does not connect.... is anyone else having this issue

  • PO, PR, GRN with selected WBS as per depertment

    Hi, I am a PS consultant. In our current WBS we only maintain Responsible Person as per Depertmant HOD, CO Area , Business Area, Co Code, Plant. (This are common for all WBS).  There is only one storage location & purchaseing group. Now at the time f

  • A small error

    Hai, my form consists of only a checkbox group which i have to select or deselect But when i press the ok button .I get the following error "Validation Error: {0}Value is not valid " What does ' {0}' stands for? Thanx for reading this.