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

How to Change the default Search value for Field Role?

HI,

I went through numerous threads on how to default the search value , but does not help for my issue. Hence im posting this new thread. Please provide your suggestions on how to achieve this.

For the Ship-to party field (in item detail ) on webui when i do a F4 help i get the pop up with various search criteria and for the field Role the default value is "Ship-to party". which is visible. we need to change this default value to Prospect which is available in drop down.

The attribute is STRUCT.ROLE and view BP_HEAD_SEARCH/SearchHelp . The method GET_DQUERY_VALUEHELPS from the context node class is called to fill the value help for this attribute, but i dont understand how the ship-to party is filled as default. There is no code in this method to default the value.

The generic GET_V_S_STRUCT method also does not default the Ship-to party on this field.

I want to understand how this Ship-to party is filled by default and how can i change this to prospect..

Many Thanks,

Shaik

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 31, 2009 at 05:04 PM

    Hi Shaik,

    The ROLE attribute DDLB should have had Ship to Party as the first available option and there is no space option in the list.

    That can be the reason it is defaulted.(Check in method GET_DQUERY_DEFINITIONS).

    Manipulate the DDLB_OPTIONS to your functionality.

    Regards,

    Masood Imrani S.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Shaik,

      There is an attribute PARAMETERS in the search page context node class. You can keep a break point in the HTML page of the search view and check. Defaulting on a search page can be done using this attribute . I checked in debugging.

      <thtmlb:searchArea>
          <thtmlb:searchTagArea>
              <thtmlb:advancedSearch id               = "advs0"
                                     fieldMetadata    = "<%= controller->GET_DQUERY_DEFINITIONS( ) %>"
                                     header           = "<%= ADVANCEDSEARCH->get_param_struct_name( ) %>"
                                     fieldNames       = "<%= controller->GET_POSSIBLE_FIELDS( ) %>"
                                     values           = "//ADVANCEDSEARCH/PARAMETERS"

      Regards,

      Masood Imrani S.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 02, 2010 at 07:06 AM

    We had a same requirement of defaulting Sales org and division in search criteria for a specific value.

    this can be doen by redefining "DO_PREPARE_OUTPUT" method in IMPL class for the respective view.

    See the code:

    METHOD do_prepare_output.
    *CALL METHOD SUPER->DO_PREPARE_OUTPUT
    **  EXPORTING
    **    iv_first_time = ABAP_FALSE
    *    .
      DATA:
        lr_qs TYPE REF TO cl_crm_bol_dquery_service.
    
    * Get current query object
      lr_qs ?= me->typed_context->search->collection_wrapper->get_current( ).
      IF iv_first_time = abap_true.
    
        lr_qs->clear_selection_param_values( ).
        lr_qs->delete_empty_selection_params( ).
    *   if l_sales_orgs is initial.
        CALL METHOD lr_qs->insert_selection_param
          EXPORTING
            iv_index     = '1'
            iv_attr_name = 'SALES_ORG'
            iv_sign      = ' '
            iv_option    = 'EQ'
            iv_low       = 'O 50000514'.
    *   endif.
    *   if l_dist_chan is initial.
        CALL METHOD lr_qs->insert_selection_param
          EXPORTING
            iv_index     = '2'
            iv_attr_name = 'DISTR_CHAN'
            iv_sign      = ' '
            iv_option    = 'EQ'
            iv_low       = '01'.
    * endif.

    Hope this will help..

    THanks & Regards,

    Amit

    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.