Initializu00EDng select options field with default values and with NO INTERVALS

Dear All,
I have used WDR_SELECT_OPTIONS technology within WD Abap.
I also have added the fields which have to be taken into consideration.
lt_range_table =
wd_this->m_handler->create_range_table(
i_typename = 'PLANT' ).
wd_this->m_handler->add_selection_field(
i_id = 'PLANT'
it_result = lt_range_table
i_read_only = read_only ).
Can I assign two values to this field 'PLANT' whereby the user may take only these values.
I mean kind of pre initializíng of this select options field with default values.
Due to this handling it should be prevented that the user can give other values
except this values.
Additonally it should be fine whether it is possible to disable the second input field
of this select options field like NO INTERVALS .
Regard
sas
Regard
sas

wd_this->m_handler->add_selection_field(
i_id = 'PLANT'
it_result = lt_range_table
I_NO_INTERVALS = 'X'
i_read_only = read_only ).
Pls check 'WDR_TEST_SELECT_OPTIONS' web dynpro component

Similar Messages

  • I want to set a variable with default value and can be changed by the user

    hi,
    i want to set a variable with default value and can be changed by the user, so i new a variable with setting : customer exit, single value, optional, ready for input.
    in my customer exit code, i set a default value, eg. 20070530
    when the variable screen popup, it display the default value 20070530, i changed it to 20070529, but it doesn't work , it still display the data in 20070530, how can i solve this problem? 
    your help is appreciated.

    Liu,
       As mentioned by Anil, you need to restrict your customerr Exit code to I_STEP = 1.
    or.
       <u>Open your Variable in change mode, in the Last Page os the Variable Maintenance you can provide default value. Note: you are doing same thing in Customer Exit. In your case no need of Customer Exit.</u>
    Nagesh Ganisetti.
    Assign points if it helps.

  • ORA-01400 - not null column with default value and item with authorization

    I've searched - I would think someone has run into this. APEX 3.0.0.00.20 - I've created a simple form on a table. One of the column is a not null column with a default value. I have a select list on that item, but it has security on it - authorization scheme. So, it checks the user and if that user isn't of the right role, it will not even display that item. However, APEX appears to still send in the column in its sql! So, the default value is useless, it sends in null each time. Even if I set the default at the Item level, I get null. Argg. That's got to be a bug...
    In debug, I do not see the item listed at all. It's not used. That's fine - but why is it trying to insert the value? I would think it would leave it off??? I think because the item is associated with a database column. But, getting around this is ugly. Having to create a hidden item for each one, and then check to see if I need to take the list value... horrible. Any way to get around this???

    I should add - I guess I can always put my own custom process in to replace the DML. Just seems like a simple thing - if the value doesn't appear on the debug, isn't set with any default value... don't include it in the DML.

  • Call Transaction and fill a select-options field with more than one value?

    Hello everybody,
    how can I fill a select-options field with more than one value.
    Here is the code example:
      CLEAR: GT_BDCDATA, GS_BDCDATA.
      GS_BDCDATA-program = 'RHALEINI'.
      GS_BDCDATA-DYNPRO = '1000'.
      GS_BDCDATA-DYNBEGIN = 'X'.
      APPEND GS_BDCDATA TO GT_BDCDATA.
      CLEAR: GS_BDCDATA.
      GS_BDCDATA-FNAM = 'PCHOTYPE'.
      GS_BDCDATA-FVAL = 'P'.
      APPEND GS_BDCDATA TO GT_BDCDATA.
      CLEAR: GS_BDCDATA.
      LOOP AT gt_hrobjinfty INTO gs_hrobjinfty.
        GS_BDCDATA-FNAM = 'PCHOBJID-LOW'.
        GS_BDCDATA-FVAL = gs_hrobjinfty-objid.
        APPEND GS_BDCDATA TO GT_BDCDATA.
        CLEAR: GS_BDCDATA.
      ENDLOOP.
      CALL TRANSACTION 'PFAL' USING GT_BDCDATA MODE 'A'
                       MESSAGES INTO GT_MESSAGES.
    THX.

    Hi,
    Please refer the code below:
    *Code used to populate 'select-options' & execute report
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    * load each personnel number accessed from the structure into
    * parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    Thanks,
    Sriram Ponna.

  • 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

  • How to preset fields in TA BP with default values

    Hi!
    I want to fill few fields in transaction BP with default values.
    This should be if there`s a new business partner to insert.
    If i can do this depending on the selected role it was the best
    First i thought on SPA/GPA-parameters ... but then i can`t do it in depence on the selected role.
    In customizing i can tell only if a field should be displayed or not, for input or not, ... but no values to insert.
    Is here anybody with a good idea for me?
    Thanks a lot in advance.
    Best regards,
    Ingo
    Edited by: Ingo Schmökel on Jul 1, 2008 7:20 PM

    Hi,
    There is one possibility which requires an enhancement of the
    BDT event ISDAT and a call to the function module
    BUP_BUPA_FIELDVALUES_SET. This means that an ISDAT function module needs to be written (transaction BUS7) which calls the function module BUP_BUPA_FIELDVALUES_SET with the needed values that are to be defaulted. You can read the role value using BUS_PARAMETERS_ISSTA_GET (T_RLTYP).The fields which are possible can be found in the DDIC structure BUSDEFAULT. However this is limited only to the fields inside this structure.
    Thanks and warm regards,
    Smita.

  • How to preset fields in a transaction BP with default values

    Hi!
    I want to fill few fields in transaction BP with default values.
    This should be if there`s a new business partner to insert.
    If i can do this depending on the selected role it was the best
    First i thought on SPA/GPA-parameters ... but then i can`t do it in depence on the selected role.
    In customizing i can tell only if a field should be displayed or not, for input or not, ... but no values to insert.
    Is here anybody with a good idea for me?
    I`ve posted my question first in crm-section but i think here it`s better
    Thanks a lot in advance.
    Best regards,
    Ingo

    Hi,
    There is one possibility which requires an enhancement of the
    BDT event ISDAT and a call to the function module
    BUP_BUPA_FIELDVALUES_SET. This means that an ISDAT function module needs to be written (transaction BUS7) which calls the function module BUP_BUPA_FIELDVALUES_SET with the needed values that are to be defaulted. You can read the role value using BUS_PARAMETERS_ISSTA_GET (T_RLTYP).The fields which are possible can be found in the DDIC structure BUSDEFAULT. However this is limited only to the fields inside this structure.
    Thanks and warm regards,
    Smita.

  • Initialize some fields in material master with default values

    Hi,
    I would like to initialize some fields in material master MM01 with default values.
    for exemple in the view MRP1 there is a field MRP type I would like to initialize PD in the field as default value.
    but when I go to the technical information there is no parameter id that I can use in SU3.
    Do you know how I can the initialize the field those don't have parameter ID?
    thank
    Dede

    Dear Glenn,
    This is possible in SAP for this use T code MMD1 and create MRP profile and assign this MRP profile while creating material using MM01 in the organisation level put this created MRP profile. The values you maintained in this profile get copied to the material by default.
    To maintain MRP profile go to MMD1->give your profile name...........> click on  selection screen push button--->give here profile description--->select what MRP  field which u want to make fixed one/default. if make fixed later you can not change--
    >click on data screen 1 push button and maintain your value and save
    sree

  • How to set focus and mark red on certain select option field

    hi experts
    I embedded a select_option view in my application and  tried to use IF_WD_SELECT_OPTIONS->request_focus to set focus on a certain select option field if the logical check failed, and also hope the low field of the select option can be marked red....but things does not happen that way....
    could anyone kindly tell me how to implement that requirement?
    tkx and regards
    sun

    What is the problem you are facing in this ?
    Requesting focus is easy.
    just call the method request focus and pass the id of the parameter whose lower value field you want to focus.
    as shown below.
    code you might have written in wddoinit
    DATA: LT_RANGE_TABLE TYPE REF TO DATA,
            RT_RANGE_TABLE TYPE REF TO DATA,
            READ_ONLY TYPE ABAP_BOOL,
            TYPENAME TYPE STRING.
        DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
            L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    *   * create the used component
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
        L_REF_CMP_USAGE->CREATE_COMPONENT( ).
      ENDIF.
        WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
        WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
    LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'ZDEALERID' ).
    * * add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD( I_ID = 'ID'
      IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
    code for focusing a field.
    wd_this->m_handler->request_focus( i_id = 'ID' ).
    you must have declared attributes m_handler and m_wd_select_options type reffering to IF_WD_SELECT_OPTIONS and
    IWCI_WDR_SELECT_OPTIONS respectively.
    and regarding that red color i am not sure it is possible without using message manager.
    thanks
    sarbjeet

  • Portal Forms - How to make a Field with DEFAULT value NON-EDITABLE by Users

    I HAVE A FORM WITH A DATE FIELD ON IT WITH DEFAULT VALUE.
    THIS IS A TABLE-FIELD.
    I WANT THE FIELD TO BE DISPLAYED ON THE FORM BUT NOT TO ALLOW
    USERS TO EDIT/CHANGE IT.
    HOW CAN I DO THIS?
    TKS IN ADVANCE

    Hi,
    see Re: sequencing problem-Forms
    Regards Michael

  • FormsCentral - design form : Initialize form field with default value

    Hello,
              My customer asks me to initialize text fields with default values. Example , Name , email , phone number etc to be displayed by default till it is overwritten by values entered. Could you please guide me how to achieve this ?
    Many Thanks,
    Sree

    Hi,
    see Re: sequencing problem-Forms
    Regards Michael

  • Select options field is giving type conflict when calling a class.

    hai guys,
           i have a field SALESORD in subscreen as a SELECT-OPTIONS field for vbeln.
    Now i created a class,with SALESDETAILS  of type TABLE as a parameter of a method.
    when i call the method(after creating an object) the SALESDETAILS parameter is supposed to take the SALESORD field.
      but it gives me a type conflict error.
    i wonder why..coz both fileds have same type..
    how to resolve the issue..
    helpful answers will be rewarded.
    thank you.

    Hi Shravan,
    Pass the select-options vbeln values into a temporary table and pass this table into the method.
    <b>Reward for helpful answers</b>
    Satish

  • Table editor problem with default value for column

    Hi there,
    I'm trying to use SQL Developer 1.2.1 on Ubuntu 7.10 (though I don't think the OS is relevant) and I'm running into a snag when trying to update table structures. If you go to edit the table to say modify a column name, and that column has a default value set, SQL Developer is encapsulating the value with brackets and quotes. When trying to save the changes, it complains about the default value being 4 chars too many for the column width. An example of this would be a currency code column of varchar2 (3) set with EUR as the default. SQL Developer changes the value to ('EUR') hence the error.
    Is there anyway to prevent this from happening?
    Cheers,
    Chris

    Could you please be more specific? In 1.2.1.32.40 I
    added the column COL1 VARCHAR2(3) with default value
    'EUR'. The data display field refreshed to show the
    default value, so I edited it in a couple of entries
    and comitted the change without problem. Then I
    renamed the column from the "Edit table" popup menu.
    Finally, I renamed the column from the "Rename
    column" popup menu, no problem either.Ah, you are correct. That does work. What I was trying is select tablename in the object browser, then right click on it and select "Edit" from the contextual menu. You are then presented with edit table dialog box. If you then select a column in that box you will see a column properties box. In that section you can change the name, default value, datatype et cetera. Note that your default column value which should just be EUR (or 'EUR' to denote that it's a string) is now ('EUR'). Once you try changing the name to of the column to something else and then click OK, you should then get an error complaining of "Invalid varchar2 default value" with a more specific message of "Default values size 7 is greater than the allowed 3"
    You have provided a work around, and thanks for that, but it would be nice to edit everything in the Edit table dialog box if you're modifying more than one column name. I'm tasked with cleaning up a bit of a messy database, and there are a good deal of columns to be renamed.
    Cheers,
    Chris

  • Disable select options field

    Hi,,
    I need to disable one of the select option field s_date in my selection screen.
    I need to it to have the values that are populated in the initialization event and disable it for further entries.
    Can someone please let me know how to do this.
    Thanks in advance.

    Use the following FM for that purpose:
    SELECT_OPTIONS_RESTRICT
    Refer the code:
    * Include type pool SSCR
    TYPE-POOLS SSCR.
    * Define the object to be passed to the RESTRICTION parameter
    DATA RESTRICT TYPE SSCR_RESTRICT.
    * Auxiliary objects for filling RESTRICT
    DATA OPT_LIST TYPE SSCR_OPT_LIST.
    DATA ***      TYPE SSCR_***.
    * Define the selection screen objects
    * First block: 3 SELECT-OPTIONS
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK_0 WITH FRAME TITLE TEXT-BL0.
      SELECT-OPTIONS SEL_0_0 FOR SY-TVAR0.
      SELECT-OPTIONS SEL_0_1 FOR SY-TVAR1.
      SELECT-OPTIONS SEL_0_2 FOR SY-TVAR2.
      SELECT-OPTIONS SEL_0_3 FOR SY-TVAR3.
    SELECTION-SCREEN END   OF BLOCK BLOCK_0.
    * Second block: 2 SELECT-OPTIONS
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK_1 WITH FRAME TITLE TEXT-BL1.
      SELECT-OPTIONS SEL_1_0 FOR SY-SUBRC.
      SELECT-OPTIONS SEL_1_1 FOR SY-REPID.
    SELECTION-SCREEN END   OF BLOCK BLOCK_1.
    INITIALIZATION.
    * Define the option list
    * ALL: All options allowed
      MOVE 'ALL'        TO OPT_LIST-NAME.
      MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
                   OPT_LIST-OPTIONS-CP,
                   OPT_LIST-OPTIONS-EQ,
                   OPT_LIST-OPTIONS-GE,
                   OPT_LIST-OPTIONS-GT,
                   OPT_LIST-OPTIONS-LE,
                   OPT_LIST-OPTIONS-LT,
                   OPT_LIST-OPTIONS-NB,
                   OPT_LIST-OPTIONS-NE,
                   OPT_LIST-OPTIONS-NP.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * NOPATTERN: CP and NP not allowed
      CLEAR OPT_LIST.
      MOVE 'NOPATTERN'  TO OPT_LIST-NAME.
      MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
                   OPT_LIST-OPTIONS-EQ,
                   OPT_LIST-OPTIONS-GE,
                   OPT_LIST-OPTIONS-GT,
                   OPT_LIST-OPTIONS-LE,
                   OPT_LIST-OPTIONS-LT,
                   OPT_LIST-OPTIONS-NB,
                   OPT_LIST-OPTIONS-NE.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * NOINTERVLS: BT and NB not allowed
      CLEAR OPT_LIST.
      MOVE 'NOINTERVLS' TO OPT_LIST-NAME.
      MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
                   OPT_LIST-OPTIONS-EQ,
                   OPT_LIST-OPTIONS-GE,
                   OPT_LIST-OPTIONS-GT,
                   OPT_LIST-OPTIONS-LE,
                   OPT_LIST-OPTIONS-LT,
                   OPT_LIST-OPTIONS-NE,
                   OPT_LIST-OPTIONS-NP.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * EQ_AND_CP: only EQ and CP allowed
      CLEAR OPT_LIST.
      MOVE 'EQ_AND_CP'  TO OPT_LIST-NAME.
      MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
                   OPT_LIST-OPTIONS-EQ.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * JUST_EQ: Only EQ allowed
      CLEAR OPT_LIST.
      MOVE 'JUST_EQ' TO OPT_LIST-NAME.
      MOVE 'X' TO OPT_LIST-OPTIONS-EQ.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * Assign selection screen objects to option list and sign
    * KIND = 'A': applies to all SELECT-OPTIONS
      MOVE: 'A'          TO ***-KIND,
            '*'          TO ***-SG_MAIN,
            'NOPATTERN'  TO ***-OP_MAIN,
            'NOINTERVLS' TO ***-OP_ADDY.
      APPEND *** TO RESTRICT-***_TAB.
    * KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
    *             that is, SEL_0_0, SEL_0_1, SEL_0_2
      CLEAR ***.
      MOVE: 'B'          TO ***-KIND,
            'BLOCK_0'    TO ***-NAME,
            'I'          TO ***-SG_MAIN,
            '*'          TO ***-SG_ADDY,
            'NOINTERVLS' TO ***-OP_MAIN.
      APPEND *** TO RESTRICT-***_TAB.
    * KIND = 'S': applies to SELECT-OPTION SEL-0-2
      CLEAR ***.
      MOVE: 'S'          TO ***-KIND,
            'SEL_0_2'    TO ***-NAME,
            'I'          TO ***-SG_MAIN,
            '*'          TO ***-SG_ADDY,
            'EQ_AND_CP'  TO ***-OP_MAIN,
            'ALL'        TO ***-OP_ADDY.
      APPEND *** TO RESTRICT-***_TAB.
    * KIND = 'S': Applies to SELECT-OPTION SEL_0_3
      CLEAR ***.
      MOVE: 'S'        TO ***-KIND,
            'SEL_0_3'  TO ***-NAME,
            'I'        TO ***-SG_MAIN,
            'N'        TO ***-SG_ADDY,
            'JUST_EQ'  TO ***-OP_MAIN.
      APPEND *** TO RESTRICT-***_TAB.
    * Call function module
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
           EXPORTING
                 RESTRICTION                = RESTRICT
    *           DB                          = ' '
           EXCEPTIONS
                 TOO_LATE                   = 1
                 REPEATED                   = 2
                 NOT_DURING_SUBMIT          = 3
                DB_CALL_AFTER_REPORT_CALL  = 4
                SELOPT_WITHOUT_OPTIONS     = 5
                 SELOPT_WITHOUT_SIGNS       = 6
                 INVALID_SIGN               = 7
                REPORT_CALL_AFTER_DB_ERROR = 8
                  EMPTY_OPTION_LIST          = 9
                 INVALID_KIND               = 10
                 REPEATED_KIND_A            = 11
                 OTHERS                     = 12.
    * Exception handling
      IF SY-SUBRC NE 0.
      ENDIF.

  • Select-Option field grey out-no further input

    Hi SDNers,
    I have select Option field  sales document type AUART ,I need to default the values and should grey out the field to not allow the user from entering any other value.
    I have tried using modif id,
    at-selection screen output
    loop at screen
    screen-intensified = '1'.
    modify screen.
    endloop.
    but this code only highlights the entire line,but doesn't meet the requirement.
    Please provide ur valuable suggestions.
    Thanks
    Reddy

    hi,
    use:
    at-selection screen output
    loop at screen.
    if screen-group1 = '123'.
      screen-input = 0.
      modify screen.
    endif.
    endloop.
    A.

Maybe you are looking for