String in Select option

Hi experts,
I want to get a string length of greather than 100 through select options / Parameter .  Is it possible...? then how..?
Pls give me a solution.
Regards,
Murugan arumugam.

Hi..
PARAMETERS : p1 type string.
SSTRING 1-255 Character string string
STRING 256-... Character string string
The type SSTRING is available as of release 6.10 and it has a variable length. Its maximum length must be specified and is limited to 255. The advantage of this type compared with CHAR, is that it is assigned to the ABAP type string.
<b>Reward points for useful ans..</b>
Thanks & Regards
ilesh 24x7

Similar Messages

  • Select-options are not destroyed while calling view of used component popup

    Hi Friends ,
    I'm facing a unique problem. I'm calling a view of a component within another component. the view that I'm calling has some select-options. When I close the popup window ( using close 'X' of popup ) and then try to reopen the popup system give me a dump. I debugged and found that select-options are not destroyed by system and once it tries to create the select-options again it dumps because they are already there.  
    This is the source code extract of that dump for your reference .
    1 method if_wd_select_options~add_selection_field.
    2
    3   data:
    4     lr_table_descr       type ref to cl_abap_tabledescr,
    5     lr_struct_descr      type ref to cl_abap_structdescr,
    6     lr_value_field_descr type ref to cl_abap_elemdescr,
    7     added_field          like line of mt_added_fields,
    8     dfies                type dfies,
    9     description          type string,
    10     complex_restrictions type if_wd_select_options=>t_complex_restrictions.
    11
    12   field-symbols:
    13     <it_result> type index table.
    14
    15 * check of someone wants to add a field that already exists
    16   read table mt_fields
    17        with key m_id = i_id
    18        transporting no fields.
    19   if sy-subrc = 0.
    20 *   might be deleted - recreating a field with different setting is of course allowed
    21     read table mt_all_removed_fields
    22          with key table_line = i_id
    23          transporting no fields.
    24     if sy-subrc <> 0.
    >>>       message x000(00).
    26     endif.
    27
    28 *   remove the existing field in order to avoid duplicates
    29     delete table mt_fields with table key m_id = i_id.
    30   endif.
    I've already tried using REMOVE_ALL_SEL_SCREEN_ITEMS( ) method of interface IF_WD_SELECT_OPTIONS before creating new elements ( select-options ). If any one can help me in this It would really help and I'll appreciate it.
    Thanks in advance,
    Laeeq

    I've sloved the problem

  • Select Option's Context Element for the REPORT_ATTRIBUTE_ERROR_MESSAGE

    Hi,
    We're on 7.0 ehp1.
    I found a thread on same subject u201Cwdr:select_options and highlight Error Message with a Link to Inputfield u201C, Jul-23-2008, in which Thomas Jung gave an explanation of how to get the context element of the Select Options on a view.
    I tried to follow it, but Iu2019m still not getting it.  Please show how to get the context element of a Select Option for the u201CREPORT_ATTRIBUTE_ERROR_MESSAGEu201D .
       wd_comp_controller->go_message_manager->report_attribute_error_message(
             exporting
              message_text   = ls_messaga_text
                  element        = ?????
               attribute_name = ls_option_id
    Thomas' explanation:
    I gave you the code that gets you to the interface controller. From there you call the GET_API to get the component controller. After you have the component controller it is normal context coding to read the context of the Select-Options context. Run the debugger and use the Web Dynpro view to see what your context looks like at runtime. When I test this with one of my applications, the names of the context nodes that were dynamically generated was really straight forward - as it uses the names of the select-option itself. Nothing special once you reach this point - just normal context coding...."
    Kind regards,
    Huntr

    Hi ,
    Use the below approach to achieve this,
    data:
        lr_context_node       type ref to if_wd_context_node,
        lr_element            type ref to if_wd_context_element,
        message_text          type string.
      get the node and leadSelection of that field
        lr_context_node = get_node_of_sel_field( <field>-m_id ).
        lr_element = lr_context_node->get_lead_selection( ).
    case <field>-m_type.
    For Select option field
                when if_wd_select_options=>mc_sscreen_item_type_field.
                  m_message_manager->report_attribute_error_message(
                    element        = lr_element
                    attribute_name = 'LOW'
                    message_text   = message_text ).
    "For Parameter field
                when if_wd_select_options=>mc_sscreen_item_type_parameter.
                  m_message_manager->report_attribute_error_message(
                    element        = lr_element
                    attribute_name = 'VALUE'
                    message_text   = message_text ).
                when others.
              endcase.

  • Select-options for input field

    hi,
    Is it possible to use 'Select-options' in web dynpro for the input field like we use in abap?
    Ex. material is the input field. i want to select range also for this input field using 'Select-options'
    I have tried only with ovs(f4 help) for the input field. can u pls tel me how to use if it is possible ?
    Thanks,
    Aishwarya.

    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( ).
    init the select screen
      WD_THIS->M_HANDLER =
    WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ). 
    WD_THIS->M_HANDLER->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 ).
    *create a range table that consists of this new data element
      LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE(
      I_TYPENAME = 'matnr' ).
    add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
      I_ID = 'matnr'
      IT_RESULT = LT_RANGE_TABLE
      I_READ_ONLY = READ_ONLY ).
    This is my code followed by saptechnical. but when i exec, am getting err like the type matnr is invalid.

  • How can I re-display my selected option?

    In my jsp, I gain option values for a list of 'types' and 'names'
    If the currentType = null I do not show the form that accepts the 'names'.
    When a type is selected the Action class calls the getMethod in the ActionForm
    and upon success returns to the jsp page and presents the 'name' form.
    Unfortunately the 'type' form redisplays the first type in the list and not the
    currentType.
    Question. How can I set the selected option in my form to display the currentType?
    <!-- Access session bean for picklist types -->
    <jsp:useBean
    id="typesBean"
    scope="session"
    class="com.aaa.zzz.refdata.beans.CPartyTypesBean" >
    <jsp:setProperty name="typesBean" property="*" />
    </jsp:useBean>
    <%
    CPartyTypesBean typeBean = (CPartyTypesBean) session.getValue("typesBean");
    String[] PicklistTypes = typeBean.getTypes();
    %>
    <!-- Access Form Bean (ActionForm) for current Name & Type -->
    <jsp:useBean
    id="pb"
    scope="session"
    class="com.aaa.zzz.refdata.beans.CPartyPicklistBean" >
    </jsp:useBean>
    <jsp:setProperty name="pb" property="*" />
    <%
    String currentType = pb.getType();
    String currentName = pb.getName();
    %>
    <html:form action="/typeAction" focus="type">
    <table>
    <tr>
    <td WIDTH="20%">
    Picklist Type
    </td>
    <td WIDTH="30%">
    <select name="type">
    <%
    for(int i=0; i<PicklistTypes.length; i++)
    out.println("<option>" + PicklistTypes[i] + "</option>");
    %>
    </select>
    </td>
    <td WIDTH="20%">
    <html:submit property="submit" value="GetType"/>
    </td>
    <td WIDTH="30%">
    </td>
    </tr>
    </table>
    </html:form>
    <%
    if (currentType != null)
    %>
    <html:form action="/nameAction" focus="name">

    Thanks Beattris, I guess 'selected' is the obvious answer but what I was looking for was
    how to apply 'selected' to the loop that prints my options.
    However I figured it out and did this:
    <%
    for(int i=0; i<PicklistTypes.length; i++)
    String sel = null;
    if(currentType != null && currentType.compareTo(PicklistTypes)==0)
    sel = " SELECTED>";
    else
    sel = ">";
    out.println("<option value=" + PicklistTypes[i] + sel + PicklistTypes[i]+"</option>");
    %>

  • Changing property of select options

    Hi I have created a select options with the property read only = true by default, If a condition at the beginning is fulfilled I want to change the property read only of the previous field to false. I am doing it in the following way:
        DATA lt_range_table TYPE REF TO data.
      Data from select options
        rt_objid = wd_this->m_handler->get_range_table_of_sel_field( i_id = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-grupo_form ).
        ASSIGN rt_objid->* TO <fs_objid>.
      Create range tabl
        lt_range_table = wd_this->m_handler->create_range_table( i_typename = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-tipo_d ).
        DATA: id TYPE string.
        id = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-tipo_d.
        REPLACE ALL OCCURRENCES OF REGEX '\W' IN id WITH '_'.
        IF NOT <fs_objid> IS INITIAL.
        update property
          wd_this->m_handler->upd_selection_field(
           i_id              = id
           it_result         = lt_range_table
           i_read_only       = abap_false ).
        ENDIF.
    What is wrong here please?
    Help really appreciated

    Hi Jorge.
    Why do you perform the replacement? Are you sure, that the ID you used while adding the field is the same as the one you use for updating? What is the rror or does just nothing happen?
    Cheers,
    Sascha
    Message was edited by:
            Sascha Dingeldey

  • SELECT-OPTIONS in a "Get_Persistent_by_QUERY".

    Hi Experts,
    I am using a SELECT-OPTIONS in the method: "Get Persistent by Query". But I have an error. This is my code below.
    SELECT-OPTIONS so_date     FOR    sy-datum                      .
    DATA lo_query_manager TYPE REF TO if_os_query_manager           .
    DATA lo_query         TYPE REF TO if_os_query                   .
    DATA lo_agent         TYPE REF TO zca_persistence_zint_rsbankinv.
    DATA lo_base          TYPE REF TO zcb_persistence_zint_rsbankinv.
    DATA lo_rsbankinv     TYPE REF TO zcl_persistence_zint_rsbankinv.
    DATA lo_table         TYPE        osreftab                      .
    DATA ls_table         TYPE REF TO zcl_persistence_zint_rsbankinv.
    DATA ls_tmp           TYPE REF TO object                        .
    DATA lv_string        TYPE        string                        .
    DATA lo_exception     TYPE REF TO cx_root                       .
    TRY .
       lo_agent    = zca_persistence_zint_rsbankinv=>agent.
    * Create Query
       lo_query_manager = cl_os_system=>get_query_manager( ).
       lo_query         = lo_query_manager->create_query( i_filter     = 'ZEXDAT IN PAR1' ).
       lo_table         =
       lo_agent->if_os_ca_persistency~get_persistent_by_query(
       i_query = lo_query
       i_par1  =  so_date
       LOOP AT lo_table INTO ls_tmp.
         ls_table ?= ls_tmp        .
         lv_string = ls_table->zget_all_fields( ).
         WRITE lv_string.
       ENDLOOP.
    CATCH cx_root INTO lo_exception.
       lv_string = lo_exception->get_text( ).
       WRITE lv_string.
    ENDTRY.
    Error message :
    Syntax error when parsing a query : Excepected symbol 'IN' (row: O, column: 7)
    Have you got any idea regarding this error. And how could I code a SELECT-OPTION in a Get Persistence by Query ?.
    Also, I have found something interesting. I have used the MF: "RDS_RANGE_TO_WHERE" to build a WHERE SQL condition from a SELECT-OPTION but I don't know if it is usable for my need:
    WHERE Statement: 'ZEXDAT BETWEEN '20110203' AND '20150203' AND NOT ZEXDAT IN ('20140219','20140306','20140321')'
    Many thank for your help !
    Rachid.

    Hi Custodio,
    thank you for reply. I have a last question.
    Is it possible to build a Query with the SELECT OPTION through attribut I_PARAMETERS_TAB ?
    I guess attr. I_PARAMETERS_TAB is used when you need to use more than 3 criteria of selection (PAR1,PAR2,PAR3) .
    My SELECT OPTION is like that :
    Have you got any idea for using I_PARAMETERS_TAB ?
    ...if_os_ca_persistency~get_persistent_by_query( i_query = lv_query
                                                                                    i_parameter_tab = ?????
    *                                                                               i_par1 =
    *                                                                               i_par2 =
    *                                                                               i_par3 =
    Unfortunately, I have no examples in SCN.
    Best regards.
    Rachid.

  • Text for block and select option on the selection screen of Logical Databas

    Hi,
    I have copied a standard program (RFBELJ10) which is making use of LDB (BRF) and created a custom program. Now, the requirement is to add a selection screen option to the custom report and do some validation on the data extracted. I have added the select option and provided a text (lets say "Segment") to it using menu path Goto --> Text Elements --> Selection Texts and activated. But this text is not displayed on the screen when i execute the report. It is showing the string which i used while defining the select option.
    Also i need to provide a frame and title to it. but its not displayed.
    i have written the following code for that:
    SELECTION-SCREEN: BEGIN OF BLOCK seg WITH FRAME TITLE text-h01. " Segment
    SELECT-OPTIONS: s_segmnt FOR faglflexa-segment. " Segment
    SELECTION-SCREEN: END OF BLOCK seg.
    Could you please help me in getting the texts displayed for fram and the select option?
    Thanks,
    Phani

    Solved the problem. I have maintained the text in German. So, when I execute the report in english, it is not displaying the text. I have translated the texts to English and is working fine now.

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

  • 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

  • Urgent help!display db value as selected in drop down using select option

    Hi All,
    My problem is i had resultset from database and i want to display it as drop down.By default it should show the actual database value for that field also user should be able to change it by selecting from drop down. What is happening is it is by default displaying the last value from the resultset and not the selected one. my code on JSP is :
    <%
    Statement stm1 = null;
    ResultSet rs1 = null;
    stm1 = con.createStatement();
    rs1 = displog.searchorthodon(con);
    String qry1 = "SELECT * FROM orthodontab;";
    rs1 = stm1.executeQuery(qry1);
    %>
    <table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#444444" align="center">
    <tr>
    <td width="171px" align="right" class="txtFieldLable">Orthodontist :
    <td width="171px" align="left" height="33" class="freeformfielddata">
    <select name="orthoden">
    <% while (rs1.next()){ %>
    <option value="<%=inputorthodon%>" selected ><%=rs1.getString("ortho_name")%></option>
    <%} %>
    </select>
    Thanks and Regards.I will be greatful to know where i am going wrong.

    <% int i = 1;
    while (rs11.next()){
    if (i==2)
    {%>
    <option value=i selected ><%=inputap%></option>
    <%}
    else
    %>
    <option value=i ><%=rs11.getString("AP")%> </option>
    <% }i++;}i=1; %>
    </select>
    <%
    This is a code and here instead of if(i==2) i actually want to compare rs11.next() with inputap. what will be the syntax.any help will be greatful

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

  • Select options to internal table

    i have selected some values in the range say 100 to 200 using select options....is there any way to get these values in an internal table?
    also does select option work with alpha numeric values
    eg : if i want to select between a100 and b200?

    >
    VR ARVIND wrote:
    > i mean to say if i have 100 to 200.. i need 101 102 103 etc..continuosly till 200
    Select-options are really only useful for selecting data that matches the select-options from some other dataset.  They don "expand out" into a set of values.
    If you are always specifying a range in the selection screen, use two parameters - p_low, p_high.
    You then will need to build your itab entry by entry. So
    l_count = p_low.
    WHILE l_count LE p_high.
      INSERT l_count INTO t_itab.
      ADD 1 to l_count.
    ENDWHILE.
    For a100 to a200, you'd have to do some string slicing and concatenation to get the desired result.

  • Multiple select list selected options

    Hello ;
    how can i get the selected options of my multiple selected List
    Thankyou

    Multiple select list is a concatenated double quote delimited string
    value_1:value_2:value_3
    Where do you (how do you) want to "get" the selected options? You want to use
    the selected value where?
    I have couple of demonstrations on how to handle multi-select lists:
    http://htmldb.oracle.com/pls/otn/f?p=31517:84
    http://htmldb.oracle.com/pls/otn/f?p=31517:87
    Denes Kubicek

  • How to avoid the truncation of  field values in select-options

    Hi all,
    I have a requirement where i have used select-options to select multiple filenames.  I have taken the filename of type rlgrap-filename(128 char) But the problem is in select-options if the values of the filename which is selected has length ( i.e the length of the selected field value) exceeds 45 character , then he remaining charactes are truncated. Hence i am not able to get the
    correct field value in the internal table of the select-options.
    i came to know that if NO_DISPLAY addition is used then this truncation wont occur. But in my case user has to select the files and hence this addition cannot be used.
    please let me know if anyone has a solution for this or if there is any other way to select multiple entries in selection screen.
    Regards
    Manipal parkala

    rlgrap-filename is having the length of only 128 characters.If the file path exceeds 128 characters then the rest will get truncated.If you file name exceeds more than 128 characters and the pafth is fixed,then harcode the entire path in the program and later on concatenate the path and the file name into a string which can be used for further processing.
    paramters:p_file like rlgrap-filename.
    here just give the filename as say 1234.XLS.(Assuming that you are not browsing for the file using F4_filename).
    In the program harcode the path say C:\Documents and setting\sapworkdir\user\.
    Now concaternate these two and pass it to string which can be used for further processing.
    If the user intneds to browse the file and the path name exceeds 128 characters then follow the way to delcare the paramter in the selection screen as said above.If it is working for parameters then I think it should be working for select option also.

Maybe you are looking for

  • I want to move the data from oracle 8.0.5 to oracle 10g

    Dear Gurus i want to move my data exist in oracle 8.0.5 to oracle 10g, what is the simplest way to do that without loss of data and time. thanx and regard

  • Can't get iPad to print

    Can't get iPad to print.  Bought new printer for air print.  When tell to print it searches for printer, but always says not printer found

  • What is the best iMac for a former PC movie/ music maker?

    I'm researching Apple computers, and,my lord, I am out of touch. Actually, I was never really IN touch. Anyway, I am currently working on a short film, less than ten minutes, which will probably be eight or so hours of raw footage trimmed, cropped, f

  • The error when create SC according to SC template

    Hi ,my experts :   I  work in SRM7.0 SP04 .   I create one Shopping cart  template,and save as template .Its item comes from MDM catalog .Its status is "Public template ". But when I crate one new SC according to it ,one error message display :Catalo

  • Help! Problems printing on legal with CS5 on Toshiba e6530c

    Hi, I am having an issue printing on legal (8.5x14) paper on my Toshiba eStudio 6530c.  When I print using the PS3 driver (I verified that it is the most up to date driver) 5.10.89.0 my prints end up as letter (8.5x11) size.  When I print using the P