Skip to Content
author's profile photo Former Member
Former Member

DDLB for search criteria


I have added a search criterion 'IBU' for searching oppurtunities.Now when i select the search criterion IBU i want a dropdown for it to select the value of IBU.The value for search criteria appears in the field VALUE1 of context node search which is in the component BT111S_OPPT/Search .How do i code for getting a dropdown for this?

Thanks in advance:)



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Sep 19, 2008 at 10:30 AM

    Hi Shilpi,

    This is done in the method GET_DQUERY_VALUEHELPS (redefine) of the context node (in your case: ZL_BT111S_OPPT_SEARCH_CN00)

    METHOD get_dquery_valuehelps.
      DATA: lt_ddlb         TYPE bsp_wd_dropdown_table.
      DATA: ls_ddlb         LIKE LINE OF lt_ddlb.
      DATA: ls_string_ddlb  TYPE crms_thtmlb_search_ddlb_nvp.
      FIELD-SYMBOLS: <rs_result> LIKE LINE OF rt_result.
      CONSTANTS lc_string_empty TYPE crms_thtmlb_search_ddlb_nvp VALUE IS INITIAL.
      CALL METHOD super->get_dquery_valuehelps
          rt_result = rt_result.
      LOOP AT rt_result ASSIGNING <rs_result>.
        CASE <rs_result>-field.
          WHEN 'XXX'.
            CALL METHOD cl_crm_uiu_bp_cust_get=>get_val_for_xxx
                iv_nofilter = abap_true
                rt_value    = lt_ddlb.
            CLEAR <rs_result>-ddlb_options.
            SORT lt_ddlb BY value ASCENDING.
            APPEND lc_string_empty TO <rs_result>-ddlb_options.
            LOOP AT lt_ddlb INTO ls_ddlb.
              ls_string_ddlb-key   = ls_ddlb-key.
              ls_string_ddlb-value = ls_ddlb-value.
              APPEND ls_string_ddlb TO <rs_result>-ddlb_options .

    Important lines:

    - WHEN 'XXX'.

    => XXX is the your IBU field name

    - cl_crm_uiu_bp_cust_get=>get_val_for_xxx

    => to retrieve possible values



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 10:14 AM


    Here is a brief approach for starters:

    For this requirement you have to enhance the component.When you enhance it the Z version of the component gets created.Go to se80 and open that Zapplication

    and in the view you can code for the dropdown menu.For displaying the values create a temperary table and pass some values for it.Now in eh_onssearch method you can read the value passed and enter this value in the search query.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.