Prefill Select-options in WD ABAP

Hi,
I need to prefill a select-options component with some fixed values. Do you anybody know how this is possible?
I know how to get the data out of the select-options component, but I have problems to get the data back to the
component.
Thank you for your help!

Do you mean you want to set the default values to the select option?
I think you can proceed as follows:
1) Fill range table with values that you want to set to the select option
2) Pass this table to method: SET_RANGE_TABLE_OF_SEL_FIELD
I hope this will help.
Regards,
Saket.

Similar Messages

  • Select-options in Webdynpro abap

    Hi,
    I want to use select options in webdynpro abap ,I checked links available in net but want a simple step by step procedure .
    -Sandeep

    Hi,
    What do you mean by simple steps? You need to write little code to add select options in WDA. You can check this wiki for reference: Web Dynpro ABAP - Complex select-options component usages - Code Gallery - SCN Wiki
    And there are lot more documents available in SCN. search here
    Regards,
    Kiran

  • Passing Select-options in OO ABAP

    Hi,
    How to use select-options in oo ABAP?
    Regards,
    Ravi S

    Hi Ravi,
    You have to define a type as below
    TYPES:tr_matnr  TYPE RANGE OF matnr.
    DATA: gv_matnr TYPE mara-matnr.
    SELECT-OPTIONS: so_matnr FOR gv_matnr.
          CLASS lcl_example DEFINITION
    CLASS lcl_example DEFINITION.
      PUBLIC SECTION.
        METHODS:
        get_data
             EXPORTING
               so_matnr TYPE tr_matnr.
    ENDCLASS.
          CLASS lcl_example IMPLEMENTATION
    CLASS lcl_example IMPLEMENTATION.
      METHOD get_data.
        SELECT COUNT(*)
          FROM mara
          WHERE matnr IN so_matnr[].
      ENDMETHOD.
    ENDCLASS.
    If you have to pass it globally create a table type that has the same structure as select-opton ( that is low high sign option ).
    PLEASE REWARD THE POINTS
    Thanks & Regards,
    Sujith

  • Default Values for Select-options In Webdynpro-ABAP

    Hi Freinds,
    Kindly,Help me in setting the Default values for the Select-options in Webdynpro ABAP.
    Here the Node and the Attributes are Created Dynamically, and then Displayed Select-options Component View.
    Regards,
    Xavier.P

    Xavier Reddy Penta sent me this question via email and I answered it directly yesterday. Here is the solution that I provided to him, so that it is stored with the original question:
    I believe your problem is that you are not setting the value into the range correctly.  You are setting it directly into the field symbol of the range like such:
    <FS> = L_STRING2.
    But ranges are deep objects. They have four fields: Sign, Option, High, and Low. This is from the online help:
    1.     sign of type c and length 1. The content of sign determines for every row whether the result of the condition formulated in the column is included or excluded in the entire resulting set for all rows. Evaluable values are "I" for include and "E" for exclude.
    2.     option of type c and length 2. option contains the selection option for the condition of the row in form of logical operators. Analyzable operators are "EQ", "NE", "GE", "GT", "LE", "LT", "CP" and "NP" if column high is initial, and "BT", "NB" if column high is not initial. With the options "CP" and "NP", the data type of the columns low and high must be of the data type c, and special rules apply for entries on the selection screen.
    3.     low of the data type defined after FOR. This column is designated for the comparison value or the lower interval limitation.
    4.     high of the data type defined after FOR. This column is designated for the upper interval limitation.
    So when you are moving the value into the field symbol you are setting it into the sign column.
    Here is an example of how you can access the components of the range:
    * create a range table that consists of this new data element
        lt_range_table =
          wd_this->lv_sel_handler->create_range_table(
               i_typename = l_typename ).
        IF l_fieldname = 'CARRID'.
          FIELD-SYMBOLS: <tab>         TYPE INDEX TABLE,
                             <struct>      TYPE ANY,
                             <wa>          TYPE ANY,
                             <option>      TYPE char2,
                             <sign>        TYPE char1,
                             <high>        TYPE ANY,
                             <low>         TYPE ANY,
                             <wa_values>   TYPE ANY.
          ASSIGN lt_range_table->* TO <tab>.
          APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
          ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
          ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
          ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
          ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
          <sign> = 'I'.
          <option> =  'EQ'.
          <low> = 'AA'.
        ENDIF.

  • Personalised Value Help in Select-Option field WD ABAP

    Hi
    I would like to know how I could provide the user with generic value help. I am using the Select Options in a Web Dynpro(ABAP) Application.
    Regards
    Faaiez

    Hi
    The key word here is "generic value help". This means the values that I want to fill the drop down with changes all the time based on various criteria. I need to fill the help values within the ABAP code based on the values in internal tables.
    Regards
    Faaiez

  • One search help for multiple select-options in webdynpro abap

    Hi,
    I need a way to use one search help for multiple select-options fields. My scenario is :
    I have a table for keeping different organizational units' values of different systems. I have pasted some sample data from this table at the end of this mail. On the screen I want to have 1 select-options filed for werks, and 1 select-options filed for vkorg. (In fact I will have more org. unit fields...) In the beginning of my application the user will select sid.
    If the user selects ADS as SID, when he opens search-help for the first org. unit (werks), he will see the records with SID: ADS, VARBL = $WERKS, LANGU = SY-LANGU.
    If the user selects AGT as SID, when he opens search-help for the second org. unit (vkorg), he will see the records with SID: AGT, VARBL = $VKORG, LANGU = SY-LANGU.
    I have created a search-help taking SIDD, VARBL and LANGU as import parameters; used field mapping and bound this search help to my table. I have created 2 context nodes : org1 and org2 having attributes SID, VARBL, VALUE, LANGU .
    I have assigned related SID, VARBL and Langu values to these attributes at runtime as I needed. That way, if I use input field and reference to the related context attributes org1-value and org2-value2 accordingly, search help works well as I want.
    However, when I use select-options field , I can not bind the field to the context data. I can give reference only to ddic structure. Is there any way to reference to a context attribute? I searched for this in SDN, but could find nothing.
    I think I won't be able to use this way. What do you say?
    As I read from forums maybe using OVS help will be suitable for me. But I have to use one search-help for all select-options fields. Do you know how I can determine the active select-options field and pass its name (for instance "werks" ) as parameter to this OVS search help. (Also I'll pass SID and LANGU.)
    MY TABLE (ZBYYT080) CONTENTS:
    SID     VARBL     VALUE     LANGU     VTEXT
    ADS     $WERKS     1     T     Werk 0001
    ADS     $WERKS     11     T     OZYAS  GIDA URETIM YERI
    ADS     $WERKS     5501     T     BOYA GEBZE FABRİKASI
    ADS     $WERKS     5502     T     BOYA CIGLI FABRİKASI
    AGT     $WERKS     2301     T     KAMLI DAMIZLIK
    AGT     $WERKS     9601     T     PANAR DENIZ URETIM YERI
    ADS     $VKORG     22     T     AA KİMYASALLAR
    ADS     $VKORG     8001     T     İINSAAT BOYALARI
    AGT     $VKORG     6500     T     DAMk St.Org
    AGT     $VKORG     5400     T     PANAR St.Org.
    I wish I'm clear enough..
    I will be gald if someone answers me as soon as possible...
    Thanks İn advance..
    MERAL

    Hi,
    Your ques is how to refer to a DDIC search help to refer to selection screen parameter ?
    Am I right ?
    If Yes, then in the interface IF_WD_SELECT_OPTIONS
    method ADD_SELECTION_FIELD, ADD_PARAMETER_FIELD etc
    have importing param like I_VALUE_HELP_TYPE and  I_VALUE_HELP_ID, I_VALUE_HELP_MODE, I_VALUE_HELP_STRUCTURE
    etc which may help you to link your create DDIC Search help to selection screen params.
    this is just a clue from my side. I haven't tried it myself.
    You can go to the where used list of this method and find some sample implementations which use these params.
    Hope this helps.
    Regards
    Manas Dua

  • Providing Default values to Select-Options in WD ABAP

    Dear Experts,
    Using reusable component  WDR_SELECT_OPTIONS im able to create select-options successfully ... I need your guidance to provide default values(type date) on the same select-options.
    Thanks a lot.
    Regards
    Siva Mandapudi.

    I do not see the relevance of this thread to FPM. Please follow this thread for your solution.
    [Default the value in  Parameter in wdr_select_options|Default the value in  Parameter in wdr_select_options]

  • Serach help in Select-option in WD ABAP

    Hi Folks,
    I am using WDR_SELECT_OPTIONS reusable component in my Component.  I want to attach customized search help particular fild while creating select-option using
    wd_this->m_handler->add_selection_field(
                 i_id        = 'IWERK'
                 it_result   = lt_range_table
                 i_read_only = read_only ).
    Can anyone explian how can I attach search help here.
    Regards,
    Vishal.

    Hi Vishal,
    If its a search help, use the following code:
    lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'S_PLANETYE' ).
    wd_this->m_handler->add_selection_field(
    i_id = 'S_PLANETYE'
    it_result = lt_range_table
    i_read_only = read_only
    I_VALUE_HELP_TYPE = 'SEARCHHELP'
    i_value_help_id = 'Z_SAPLANE' ).
    In this example, 'Z_SAPLANE' is the dictionary search help.
    This will solve your problem
    For further details, goto interface IF_WD_VALUE_HELP_HANDLER to get a list of values you can supply to parameter I_VALUE_HELP_TYPE.
    This is similar to what you do with a context, similar to the options you get in the dropdown for Input Help property.
    Regards,
    Chitrali

  • Web dynpro abap Select-option: upload data from clipboard

    Hi Experts,
    I have a select option in my ABAP Webdynpro application. My requirement is to give the "upload from clipboard" functionality for this select option as it is possible in normal R3.  Please help me on this issue as it is client requirement.
    Thank you in advance.
    Narendra

    Narendranath Reddy wrote:
    Hello Thomos,
    > thanks for your valuable reply.
    >
    > I found the clipboard button in WDR_SELECT_OPTIONS component which is disabled. Is it possible to enable that button using
    > enhancement and write the code as required ?
    >
    > Thanks & regards
    > Narendra
    No.  The button was disabled because the underlying framework support hasn't been delivered yet.  We need this feature implemented in the underlying JavaScript engine (which customers/partners shouldn't attempt to change or extend) before Web Dynpro can use it.

  • Unable to see select options in view

    HI ,
    I have the following code in the WdDOINIT method of my view for viewing a field as a select option...
    DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
    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.
    DATA: l_ref_interfacecontroller1 TYPE REF TO iwci_wdr_select_options .
    l_ref_interfacecontroller1 =   wd_this->wd_cpifc_select_options( ).
      DATA:
        l_r_helper_class TYPE REF TO if_wd_select_options.
      l_r_helper_class = l_ref_interfacecontroller1->init_selection_screen(
    data lt_range_table type ref to data.
    CALL METHOD l_r_helper_class->create_range_table
      EXPORTING
        i_typename     = 'BUKRS'
       i_length       =
       i_decimals     =
      receiving
        rt_range_table = lt_range_table
    CALL METHOD l_r_helper_class->add_selection_field
      EXPORTING
        i_id                         = 'BUKRS'
       i_within_block               = mc_id_main_block
        i_description                = 'Empresa'
       i_is_auto_description        = abap_true
        it_result                    = lt_range_table
       i_obligatory                 = abap_false
       i_complex_restrictions       =
       i_use_complex_restriction    = abap_false
       i_value_help_type            = if_wd_value_help_handler=>co_prefix_none
       i_value_help_id              =
       i_value_help_mode            =
       i_value_help_structure       =
       i_value_help_structure_field =
       i_help_request_handler       =
       i_lower_case                 =
       i_memory_id                  =
       i_no_extension               = abap_false
       i_no_intervals               = abap_false
       i_as_checkbox                = abap_false
       i_as_dropdown                = abap_false
       it_value_set                 =
       i_read_only                  = abap_false
       i_dont_care_value            =
    Besides this, the WND_SELECTION_SCREEN view is embedded in the respective container as follows...
    Tray - >Container - this container has the WND_SELECTION_SCREEN.
    I can see the tray in the view cannot see any field (expectation was to see a select-option for BUKRS.
    Any hints? Am i missing something. I have followed the tutorial for select options in webdynpro abap.
    regards,
    Priyank

    Hi Sascha,
    No i cannot see the buttons either.
    Following is how the view is embedded.
    View - > Tray - >viewcontaineruielement-> wnd_selection_screen.
    Am i missing something?
    regards,
    Priyank

  • Re : select-options in abap-objects program

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

    In the transaction SE24, enter your class name, click modify.
    in the tab named "Types" you have to declare two types. By example, if you want to receive one select-options that in your program that uses this class is declared like:
    " P_SAKNR FOR SKAT-SAKNR".
    you've got to declare two types in the class:
    a- TYPES:  begin of E_S_SAKNR,
                          sign(1),
                          option(2),
                          low(10),
                          high(10),
                      end of E_S_SAKNR.
    b - TYPES E_T_SAKNR type standard table of E_S_SAKNR.
    so, in the class method that you want to receive P_SAKNR as importing parameter. You got to do this:
    method TEST importing ET_SAKNR type E_T_SAKNR.
    now, in the implementation of this method you should be able to use ET_SAKNR as the same way as you usually use a parameter or a select-option. You could use it in a select with the operator IN by example..

  • 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

  • Select-option in ABAP objects

    Hi Guys,
               I need a small help from you. I want to know how to populate the value from select-option to abap object. Please help me, it is very important

    check this code
    REPORT ZSELOPT_TO_CLASS .
    TABLES: VBRK.
    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
    DATA: IT_VBELN TYPE RSELOPTION.
    DATA: X_VBELN TYPE RSDSSELOPT.
    CLASS C1 DEFINITION.
    PUBLIC SECTION.
    DATA: IT_VBRP TYPE VBRP_TAB,
          X_VBRP LIKE LINE OF IT_VBRP.
    METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.
    METHODS: DISP_DATA.
    ENDCLASS.
    CLASS C1 IMPLEMENTATION.
    METHOD GET_DATA.
      *SELECT * FROM VBRP*
       INTO TABLE IT_VBRP
       WHERE VBELN IN S_VBELN.
    ENDMETHOD.
    METHOD DISP_DATA.
      LOOP AT IT_VBRP INTO X_VBRP.
        WRITE:/ X_VBRP-VBELN,
                X_VBRP-POSNR.
      ENDLOOP.
    ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
    DATA OBJ TYPE REF TO ZCL_SELOPT.
    CREATE OBJECT OBJ.
    LOOP AT S_VBELN.
      MOVE S_VBELN-LOW TO X_VBELN-LOW.
      MOVE S_VBELN-HIGH TO X_VBELN-HIGH.
      MOVE S_VBELN-SIGN TO X_VBELN-SIGN.
      MOVE S_VBELN-OPTION TO X_VBELN-OPTION.
      APPEND X_VBELN TO IT_VBELN.
    ENDLOOP.
    CALL METHOD OBJ->GET_DATA
                        EXPORTING
                          S_VBELN = IT_VBELN.
    CALL METHOD OBJ->DISP_DATA.
    Edited by: moazam hai on May 17, 2008 6:17 AM
    Edited by: moazam hai on May 17, 2008 6:19 AM

  • ABAP list report, multiple selections - select-options

    I have written a very simple ABAP list report, that contains a single select-option.  On the selection screen, I have the option of entering multiple values, with each new value being displayed directly underneath the old, but I am only getting the first value entered on the screen displayed.  Does anyone have any sample code for me?

    Hi Daniel,
    Select_Options consists of 4 parameters, in with the range consists in eg...
    Select-options s_vbeln for vbak-vbeln.
    then s_vbeln-low, s_vbeln-high are the range values...
    So whne you write select query.
    write vbeln in s_vbeln
    instead of vbeln eq s_vbeln
    Hope this solves your problem.
    Thanks & Regards,
    Dileep .C

  • How to set default value in select option for ABAP query

    Hi experts,
    What is the way to set up default values for select-options in ABAP query.
    e.g.
    I have one field 'Year' in my ABAP query selection screen.
    I want value of current year to be appeared here whenever user execute report
    Thanks in Advance
    -Harkamal

    Hi Harkamal,
    execute your Query via SQ01. On Selection-Screen
    goto save Variant. Mark your field
    as selection variable an press Button election variable.
    Take variable from TVARV and use it.
    Than save the Variant.
    Look at TVARV if the 'Year' is updated to the actualYear!
    regards, Dieter

Maybe you are looking for

  • Regarding upgrade of web report\web templates functionalites BW 3.5-BI 7.0

    hi all,          I m working on a Upgrade study from BW 3.5 to BI 7.0 for Web Templates,web items and java scripts. Below is the scenario of the client system: New web templates are created from the 6 master web templates available for publishing to

  • Time [ Quota Generation for Part-time employees]

    Hi Experts, I need a help.  I have a following issue. 1] Whenever an employee is marked with a tick '' as Part-time], I want the quota to be generation based on the Weekly workdays [field in SAP WKWDY]. 2]  I used the option of defining reduction rul

  • I want to leave BT but no-one answers the phone

    After 20 years as a BT customer I've had enough. I have had no home phone line since Saturday (a line came down in the snow) and BT are saying it *may* be fixed next week. Calls are diverted to may mobile, but we live in a rural area and mobile recep

  • FTP/File Sender Adapter over SSL - 500 Illegal PORT command.

    Hello Experts! I'm trying to configure FTP Sender Adapter over SSL. This is the configuration I'm using: Server: server01 Port: 21 Data Connection: Active Timeout: 100 Connection Security: FTPS (FTP Using SSL/TLS) for Control and Data Connection Comm

  • Text Elements in Export to Excel functionality

    Hello Gurus,      I have added Export to Excel functionality button on my web template and also added a Text Element Web Item to my web template. I am unable to get the Text Elements into the Excel Sheet when I click on Export to Excel button. Is the