Doubt abt select-option

select-options : kunnr for kna1-kunnr.
on the selection screen there is a data base accses for kunnr.
on the selection screen if i want to have my own selected values like 100
200
300
400
500.hw to do that.

Hi,
You can maintain the Value table for this one, in the Domain just maintain the value table, if this is not posiible then you can maintain programetically.
In the Initialization event of the program.
Sel_opt-LOW = 100.
Append Sel_opt.
Sel_opt-LOW = 200.
Append Sel_opt.
Sel_opt-LOW = 300.
Append Sel_opt.
Regards
Sudheer

Similar Messages

  • Doubt in Select Option fetch

    Hello Every1,
    I have a select option field for which the input values can be given as in the below example.
    Ex. If the input value is given as 10* as the low value and 100* as the high value, i need to fetch records in this range.Which means it should not only include all values starting with 10 and 100 but also the values between 10 and 100. Please let me know how this can be achieved.
    Best Regards,
    Siva.

    Hi Siva,
    Why dont you have a try by putting % instead of *
    Just its a try...
    Cheers,
    Sampath

  • Doubt in select options

    Hi frnds,
    Normally select option allowing only 8 charactor in declaration part, but i want to display with morethan 8 charator. i think some text id formet is there, how to do that.
    for ex,
    s_org for vbak-vkorg  .
    for this i want to give sales organisation.
    how to do this.
    plz its urgent.
    Gowri

    SELECTION-SCREEN BEGIN OF LINE.
    [SELECTION-SCREEN POSITION pos [ldb_additions]].
    SELECTION-SCREEN END OF LINE.
    Effect
    The first and last statements define a new line below the existing elements on the selection screen.
    All the screen elements within these statements that are defined with PARAMETERS SELECT-OPTIONS and SELECTION-SCREEN statements are placed in this line one after the other without spaces.
    Several SELECTION-SCREEN POSITION statements can be listed within the definition of a line. The SELECTION-SCREEN POSITION statement can be used to define the output position for the following screen element. The position pos can either be specified directly as a number between 1 and 83 or using pos_low or pos_high expressions. The expression pos_low specifies the position in which the input field for a parameter or the first input field for a selection criterion is displayed as standard. The expression pos_high specifies the position in which the second input field for a selection criterion is to be displayed as standard. If you make a different specification of the position in the statement defining the following element, this is taken into account. The statement SELECTION-SCREEN POSITION is only possible within the definition of a line. If there are conflicts with existing screen elements, the selection screen cannot be generated.
    The additions ldb_additions can only be used in a selection include for a logical database.
    The following applies in the definition of a line:
    Output fields are not created for selection texts for the parameters displayed in these kinds of lines. Instead, these can be created by specifying a SELECTION-SCREEN COMMENT.
    You cannot define other lines with SELECTION-SCREEN BEGIN OF LINE.
    You cannot define blocks or tabstrip controls with SELECTION-SCREEN BEGIN OF [TABBED] BLOCK.
    Within a line, only one selection criteria should be defined with SELECT-OPTIONS whose description can be specified in advance using SELECTION-SCREEN COMMENT. Other combinations, especially definitions of elements according to the selection criteria, can lead to an undefined behaviour.,
    The backslash (/) is not allowed when giving format specifications.
    You can omit the position specification pos in formatting specifications.
    Note
    If a screen element is assigned a position greater than 83 or is positioned outside a block with a frame, the selection screen is not generated. In the case of input and output fields that were positioned beforehand but have a length that extends beyond the end of the line, the visible length is shortened accordingly and the content is displayed in the visible length and can be scrolled. In this case, pushbuttons and horizontal lines are cut off at position 83 or where the frame of the block ends.
    Example
    A pushbutton, an input field, and an output field in a line in the standard selection screen for an executable program.
    SELECTION-SCREEN: BEGIN OF LINE,
                      PUSHBUTTON 2(10) push USER-COMMAND fcode,
                      POSITION 16.
    PARAMETERS para TYPE c LENGTH 20.
    SELECTION-SCREEN: COMMENT 40(40) text,
                      END OF LINE.
    INITIALIZATION.
      push = 'Push'.
      text = '<--- Fill field, then push button!'.

  • Doubt on select-option multiple option.

    hi friends,
    i have a select option called condition type(so_kschl) declared with no intervals. but not with no-extension so user can enter more than one condition type at a time .
    the select statement i have written is
    select (some fields)  from a004 where kschl in so_kschl.
    is this select statement for one value ? or can we use this for multiple selection also ,since there are more than one value in select option do we need to use loop .
    any sample code will be of great use ..
    thank you
    with regards,
    gokul.

    Hi Gokul,
    Your statement is correct which can take multiple values for select-options. If will takes single value when specifies both NO-INTERVALS and NO-EXTENSION.
    Give some values to the SO_KSCHL in the INITIALIZATION event
    <b>INTIALIZATION.</b>
    SO_KSCHL-LOW = 'VALUE1'.
    APPEND SO_KSCHL.
    SO_KSCHL-LOW = 'VALUE2'.
    APPEND SO_KSCHL.
    SO_KSCHL-LOW = 'VALUE3'.
    APPEND SO_KSCHL.
    SO_KSCHL-LOW = 'VALUE4'.
    APPEND SO_KSCHL.
    select (some fields) from a004 where kschl in so_kschl.
    Thanks,
    Vinay

  • Re : select-options in abap objects

    Dear friends,
    I want to give select-options in abap-objects program. How to give that.
    Thanking You
    with regards,
    Mani

    HI Mani,
    It's common mix ABAP Procedural with ABAP Objects in the same program.
    You should use the same way used in ABAP procedural program as Marco Cerdelli sad.
    But inside ABAP OBJECTS classes you can't use is these statement type.
    Don't forget to close this thread and all yours previous when your question be answered ! In case of doubt read the [rules of engagement|https://forums.sdn.sap.com/].
    Best Regards.
    Marcelo Ramos

  • Loop in select options

    Hi,
    In DEV in debugging mode, S_VENDO is showing three entries but
    in PRD in debugging mode it shows one table entry.
    and thats why looping in not happening in PRD properly.
    I am inserting three entries.
    So how to loop in select option field.
    Edited by: Anurodh Jindal on Jun 5, 2008 1:32 PM

    Hi Bala,
    Please let us know why you need to loop in the range table as you can directly use it in your query or condition. Still if you want to loop, you will have to check the low as well as high values, and then adjust the loop accordingly. For ex.
    LOOP AT s-vendo INTO ls_vendo.
       lv_vendo = s_vendo-low.
       IF s_vendo-high IS NOT INITIAL.
         WHILE lv_vendo <= s-vendo-high.
           "write your code here using lv_vendo
           lv_vendo = lv_vendo + 1.
         ENDWHILE.
       ELSE.
         "write your code here using lv_vendo
       ENDIF.
    ENDLOOP.
    Let me know if you have any further doubts.
    Regards,
    Rachna

  • Latest Value - Select Option - At Selection Value help

    Hi,
    I need the current values entered in the Select Option of the Selection Screen while generating the Value Help.
    There are two selection option fields in the Selection Screen, Selopt1 and Selopt2, to generate the Value help of Selopt2 i need the latest values of the Selopt1, the function module dynp_read_values does not return all the values of the selectop option Selopt1 it returns only the first row of selopt1-high and selopt1-low, the function module RS_REFRESH_FROM_SELECTOPTIONS does not return the current values entered in the selection screen, is there any way to retrive the latest values of the select option in the event At Selection Screen on Value Request.
    regards
    Santosh

    Hi Santosh,
    When you go for f4 help on selopt2, you can use following code to get the current value of selopt1,
    AT SELECTION-SCREEN ON VALUE-REQUEST
    FOR selopt2-high.
    select * from bkpf into table it_bkpf where
    BKTXT in selopt1[].
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'BKTXT'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = 'Invoice Id'
          value_org   = 'S'
        TABLES
          value_tab   = it_bkpf .
      IF sy-subrc <> 0.
        " do nothing.
      ENDIF.
    In selection screen, you can directly fetch the value of selection options or parameters by selopt1 or selopt2 (in your case by using AT Selection Screen for value request).
    Reply for further doubts,
    Please reward if useful.
    Thanks and regards,
    Ashlesha Desai
    Edited by: ashlesha desai on May 26, 2008 6:06 AM

  • SELECT-OPTIONS : No-Display?

    Hi Experts,
    One simple doubt, pls. clarify that,
    Wht is the practical use of NO-DISPLAY in SELECT-OPTIONS(I gone thru SAP help, but did not get any!)? like,
    <b>p_vprsv like mbew-vprsv no-display.</b>
    thanq.

    The LOW and HIGH fields of a selection option are displayed in a length up to 18 bytes long (scrollable up to 45 bytes). If you define a length longer than 45, fields are truncated on the selection screen after the 45th character. This affects the first line of the SELECT-OPTIONS table. You can, however, pass longer selection options to a report if they are specified with the addition NO-DISPLAY and thus do not appear on the selection screen. Without NO-DISPLAY , the fields are then truncated whenever the selection screen is processed in the background (SUBMIT without VIA SELECTION-SCREEN ).
    ... NO-DISPLAY
    Effect
    Does not display the selection on the selection screen. Creates the internal table sel as with 'normal' selection options and you can then transfer the selection option with SUBMIT .
    These selection options represent a part of the interface which the user does not see on the selection screen. You can set the values either internally (through the routine INIT in SAPDBldb or INITIALIZATION in the report) or with SUBMIT . These selection options are also stored for variants.
    Sometimes, (e.g. when the user has entered particular values for other selection options or parameters ), you may want to display these undisplayed selection options on the screen so that the user can enter values. You can do this in the routine PAI of the database program SAPDBldb (for database-specific selection options) or under AT SELECTION SCREEN (for report-specific selection options) by calling a function module (see CALL FUNCTION ) or your own screen (CALL SCREEN .
    also refer this
    http://www.erpgenie.com/phpBB2/viewtopic.php?p=16454&sid=74b2d670b72ac27732cbee2f97d51098
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • Filling the Bucket of Select-option as DEFAULT??

    Hi Experts,
    Pls. clarify my doubt reg. Selection screen,
    When I, <i><b>F8</b></i> the my_z_report, the selection screen is coming with default values (say,  A; B; C; D) in the bucket of <i><b>multiple selection</b></i> of the <b><i>select option s_doctype</i></b>.
    I know, its possible, by coding in prog. it self, by filling the <i><b>SELTAB</b></i> explicitly as A; B; C; D after populating <b><i>SIGN; OPTION; LOW; HIGH</i></b> values!
    but, when I see the code of my_z_prog., I did not find any such code, all over??
    1) So, How the prevoius programmer filled it? bcoz, now I need add E;F;G etc. to the same!
    2) Wht r the other altrnatives (other than I mentioned above) to get it done?
    thanq.

    Hi,
    Check the following..
    1) Put a where-used list of the select-options variable..and check if it getting appended.
    2) If you execute the program with a transaction code..Then in the transaction code setup in SE93..You can start the report with a variant..If so..modify the report variant to add more values..
    Thanks
    Naren

  • Select options- (negavtive range)

    Hi,
    My doubt is ...Is it possible to add a condition in the code to  fetch data if we enter a range of valuesin the RED column of  the selection screen .To be precise I want to restrict dates in my selection screen,if i enter certain dates in the selection screen I dont want the details of that date to be printed.By default itself if i enter it in the Red column ,it will restrict but my requirement is to do some more changes if I have given it in the RED columns,so I want to knw if i can add code in the program ,if so how to do it.Please advice.

    Hi,
    Please try something like this.
    select-options: so_date for sy-datum.
    initialization.
    *exclude the dates between August 01, 2007 and August 10, 2007
    so_date-sign = 'E'.
    so_date-option = 'BT'.
    so_date-low = '20070801'.
    so_date-high = '20070810'.
    append so_date.
    Regards,
    Ferry Lianto

  • I need to pass multiple select options using submit and reutrn

    dear all,
    my requirement is i need to pass multiple values for work center like(biw01,biw02,biw03    etc) for this iam giving as biwl* and biot* for the tcode zpp_hmm ,using this i am going to get total working hours of perticular equiment.
    for this iam using submit and return query but iam unable to pass multiple work centers as input.
    my code is
    DATA : z_budat TYPE  RANGE OF budat,
           wa_budat LIKE LINE OF z_budat.
    wa_budat-low = '20111001'.
    wa_budat-sign = 'I'.
    wa_budat-option = 'BT'.
    wa_budat-high = '20111031'.
    APPEND wa_budat TO z_budat.
    CLEAR wa_budat.
    *wa_budat-High = '20111031'.
    *wa_budat-sign = 'I'.
    *wa_budat-option = 'BT'.
    *append wa_budat to z_budat.
    DATA : z_arbpl TYPE  RANGE OF arbpl,
           wa_arbpl LIKE LINE OF z_arbpl.
    wa_arbpl-low = 'BIWL*'.
    wa_arbpl-sign = 'I'.
    wa_arbpl-option = 'EQ'.
    APPEND wa_arbpl TO z_arbpl.
    CLEAR wa_arbpl.
    wa_arbpl-high = 'BIOT'.
    *wa_arbpl-sign = 'I'.
    *wa_arbpl-option = 'BT'.
    *APPEND wa_arbpl TO z_arbpl.
    SUBMIT   zpp_rep_hemm_perf WITH s_bukrs = '1004'  WITH s_budat IN z_budat WITH      s_werks = 'SMJT'
                   with   S_ARBPL IN Z_ARBPL USING SELECTION-SCREEN '1000' AND RETURN.
    but my doubt is whether it is corect or wrong what ever i am passing inputs for arbpl.
    thanks in advance.

    You can pass all parameter (rsparams-kind = 'P') and select-options (rsparams-kind = 'S') as a single internal table of type RSPARAMS. Go on appending the field names and values as rows and pass using SELECTION-TABLE parameter of SUBMIT command.
    I gave appending one set of selection values for s_budat field but you can go on appending more values for s_budat and other fields.
    DATA: lt_rsparams TYPE TABLE OF rsparams,
          ls_rsparams TYPE rsparams.
    CLEAR ls_rsparams.
    ls_rsparams-selname  = 'S_BUDAT'.
    ls_rsparams-kind = 'S'.
    ls_rsparams-sign = 'I'.
    ls_rsparams-option = 'BT'.
    ls_rsparams-low =  '20111001'.
    ls_rsparams-high = '20111031'.
    APPEND ls_rsparams TO lt_rsparams.
    SUBMIT zpp_rep_hemm_perf WITH SELECTION-TABLE lt_rsparams
                      USING SELECTION-SCREEN '1000'
                      AND RETURN.

  • To add select-options to standard report program...

    Hi,
    How to add  a field as select-options to sap standard report program?
    Regards,
    sachin
    Moderator Message: Do some R&D on the topic first and ask a specific question, instead of a step-by-step process.
    Edited by: kishan P on Nov 25, 2010 5:40 PM

    Hi shiva,
    I have following doubts?
    1) exactly where should i add select-options of a field in enhancement point?
    and 2) where to keep the database extraction logic for the same select-options?

  • Report help for multiple Date Select options

    Hi Friends,
    For a particular year wise report, the client wants 12 date select-options which are changeable and informal every year .The report will also be displayed as per the given date selection period wise. Please help me how to fetch the datas from the table as per the given selection period. Currently the report have one date select-option where the user gives selection range as 1.04 to 31.03. It's related to EB power consumption report and hence the new requirement on date selection which are informal and not a fixed date of every year.
    Ex:Selection-Screen
    Period 1 : 08.04.2008 to 12.05.2008
    Period 2: 12.05.2008 to 20.06.2008
    Period 3: 21.06.2008 to 28.07.2008
    Period 4: 29.07.2008 to 15.08.2008
    Period 5: 15.08.2008 to 21.09.2008
    Period 6 : 21.09.2008 to 14.10.2008
    The data will derive as per the above selection ranges.......
    Please advise with example.
    thanks & regards
    Sankar.

    >
    sankar babu wrote:
    > Ex:Selection-Screen
    > Period 1 : 08.04.2008 to 12.05.2008
    > Period 2: 12.05.2008 to 20.06.2008
    > Period 3: 21.06.2008 to 28.07.2008
    > Period 4: 29.07.2008 to 15.08.2008
    > Period 5: 15.08.2008 to 21.09.2008
    > Period 6 : 21.09.2008 to 14.10.2008
    Hi,
    In this case just derive all records matching dates between 08.04.2008 (low in first select-options) and 14.10.2008(high in last select-options.
    Also my advice is to use a single select-options and prompt the user to give the dates as ranges in the multiple entries dialog which can be opened by clicking the button on the right side of the select-options.
    Regards
    Karthik D

  • How To... Change the Data Type for a SELECT-OPTIONS at run time.

    Hello,
    I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
    The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
    I would like the following example to be possible:
    The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
    I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
    The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
    declaration of variables for user interface
      DATA c_char(32) TYPE c.
    declaration of count variable
      DATA i_count TYPE i.
    declaration of user interface
      SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
        PARAMETERS: p_ipack TYPE RSLOGDPID.
      SELECTION-SCREEN END OF BLOCK a1.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
        PARAMETERS: p_char1 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char1  for c_char NO INTERVALS.
        PARAMETERS: p_char2 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char2  for c_char NO INTERVALS.
        PARAMETERS: p_char3 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char3  for c_char NO INTERVALS.
      SELECTION-SCREEN END OF BLOCK b1.
    Is what I am trying to do possible???
    Thanks for any help. Ross.

    You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
    Here is what you do:  Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR..  The first thing you do here is read the value of the parameter field (p_ipack in your example).  You can use function module DYNP_VALUES_READ.  Based on this value, you can propose values for the select-option fields.  Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field.

  • Select-options in SELECT query - syntax error

    Hi all,
      I get the error below when I try to use the select options in a SELECT query . Please help me.
    "The IN operator with "SO_AWART" is followed neither by an internal
    table nor by a value list."
    The code i have used(Logical database  PNP is used):
    TABLES: pernr,
            catsdb.
    INCLUDE ztime_cwtr_top.    " global Data
    INCLUDE ztime_cwtr_f01.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
    PARAMETERS P_THRES TYPE I.
    SELECTION-SCREEN END OF BLOCK B1.
    Get data from CATSDB table. Workdates within the date interval are considered.
      SELECT pernr workdate awart catsquantity beguz enduz status
      FROM catsdb
      INTO TABLE it_catsdb
      WHERE pernr  = pernr-pernr    AND
           workdate GE pn-begda     AND
           workdate LE pn-endda     AND
           status   IN ('20', '30') AND
           awart    IN  so_awart .
          awart    IN ('1100', '1137', '1138', '1139', '1140',
                      '1147', '1148', '1149', '1157', '2003' ).
    when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
    I have tried different options like using only the select-options in the where condition.
    Thanks in advance.....
    Madhu

    Solved.
    Code with syntax error:
    include z...top .
    include z...fo1.
    select-options: xxxxxxx
    Code  with no syntax error:
    select-options: xxxxxxx
    include z...top .
    include z...fo1.
    Thanks for all your help,
    Madhu

Maybe you are looking for

  • CROSS TABLE in APEX

    Hello! I have to develop student attendance application in Oracle APEX. I have 2 databases. First contain personal info of all the students and class ID (of each of them). Second contains column for student_ID from first table (which is foreign key),

  • ITunes store wont load on my phone

    I have been trying to access iTunes store on my phone all day but it won't load, screen stays blank, but if i go to the app store that loads no problem, any ideas

  • Will Apple's 30 " Display overheat a 17" PB?

    I am about ready to purchase a 17 PowerBook and the 30" Apple Cinema Display. Can anyone tell me if they have had any overheating issues with similar setups (ie; 15" PB)??? Does the PB fan run continuously when 30" display is used? Thanks to all that

  • Constant Buzzing and Can't make outgoing calls

    For the past month or so, our phone line has had a constant buzzing. Now, we cannot even get a dialtone to make outgoing calls. We do receive calls, but it doesn't do us much good since the buzzing prevents us from talking to anyone anyway.

  • Can I upgrade OSX 10.5.1 to 10.5.8 by using an upgrade disc for 10.4.11 to 10.5.8 ?

    Can I upgrade OSX 10.5.1 to 10.5.8 by using an upgrade disc for 10.4.11 to 10.5.8 ?