SELECT-OPTIONS: s_aedtm  FOR zxi_errpt-aedtm default sy-datum - 30

I'm trying to figure out how to use the sy-datum - 30 days on the selection screen.   Can soeone give me a suggestion on how to alter the sy-datum as it would appear on the selection screen?
SELECT-OPTIONS: s_aedtm  FOR zxi_errpt-aedtm default sy-datum - 30 NO-EXTENSION
NO INTERVALS OBLIGATORY
Thanks!

Hello Riki,
There was a minor typo !!!
SELECT-OPTIONS: s_date FOR sy-datum NO-EXTENSION NO INTERVALS OBLIGATORY.
INITIALIZATION.
  s_date-sign = 'I'.
  s_date-option = 'EQ'.
  s_date-low = sy-datum - 30.
  APPEND s_date.
the append would not work
I never knew this !!!!
BR,
Suhas

Similar Messages

  • SELECT-OPTIONS sel FOR Internal Table

    Hello,
    I would like to use select-options. Normally you can specify a selection tab (sel) and a row of an table being registered in the ABAP dictionary.
    I would like to use an internal table instead.
    First I read data into the internal table. Next I would refer on one column of that internal using the select-options:
    SELECT * FROM database-tab INTO itab
    WHERE key1 = 'a'.
    SELECT-OPTIONS: sel FOR itab.
    It does not work, although the internal table is filled!!!
    Can I use internal tables with select-options?
    thx, holger

    Hallo Holger,
    i think i get it now - thanks Amit !
    here's an example:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR matnr-low.
      SELECT matnr maktg FROM m_mat1t
      INTO CORRESPONDING FIELDS OF TABLE f4_itab
      WHERE mtart = 'DIEN'.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield     = 'MATNR'
                dynpprog     = sy-repid
                dynpnr       = sy-dynnr
                dynprofield  = 'MATNR'
                window_title = 'select material no.'
                value_org    = 'S'
           TABLES
                value_tab    = f4_itab[].
    Andreas

  • Two selection option-variables for the same object

    Hi,
    I'm using two selection-option variables for the same characteristic in my query:
    One is authorization variable and the other is used for restrictions (filter) in a selection screen.
    I get an error: SELOPT/Query variable .... does not allow any further selections.
    If a selection option-variable is used, no additional selections can be specified for this characteristic in this element.
    Is there a way to overcome this problem?
    Thanks,
    Hagit

    Hi,
    I have solved the problem by changing the authorization object (in RSECADMIN) from range to single value and also the variable in BEx from selection single value.
    To be more clear:
    object in RSECADMIN was: infoobject BT var1 - var5
    I have changed it to:
    infoobject EQ var1
    infoobject EQ var2
    infoobject EQ var3
    infoobject EQ var4
    infoobject EQ var5
    Hope this helps.
    Hagit

  • Can I change the select option text for pnp ldb ?

    hi Akll,
    I am using a pnp logical database in my report and I have created my own hr category because i wanted to use field ename from the ldb in the selection screen. Now the problem with ename is I cant do a case sensitive search.
    So I have replaced it with sname, so now my screen has sname instead of ename, however I want to change the selection text for select option ( at present it is 'EE name can be sorted' )
    Kindly advise,
    thanks,
    GV

    I guess the text cannot be changed.. anyways you can add the field as an additional field by normal coding in your report

  • Selection Options feature for variable input in BEx in 7.0 version

    Hi All,
    We are currently in EHP1 BI 701 software version. We have queries in both 3.x and 7.0 version. The variable screen that we get when we execute the report in 3.x and 7.0 is different.
    We have selection options in 3.x (We can copy and paste values (non sequential) from an excel sheet for example during variable input) but I'm not seeing the same in 7.0 queries.
    Please suggest if it's a configuration/software issue or i'm missing something here.
    Regards,
    Vivek

    Hi,
    I would like to inform you that you will not get the same button as in 3.x . But when you open the F4 screen and then you have
    to click on the More Button.
    Two ways you can copies:
    To past from clipboard follow these steps:
    1. Click on the u201CMore >>u201D button.
    2. Click on the right box to set the focus.
    3. Ctrl + V.
    To import from a txt file follow these steps:
    1. Click on the u201CMore >>u201D button.
    2. Right click on the right box and choose u201CUpload selectionsu201D option.
    3. Select the txt you want to import.
    All the values will be copied on the Right Pane.
    Thanks,
    Venkat

  • Restrict select option with few values by default

    I have few values with which i have to restrict in a select option by default.
    I have done in initialisation as below.
      s_ktokd-sign   = 'I'.
      s_ktokd-option = 'NE'.
      s_ktokd-low    = '0012'.
      append s_ktokd to s_ktokd.
      clear s_ktokd.
    Is there any other way?
    Thanks
    Kiran

    yeah you can do that in initalization.
    >   s_ktokd-sign   = 'I'.
    >   s_ktokd-option = 'NE'.
    >   s_ktokd-low    = '0012'.
    >   append s_ktokd to s_ktokd.
    >   clear s_ktokd.
    small correction to your code, corrected code...
    s_ktokd-sign   = 'E'.
       s_ktokd-option = 'EQ'.
       s_ktokd-low    = '0012'.
       append s_ktokd to s_ktokd.
      clear s_ktokd.

  • Is it possible to make new selection option check for datasource?

    Hi Experts,
    I have a standard datasource and i want selective data form this datasource but the field on which i want selection is not provided as selection checked in the datasource.
    Is there any option in BW side so that i can have that field as selection in the infopackage.
    Regards,
    RG

    Hi
    Info Package Selection Tab is the Replication of DS at Source System Extract structure.
    But making changes to the Standard DS may drive you into Errors in future, make sure that you are not locking / changing the dependent objects if you are changing the Options while DS at Source system RSA5/RSA6.
    You need to replicate / Reinit for the changes you made for DS.
    Hope it helps

  • Default Current year in select option field on selection Screen

    Dear Experts,
    I want to set current year as default value in fiscal year select-options field on selection screen.
    for this, i hv written following code
    DATA:VAR_DATE TYPE SY-DATUM.
    DATA VAR(4) TYPE C.
    VAR_DATE = SY-DATUM.
    VAR = VAR_DATE+0(4).
    this retrieves current year .
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
    SELECT-OPTIONS I11 FOR ANLC-GJAHR DEFAULT VAR TO VAR..                            "Fiscal Year
    SELECTION-SCREEN END OF BLOCK B1.
    Now when i am executing program pop-up is raised describing "Specify the range Limits". Please help.
    Regards,
    Apoorv Sharma

    >
    Ganga Bhavani R wrote:
    > Use below lines.
    >
    > SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
    > SELECT-OPTIONS I11 FOR ANLC-GJAHR DEFAULT SY-DATUM+0(4). "Fiscal Year
    > SELECTION-SCREEN END OF BLOCK B1.
    Hi, Ganga,
    I think it will not working properly that way, Please test the bellow Sample Code.
    TABLES: anlc.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS i11 FOR anlc-gjahr .
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      IF i11[] IS INITIAL.
        i11-low = sy-datum+0(4).
        APPEND i11.
      ENDIF.
    Thanks and Regards,
    Faisal

  • 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

  • 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

  • Field in the selection screen as a select option with two default values

    Hi All,
    can anybody tell me how to put field in the selection screen with two defaul values.
    for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
    please reply ASAP. Its urgent.
    Thanks in advance,
    Madhu

    Hi Madhu,
    Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'EQ'.
    s_ktokd-low = 'Y001'.
    append s_ktokd.
    s_ktokd-low = 'Y005'.
    append s_ktokd.
    clear s_ktokd.
    However, if you want to mention a range like all the values between these given two values to be considered then u may use,
    select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
    or
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'BT'.
    s_ktokd-low = 'Y001'.
    s_ktokd-high = 'Y005'.
    append s_ktokd.
    Reward if helpful.

  • Select-option default value???

    DATA: gsber1         like csks-gsber.
    select distinct GSBER
      into (gsber1)
      from csks
    where kostl = sch_kostl.
    endselect.
      SELECT-OPTIONS : gsber    FOR csks-gsber DEFAULT gsber1.
    why not input value gsber1?

    Pung,
    Pls. see the docs. below.
    To assign default values to a selection criterion, you use the following syntax:
    SELECT-OPTIONS <seltab> FOR <f> DEFAULT <g> [TO <h>] ....
    Default values <g> and <h> can be literals or field names. You can only use fields that contain a value when the program is started. These fields include several predefined data objects.
    For each SELECT-OPTIONS statement, you can specify only one DEFAULT addition. This means that you can fill only the first row of selection table <seltab> with default values. To fill more rows with default values, the selection table must be processed before the selection screen is called, for example, during the AT SELECTION-SCREEN -OUTPUT event.
    You use the DEFAULT addition as follows to address the individual components of the first row:
    To fill only the LOW field (single field comparison), use:
    ........DEFAULT <g>.
    To fill the LOW and HIGH fields (range selection), use:
    ........DEFAULT <g> TO <h>.
    To fill the OPTION field, use:
    ........DEFAULT <g> [to <h>] OPTION <op>.
    For single field comparisons, <op> can be EQ, NE, GE, GT, LE, LT, CP, or NP. The default value is EQ. For range selections, <op> can be BT or NB. The default value is BT.
    To fill the SIGN field, use:
    ........DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>.
    The value of <s> can be I or E. The default value is I.
    The input fields of the selection criterion are filled with the default values. The user can accept or change these values.
    REPORT DEMO.
    DATA WA_SPFLI TYPE SPFLI.
    SELECT-OPTIONS AIRLINE FOR WA_SPFLI-CARRID
                   DEFAULT 'AA'
                        TO 'LH'
                    OPTION  NB
                      SIGN  I.
    Don't forget ot reward if useful...

  • SELECT-OPTIONS can u use it to read internal table ?????

    Hello All,
       I am trying to read an internal table with the select-options statement. I am getting a syntax error so i am hoping i am just coding it incorrectly. Can someone tell me what is wrong here is the if statement :
    if p_begdte in t_rpt-datab and
           p_enddte in t_rpt-datbi.
        else.
           exit.
        endif.
    thanks scott

    This is not working?
    tables: a916.
    * Beg valid date *
    data text021(29).
    selection-screen begin of line.
    selection-screen comment 1(30) text-021 for field p_begdte.
    selection-screen position 32.
    select-options: p_begdte for a916-datab default '20041101' to
    '99991231'.
    selection-screen end of line.
    * End valid date *
    data text022(29).
    selection-screen begin of line.
    selection-screen comment 1(30) text-022 for field p_enddte.
    selection-screen position 32.
    select-options: p_enddte for a916-datbi default '20041101' to
    '99991231'.
    selection-screen end of line.
    start-of-selection.
    <b>Loop at t_rpt.
    if t_rpt-datab in p_begdte
      and t_rpt-datbi in p_endte.
    * do something
    else.
    exit.
    endif
    Endloop.</b>
    Regards,
    Rich Heilman

  • How to make Select Options Mandatory?

    Hi Guys,
                  Can anybnody tell me how to Declare  Selection Options for some of them mandatory.
    Select-Options : v_PurOrg for EKKO-EKORG default '2000',
                             v_GRDate for Sy-Datum ,
                             v_GRPrd  for MSEG-GJAHR.
             In these i have to make v_PurOrg Manadatory.
    Thanks,
    Gopi.

    Hi Gopi,
    In order to make select-options mandatory we add OBLIGATORY in the statement like the below.
    Selection-Screen.
    Select-Options : v_PurOrg for EKKO-EKORG default '2000' OBLIGATORY.
    In this case, only the first option will have the default value of 2000.But if you want both the options low and high of select-options, means you have to add the below code in your program in the initialization event.
    Initialization.
    v_PurOrg-low    =   1000. 
    v_PurOrg-high    =   2000. 
    append v_PurOrg.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • Select-option.....strange problem.....have ur points.

    Hi all
    pleas see the code...
    SELECT-OPTIONS : dept FOR equz-ingrp DEFAULT 'DG'.
    write : / dept.
    output-> IEQDG
    Now thing is equz is a fields with length 3 character, what ever i select from the drop down in select option.
    IEQ is attached with every value....
    Why? Please assist me...
    <b>Have ur points.</b>
    Regards,
    pradeep phogat

    Hi Pradeep,
    Select option is similar to an internal table & has 4 fields in it.
    SIGN
    OPTION
    LOW
    HIGH
    Inorder to display contents of select option you need to code as follows:
    loop at dept.
    write :/ dept-low, dept-high.
    endloop.
    Best regards,
    Prashant

Maybe you are looking for