ERROR IN SELECT-OPTIONS COMPONENT

Hi Friends,
Currently, I am working on SELECT-OPTIONS component, Variants.
In component controller WDDOINIT, I have got the instantiated the select-options component.
And I have one more pop-up view, in Get_variant action method ,I will be getting the data of Variants and Using the methods set_range_table_of_sel_filed( ) and set_value_of_parameter_filed( ), I am setting the data to Selection-screen.
For select-options fileds.
CALL METHOD wd_comp_controller->m_handler->set_range_table_of_sel_field(
                    EXPORTING
                    i_id           = l_searchparameter-name
                    it_range_table = l_dref ).
for Parameter fileds.
ALL METHOD wd_comp_controller->m_handler->set_value_of_parameter_field(
                                EXPORTING
                                i_id = l_searchparameter-name
                                i_value = l_dref ).
It runs successfully for all the fileds , and after coming out of this method, I am getting an error like
Subnode WDR_SELECT_OPTIONS#COMPONENTCONTROLLER.CONTEXT.BEGDA does not exist.
But in webdynpro, For select-option fileds we will not be creating any context.
Could you please help me, in solving this issue.
Regards,
Xavier.P
Edited by: Xavier Reddy on Jan 20, 2009 11:07 AM

Hi Xavier,
CALL METHOD wd_comp_controller->m_handler->set_range_table_of_sel_field(
EXPORTING
i_id = l_searchparameter-name
it_range_table = l_dref ).
Put a break point on the method and check what value is passed in i_id field because here we pass the name of the field for which we want to create the range.
Regards
Arjun
Edited by: Arjun on Jan 20, 2009 4:11 PM

Similar Messages

  • Error in Select-Option

    Hi Experts,
    In my report i need to declare a select-option . This select-option is a combination of Period and fiscal year i..e the values in the select-option should be like
    <b>PPP/YYYY</b> period and year need to be separated by <b>"/".</b>
    I had declared in that format. <b>Here the period starts from 001-012</b>.So when ever the User enters <b>010/2005</b> in low and <b>007/2007</b> in high it is giving an error that <b>Lower limit is greater than Higher limit</b> .

    Technically, I think you could actually achive this with the use of a custom data domain and on that domain refer to a custom conversion exit...this would mean that the value typed by the user in "PPP/YYYY" format could be converted immediately into "YYYYPPP" or whatever internally before screen validation kicks in... e.g. (logic below needs more work!!):
    function conversion_exit_zppyy_input.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(INPUT)
    *"  EXPORTING
    *"     REFERENCE(OUTPUT)
    * Data should be in form PPP/YYYY
      data:
        l_ppp(3)            type c,
        l_yyyy(4)           type c.
      output = input.
    *" add some validation here...
      split output at '/'
        into l_ppp l_yyyy.
    *" add more validation here
      if sy-subrc is initial.
    *" make it into YYYYPPP format
        concatenate l_yyyy l_ppp into output.
      endif.
    endfunction.
    You'd probably need an equivalent 'conversion_exit_zppyy_output" function too.
    The question remaining in my mind is what you are going to do with the values once you have them in the range table...?  And what if user inputs wildcards etc?
    Jonathan

  • WCF OData Service stored procedure call generates "Operation could destabilize the runtime" error with $select option

    I've been trying to call a stored procedure through Entity Framework and WCF Data Services (OData). It returns an entity not a complex type. Following walkthroughs found all over the web, I came up with this code inside my service:
    [WebGet]
    public IQueryable<Entity> GetEntitiesByParameterId(int parameterId)
    return CurrentDataSource.GetEntitiesByParameterId(parameterId).AsQueryable();
    Calling the proc this way: ~WcfService.svc/GetEntitiesByParameterId?parameterId=1 executes
    the stored procedure and returns entities that should be returned. No problem there.
    Everything works well until I try to use $select OData option ie. ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name.
    Upon debugging, the method above runs without any error but it returns an Operation could destabilize the runtime error upon reaching the
    client. After so much research, apparently it is a very general error pointing to a lot of different causes. I haven't found one that really matches my particular problem. Closest are 
    http://stackoverflow.com/questions/378895/operation-could-destabilize-the-runtime
    https://social.msdn.microsoft.com/Forums/en-US/d2fb4767-dc09-4879-a62a-5b2ce96c4465/for-some-columns-entity-properties-executestorequery-failed-with-error-operation-could?forum=adodotnetdataservices 
    but none of the solutions worked on my end.
    Also, from the second article above:
    This is a known limitation of WCF DS. ...
    Second is that some of the queries won't work correctly because LINQ to EF needs little different LINQ expressions than LINQ to Objects in some cases. Which is the problem you're seeing.
    It has been posted on 2012. If it its true, are there still no updates on this? And is there any other workaround to get the $select working on the stored proc call?
    What works:
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$top=1
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$skip-5
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$filter={filter query}
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$expand=SomeNavigationProperty
    What doesn't work:
    ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name
    Tech details:
    EntityFramework 5, WCF Data Service 5.0, OData V3
    *I've also tried upgrading to EF6 and WCF 5.6.2 and it still didn't work.
    Any help would be appreciated. Thanks!

    Someone from SO replied to my question there and said that $select is still not supported though I couldn't find any definitive documentation about it.
    From what I gather and observed, $select breaks the stored procedure call because it tries to alter the data shape already gotten from the database and attempts to return a dynamic entity instead. Something about the stored proc returning an ObjectResult might
    be messing it up. As I have said, these are merely my observations.
    Workaround: I found a simple and elegant workaround for it though. Since my stored procedures are only getting data from the database and does
    not alter data in any way (INSERT, UPDATE, DELETE), I tried using table-valued functions that returns a table equivalent to the entity on my EF. I've found that calling this function on the Service Operation method returns an IQueryable<Entity> which
    is basically what is needed. $select also works now and so does other OData query options.
    Steps:
    Create a function on the database
    Update EDMX -> Add function
    Add new Function Import with Entity return type
    Create service operation in WCF Data Service that calls CurrentDataSource.<FunctionName>()
    Test in fiddler.
    CODES
    Database Function:
    CREATE FUNCTION GetEntities(@parameter)
    RETURN @entites TABLE(
    [Id] [int],
    [Name] [nvarchar](100),
    AS
    BEGIN
    INSERT INTO @entities
    SELECT [Id], [Name], ... FROM [EntityTable]
    RETURN
    END
    WCF:
    [WebGet]
    public IQueryable<Entity> GetEntity(int parameter)
    return CurrentDataSource.GetEntity(parameter);
    It doesn't really solve the stored procedure problem but I'm marking this as answer until someone can provide a better one as it does solve what I'm trying to do.
    Hope this helps others too. :)

  • WD -Select options - DUMP -Practicing Rich heilman's app

    Hi,
    I am practising the tutorial created by Rich heilman /people/rich.heilman2/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application
    I am getting following dump while running i browser.
    Error when processing your request
    What has happened?
    The URL http://ssss.com/sap/bc/webdynpro/sap/ytest/ was not called due to an error.
    Note
    The following error text was processed in the system DV1 : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server sape-dev_DV1_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DV1 in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server sape-dev_DV1_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server sape-dev_DV1_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 180 -u: XXXXX -l: E -s: DV1 -i: sape-dev_DV1_00 -w: 0 -d: 20090112 -t: 162129 -v: RABAX_STATE -e: RAISE_EXCEPTION
    All I did is i used a different table and follwed all steps.
    Rich,
    Thank you for the wonderful blog.
    Any idea?
    rgds
    Vara
    Edited by: Vara K on Jan 12, 2009 11:26 PM
    Edited by: Vara K on Jan 12, 2009 11:34 PM

    Rich,
    Here is what I did.
    I changed SFLIGHT TABLE to PROJ and tried to put only one select-options for field PSPNR.
    Node name = PROJ.
    I kept a break-point in these methods but  it got dumped before that only.
    method 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.
    * get a pointer to the interface controller of the select options
    *component
    wd_this->m_wd_select_options =
    wd_this->wd_cpifc_select_options( ).
    * init the select screen
    wd_this->m_handler =
    wd_this->m_wd_select_options->init_selection_screen( ).
    * create a range table that consists of this new data element
    lt_range_table =
    wd_this->m_handler->create_range_table(
    i_typename = 'S_PSPNR_ID' ).
    *add a new field to the selection
    wd_this->m_handler->add_selection_field(
    i_id = 'S_PSPNR_ID'
    it_result = lt_range_table
    i_read_only = read_only ).
    endmethod.
    method ONACTIONCONTINUE .
    data: node_proj type ref to if_wd_context_node.
    data: rt_pspnr type ref to data.
    data: iproj type table of proj.
    data: wproj type proj.
    field-symbols: <fs_pspnr> type table.
    * Retrieve the data from the select option
    rt_pspnr = wd_this->m_handler->get_range_table_of_sel_field(
    i_id = 'S_PSPNR_ID' ).
    * Assign it to a field symbol
    assign rt_pspnr->* to <fs_pspnr>.
    * Retrieve that data from the database. Normally it is suggested to
    * encapsulate the data retrieval in a separate class.
    * For simplicity, the SELECT statement has been implemented here.
    clear iproj. refresh iproj.
    select * into corresponding fields of table iproj from proj
    where pspnr in <fs_pspnr>.
    * Bind the data to the context
    node_proj = wd_context->get_child_node( name = `PROJ` ).
    node_proj->bind_elements( iproj ).
    endmethod.
    rgds
    vara
    Edited by: Vara K on Jan 13, 2009 12:10 AM

  • 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

  • Select option in web dyn pro

    Hi,
    Is there any way to deafult current date to date select-option in web dyn pro?

    hi,
    Check following code:
    DATA:
           lr_componentcontroller TYPE REF TO ig_componentcontroller,
           l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      DATA:
          lt_range_table       TYPE REF TO data,
          lt_types             TYPE string_table,
          rt_range_table       TYPE REF TO data,
          text                 TYPE string,
          typename             TYPE string.
      DATA: vbeln TYPE lips-vbeln,
            erdat TYPE lips-erdat,
            auart TYPE vbak-auart,
            trnsp TYPE vtadd01t-add_info,
            kunnr TYPE likp-kunnr.
      DATA:
        num_events TYPE i.
      DATA: uname TYPE sy-uname.
      uname = sy-uname.
      wd_context->set_attribute(  name = 'CUSTOMER'
      value = uname  ).
    wd_context->GET_ATTRIBUTE( Name = 'TRANSPORTER_CODE'
    Value = uname ).
    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.
    get a pointer to the interface controller of the select options component
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    init the select screen
      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 = 'VBELN_VL' ).
      wd_this->m_handler->add_selection_field(
        i_description                = 'Sales Document'
        i_id                         = 'VBELN'
        i_obligatory                 = 'X'
        it_result                    = lt_range_table
        i_value_help_structure       = 'LIPS'
        i_value_help_structure_field = 'VBELN' ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'ERDAT' ).
      wd_this->m_handler->add_selection_field( i_id = 'ERDAT'  i_obligatory = 'X' it_result = lt_range_table ).
    *lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VTTK_ADD01' ).
    *wd_this->m_handler->add_selection_field( i_id = 'VTTK_ADD01' I_DESCRIPTION  = 'CHAHA' it_result = lt_range_table ).
       wd_this->m_handler->add_selection_field(
         i_description                = 'Transporters Code'
         i_id                         = 'VTTK_ADD01'
         it_result                    = lt_range_table
         i_value_help_structure       = 'VTADD01T'
         i_value_help_structure_field = 'ADD_INFO' ).
    *Supress Global options in Used Component
      wd_this->m_handler->set_global_options(
          i_display_btn_cancel  = ''
          i_display_btn_check   = ''
          i_display_btn_execute = ''
          i_display_btn_reset   = '' ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBAK-AUART' ).
      wd_this->m_handler->add_selection_field(
        i_description                = 'Sales Document Type'
        i_id                         = 'AUART'
         i_obligatory                = 'X'
        it_result                    = lt_range_table
        i_value_help_structure       = 'VBAK'
        i_value_help_structure_field = 'AUART' ).
    ENDMETHOD.
    METHOD onactionexecute .
      DATA: node_saledoc TYPE REF TO if_wd_context_node.
      DATA: node_crdate TYPE REF TO if_wd_context_node.
      DATA: node_transcode TYPE REF TO if_wd_context_node.
      DATA: node_doctype TYPE REF TO if_wd_context_node.
      DATA: node1 TYPE REF TO if_wd_context_node.
      DATA: node2 TYPE REF TO if_wd_context_node.
      DATA: rt_saledoc TYPE REF TO data.
      DATA: rt_crdate TYPE REF TO data.
      DATA: rt_transcode TYPE REF TO data.
      DATA: rt_doctype TYPE REF TO data.
      FIELD-SYMBOLS: <fs_saledoc> TYPE table,
                      <fs_crdate> TYPE table,
                      <fs_transcode> TYPE table,
                      <fs_doctype> TYPE table.
    Retrieve the data from the select option
      rt_saledoc = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'VBELN' ).
    Assign it to a field symbol
      ASSIGN rt_saledoc->* TO <fs_saledoc>.
    Retrieve the data from the select option
      rt_crdate = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'ERDAT' ).
    Assign it to a field symbol
      ASSIGN rt_crdate->* TO <fs_crdate>.
    Retrieve the data from the select option
      rt_doctype = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'AUART' ).
    Assign it to a field symbol
      ASSIGN rt_doctype->* TO <fs_doctype>.
    Retrieve the data from the select option
    *rt_transcode = wd_this->m_handler->get_range_table_of_sel_field(
    *i_id = 'VTTK_ADD01' ).
    Assign it to a field symbol
    assign rt_transcode-> to <fs_transcode>.
      node_saledoc = wd_context->get_child_node( name = 'S_VBELN' ).
      node_saledoc->bind_table( <fs_saledoc> ).
      node_crdate = wd_context->get_child_node( name = 'S_ERDAT' ).
      node_crdate->bind_table(  <fs_crdate> ).
      node_doctype = wd_context->get_child_node( name = 'S_AUART' ).
      node_doctype->bind_table( <fs_doctype> ).
      IF <fs_doctype> IS NOT INITIAL
        AND <fs_crdate> IS NOT INITIAL
        AND <fs_saledoc> IS NOT INITIAL
        wd_comp_controller->execute_zotddelvnote_vend_tari( ).
      ENDIF.

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

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

  • Disable the Select-options field in the viewcontainer

    Hi,
    I  have two select option fields(Date,Number) in a viewcontainer .
    Now i need to disable one of the select-option field(Date) in the view container based on the condition.If I give Enability for the view container then both the select options will get diasbled.Is there any way to disable only Date select-option field in the view container.
    Thanks in Advance.
    Regards,
    bala.

    Hi,
    I just tested this solution and it is working for me....Following on Thomas's suggestion...I did the following....
    I just had one select-option on my scr...but it can be done with two too...
    step1: 
    created three attributes at component level under the attribute tab ( as suggested by Thomas )
    ENABLE_PRI_SELECTOPTION type  WDY_BOOLEAN 
    M_HANDLER type ref to     IF_WD_SELECT_OPTIONS
    M_WD_SELECT_OPTIONS  type ref to     IWCI_WDR_SELECT_OPTIONS
    Note: all are with public check box checked....so that all your views can see these attributes
    I created a method at componenet controller leverl:  create_select_option....in this method i have following code:
    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.
    * get a pointer to the interface controller of the select options
    *component
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
    * create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler->create_range_table(
      i_typename = 'PERSNO' ).
    * add a new field to the selection
      wd_this->m_handler->add_selection_field(
      i_id = 'PERSNO'
    I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR'
    I_NO_INTERVALS = abap_true
      it_result = lt_range_table
      i_read_only = wd_this->ENABLE_PRI_SELECTOPTION ).   <-----pls see here how i am controlling the read only property
    I assume you know this much...already....but i am just putting everything down....
    step2:
    in my view where i want to display the select-options....i added this code under my wddoinit method
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_false.    <--pls see initially we want this field to be open
      lo_componentcontroller->create_select_option(
    step3: 
    i did not have much logic to control the select option field so i added a button which if user presses the field become disable...
    under that button action method i added the following code:
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_true.
       "<---pls see here how i am changing the global *attribute which Thomas has suggested for controlling the "read only" attibute for the select-option field....you can put this under *your "if" statement....
    "this step is very important if you do not remove the field you will get the dump...since it will try to add the same field again
    "which produces dump from system....
    lo_componentcontroller->m_handler->REMOVE_SELECTION_SCREEN_ITEM(
    i_id = 'PERSNO' ).
    "now call the same method which we created at component level to create the select_options...
    lo_componentcontroller->create_select_option(
    that is all....it works great for me.....let us know if still have any questions....
    Thanks...
    AS...

  • Enabling Select-options in an RFC function module

    Hi Abaper's,
    I am using BAdi definition NOTIF_EVENT_SAVE for sending mail notification to user.
    Under CHANGE_DATA_AT_SAVE method I have called an RFC enabled function module and written code here for mail notification.I used cl_bcs class for sending file.On executing this I am getting a mail box wherein we can enter user id and send mail.But I don't want to use cl_bcs for sending mail now.So I modified the code by including SO_NEW_DOCUMENT_SEND_API1 function.
    My requirement is I want to enable select-options in this function module so that user can get a popup wherein he can select user name from master.On activating I am getting following error:
    Local SELECT-OPTIONS are not allowed (FORM routine or GET event is active).
    Can any one help me how to resolve this error?
    I am using this customized function module for mail notification.If I hardcode mail id,notification is working properly.
    Regards,
    Sam

    sam24 wrote:>
    > My requirement is I want to enable select-options in this function module so that user can get a popup wherein he can select user name from master
    Hi Sam,
    in the function groups TOP include, you can define a selection-screen:
    SELECTION-SCREEN BEGIN OF SCREEN 9786 [TITLE title].
    select-options: s_uname for ...
    SELECTION-SCREEN END OF SCREEN 9786.
    and in the function use
    CALL SELECTION-SCREEN dynnr
                          [STARTING AT col1 lin1
                          [ENDING   AT col2 lin2]]
    Everything declared in the function body source code is local.
    But you must make sure that CHANGE_DATA_AT_SAVE is not processed in update task.
    Regards,
    Clemens
    Edited by: Clemens Li on Jan 16, 2011 7:36 PM

  • Create Popup like Select options

    Hi at all,
    I want to create a button that calls a popup like in the select options, without using the select options component.
    In Standard ABAP there is a function called "COMPLEX_SELECTIONS_DIALOG" who creates and call the dialog.
    Does anybody know an adaption for this function in Web Dynpro for ABAP?
    Thx a lot to all.
    Dirk

    Hello Dirk,
    We have a new enhacement in code wizord by which you could replicate a screen into a webdynpro view.
    So the framework would choose different ui elements to create similar screen,
    Regards
    Anurag Chopra

  • WD for ABAP - select options

    hi folks,
    has anyone ever used the select-options component in an own abap webdynpro application, i know there is a sample program but no documentation on it, can anyone give me a hint how to use it easily?
    kind regards,
    oliver

    Hi Oliver,
    Just embbed the WND_SELECTION_SCREEN interface view into a view container in your window. Then call method INIT_SELECTION_SCREEN of the component interface and obtain the handle to the helper interface. This interface offers various methods to set up and change a selection options area. In the beginning you might want to call ADD_SELECTION_FIELD() to add as many fields as you like. There several others methods as well to add text lines, group selection fields in blocks, etc. Mostly, it is a 1:1 conversion of the functionality provided by the dynpro select options. In case you don't like the default buttons at the top, you can switch them off by calling SET_GLOBAL_OPTIONS. A range table can be created dynamically by calling method CREATE_RANGE_TABLE().
    Hope this helps.
    Kind regards,
    Thomas

  • WDA select-options value help configuration

    Hello,
    I would like to configure the value help in the select-options component in WebDynpro ABAP. I used the parameter I_VALUE_HELP_TYPE of the method ADD_SELECTION_FIELD, but I didn't know how to pass a correct value for this parameter. Could someone give me an example with coding? That would be great! Thanks in advance.
    Regards,
    Georg

    For those of you who, like me, get a screen full of OTR keys on the buttons and tabs, the answer is on the first tab, 6th button.  Note that it is based on SPFLI, so the expected linkage between CARRID and CONNID does not happen.
    The code is in MAIN_VIEW method ONACTIONON_CRS_FLD_F4_CASES.
    The essence of it is:
        wd_this->m_handler->add_selection_field(
            i_id                         = CARRID
            it_result                    = lt_range_table
            i_value_help_structure       = 'SFLIGHT'
            i_value_help_structure_field = "CARRID  ).
        wd_this->m_handler->add_selection_field(
            i_id                         = CONNID
            it_result                    = lt_range_table
            i_value_help_structure       = 'SFLIGHT'
            i_value_help_structure_field = "CONNID  ).
    The result is that you select the CARRID, and that restricts the CONNIDs.
    I have used SFLIGHT because it will give linked search helps for CARRID and CONNID.  It works with parameters too, but remember GET_PARAMETER_FIELD is not currently implemented (it exists, but contains no code, so your program will seem to work, but it won't) , so use GET_PARAMETER_FIELDS which does work.

  • Requirement to maintain select-options for multiple fileds in webdynpro aba

    Hello Gurus,
    We have a requirement to maintain select-options for multiple fileds in webdynpro abap.
    now we are able to create select-options for a single field using wdr_select_options componet usage.
    how can we achive this select-options feature for multiple fields.
    Could anyone please suggest solutions?
    and if possible send me the sample code for this requirement.
    Thanks in Advance for your replies.
    Regards,
    Shyam

    Hi,
    Nothing different for more fields, same. some declaration changes.
    For example code i am using.. in WDDOINIT method.
    TYPES:
        fiscal_year TYPE RANGE OF GJAHR,
        S_KUNNR TYPE RANGE OF J_3RS_KUNNR,
        S_VKORG TYPE RANGE OF VKORG_RAN,
        status type PVWTY-RETPA,
        ty_r_date TYPE RANGE OF s_date,
        ty_s_date TYPE LINE OF ty_r_date.
    DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_cmp_sel_opt( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    * Reference variable used instantiate the select-options component
      DATA
        lr_cmp_usage TYPE REF TO if_wd_component_usage.
    * Variables used to create the select-options fields and
    * define its initial values
      DATA:
        lr_field TYPE REF TO data,
        ls_date  TYPE ty_s_date.
      FIELD-SYMBOLS:
        <fs_field> TYPE ANY,
        <fs_range> TYPE INDEX TABLE.
    * Instantiate the select-options component
      lr_cmp_usage = wd_this->wd_cpuse_cmp_sel_opt( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lo_interfacecontroller =   wd_this->wd_cpifc_cmp_sel_opt( ).
    wd_this->m_sel_opt = lo_interfacecontroller->init_selection_screen( ).
    data : vhelp type wdy_md_value_help_mode_enum .
    * Sets the helper reference
      wd_this->m_sel_opt1 = wd_this->wd_cpifc_cmp_sel_opt( ).
      wd_this->m_helper  = wd_this->m_sel_opt1->init_selection_screen( ).
    * Hide the standard select-options components.
      wd_this->m_helper->set_global_options(
        i_display_btn_cancel = abap_false
        i_display_btn_check  = abap_false
        i_display_btn_reset  = abap_false
        i_display_btn_execute  = abap_false
      lr_field = wd_this->m_helper->create_range_table( `KUNNR` ).
      wd_this->m_helper->add_selection_field(
        i_id           = `KUNNR`
        I_DESCRIPTION  = 'Customer Code'
    *    i_within_block = `BL01`
        it_result      = lr_field ).
      FREE lr_field.
      lr_field = wd_this->m_helper->create_range_table( `VKORG` ).
      wd_this->m_helper->add_selection_field(
        i_id           = `VKORG`
        I_DESCRIPTION  = 'Sales Organization'
    *    i_within_block = `BL01`
        it_result      = lr_field ).
      FREE lr_field.
    Go through this..
    http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages
    Cheers,
    Kris.

  • Using Select options how to validate

    Hi Experts,
    I am using webdynpro abap component select options.In select options i am using vbeln field i want to validate the entered value.How to validate it.Can give me for this solution is there any example provide me.

    Hi Chandra sekhar ,
    Can you give me the clear idea for validation.I have done initially in wddoinit
    method WDDOINIT .
    * Reference variable used instantiate the select-options component
    DATA
    lr_cmp_usage TYPE REF TO if_wd_component_usage.
    * Variables used to create the select-options fields and
    * define its initial values
    DATA:
    lr_field TYPE REF TO data.
    FIELD-SYMBOLS:
    <fs_field> TYPE ANY,
    <fs_range> TYPE INDEX TABLE.
    * Instantiate the select-options component
    lr_cmp_usage = wd_this->wd_cpuse_cmp_sel_opt( ).
    IF lr_cmp_usage->has_active_component( ) IS INITIAL.
    lr_cmp_usage->create_component( ).
    ENDIF.
    * Sets the helper reference
    wd_this->m_sel_opt = wd_this->wd_cpifc_cmp_sel_opt( ).
    wd_this->m_helper = wd_this->m_sel_opt->init_selection_screen( ).
    * Hide the standard select-options components.
    wd_this->m_helper->set_global_options(
    i_display_btn_cancel = abap_false
    i_display_btn_check = abap_false
    i_display_btn_reset = abap_false ).
    * Adding a block (type Tray) to the select-options
    wd_this->m_helper->add_block(
    i_id = `BL01`
    i_block_type = if_wd_select_options=>mc_block_type_tray
    i_title = `Flight Booking` ).
    * Adding a parameter field to the created block
    * Create a reference to the type of airline code
    CREATE DATA lr_field TYPE s_carr_id.
    * Sets the airline code initial value
    ASSIGN lr_field->* TO <fs_field>.
    <fs_field> = 'AA '.
    * Add the parameter to the group
    wd_this->m_helper->add_parameter_field(
    i_id = `CARRID`
    i_within_block = `BL01`
    i_value = lr_field ).
    FREE lr_field.
    UNASSIGN <fs_field>.
    * Adding a select-options field to the created block
    * Create a reference to the connection number range table
    lr_field = wd_this->m_helper->create_range_table( `S_CONN_ID` ).
    * Add the select-option to the group
    wd_this->m_helper->add_selection_field(
    i_id = `CONNID`
    i_within_block = `BL01`
    it_result = lr_field ).
    FREE lr_field.
    endmethod.
    and in button i have done as
    method ONACTIONON_EXECUTE .
      TYPES:
    lty_r_connid TYPE RANGE OF s_conn_id.
    DATA
    lr_sbook TYPE REF TO if_wd_context_node.
    * Variables used to retrieve the values of select-options fields
    DATA
    lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
    FIELD-SYMBOLS:
    <fs_sel_item> LIKE LINE OF lt_sel_item,
    <fs_carrid> TYPE s_carr_id,
    <fs_connid> TYPE lty_r_connid.
    * Get the selection-screen items
    wd_this->m_helper->get_selection_screen_items(
    IMPORTING et_selection_screen_items = lt_sel_item ).
    * Retrieve the values from the select-options items
    LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
    CASE <fs_sel_item>-m_id.
    WHEN `CARRID`.
    ASSIGN <fs_sel_item>-m_value->* TO <fs_carrid>.
    WHEN `CONNID`.
    ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_connid>.
    ENDCASE.
    ENDLOOP.
    * Retrieve the data from the database, for simplicity, the
    * SELECT statement has been implemented here.
    SELECT * FROM sbook
    INTO TABLE wd_this->t_sbook
    WHERE carrid = <fs_carrid>
    AND connid IN <fs_connid>.
    * Bind the data to the context
    lr_sbook = wd_context->get_child_node( name = `T_SBOOK`).
    lr_sbook->bind_table( wd_this->t_sbook ).
    endmethod.
    now can you provide me the code for carrid and connid validation how has to be done.Please give me this solution

Maybe you are looking for

  • Audio output device same for all users Yosemite

    I use more then one account on my recent Macbook Pro.  For the first account I like to have the audio output set to the speakers but for the other account I want the audio output set to the headphones.  With Mavericks the Macbook remembered the last

  • Anyone else lost the Airdrop icon on iPad Mini?

    When I first installed iOS7 I had the Airdrop icon for a couple of hours but then it dissappeared. If I reboot the device (iPad mini ... should support Airdrop) and go directly to Control Center I can see it for a second, but then it quickly fades aw

  • Can i use Logic Pro with Macbook?

    My Macbook is 2GHz Intel Core Duo with 1 GB 667 MHz DDR2 SDRAM... Can i use the Logic Pro 8?

  • How to enable JAAS with jdeveloper

    hi all, I start reading about JAAS and previously i developed an web application and now i want to implement XML based JAAS in it i searched different articles which shows JAAS with DB support, can any one mention any good article with baby steps for

  • SuSE support Oracle 9i

    Will the Itanium2 version of Oracle 9i Database Enterprise Edition for Linux/IA64 work with SuSE Enterprise server for Itanium2?