cancel
Showing results for 
Search instead for 
Did you mean: 

How to change Search limit

Former Member
0 Kudos

Hello,

We are using CRM2007 and I am searching for Sales Contracts via the webui and have entered 'Plumb centre*' for the search criteria 'Sold-To Part Name'. If I now click on Search I get the message *More than 500 Sold-To Parties found. Refine your search.*

The number of Sales contracts displayed are those to the 500 BP's selected. I know we have about 550 BP's which have the 'Plumb centre' in the name. is there a way to change this limit (500) via config or other method ?

Regards,

Chan

Accepted Solutions (1)

Accepted Solutions (1)

ajaya_kumar
Active Participant
0 Kudos

Hi,

You can try 'CRM_ORDER_AUTH_CHECK' BADI and implement CRM_RFW_SET_MAX_HITS method.

Hope this helps!!!

Regards

Ajay

Former Member
0 Kudos

Hi,

I did find this BADI, wasn't sure if it was the correct Max limit, have you used this BADI before ?

Regards,

Chan.

ajaya_kumar
Active Participant
0 Kudos

Hi,

I haven't used it, But I think it should resolve your issue.

I suggest you to try it out.

Regards

Ajay

Former Member
0 Kudos

Hi,

Ok will give a try.

Many Thanks

Chan

Former Member
0 Kudos

Hi Chan,

This cannot be controlled using config. This value is hard coded within the class CL_CRM_QCOD_HELPER using the private constant GC_MAX_HITS_MD. This is used within the method BUPA_SEARCH of this class. You can search for the "MESSAGE i004(crm_uiu_search)" in this method and you can see where this check happens.

Thanks,

Karthik Puttagunta

Former Member
0 Kudos

Hi Karthik,

I had found the variable within BUPA_SEARCH, but having difficulty in identifying where the message was being set. Many thanks for the pointing me into the right direction.

Regards,

Chan.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi All

Just to close the loop on this one - there's a note that corrects this:

http://service.sap.com/sap/support/notes/1800322 


Regards


Rob

former_member191572
Contributor
0 Kudos

Hi ,

Here the below sample piece of code to write in the method DO_INIT_CONTEXT and do_prepare_output respective to the implementation class.

lv_cnode = get_dquery_cnode( ).

lr_qs ?= lv_cnode->collection_wrapper->get_first( ).

  • * Initialize maximum hits parameter if not yet set

DATA: data_ref TYPE REF TO data.

FIELD-SYMBOLS: <max_hits> TYPE i.

data_ref = lr_qs->get_property( iv_attr_name = 'MAX_HITS' ). "#EC NOTEXT

ASSIGN data_ref->* TO <max_hits>.

IF data_ref IS NOT BOUND OR <max_hits> = 0

OR <max_hits> = '100'.

DATA: max_hits_default TYPE i.

max_hits_default = '200'.

LR_QS->SET_PROPERTY( iv_attr_name = 'MAX_HITS'

IV_VALUE = MAX_HITS_DEFAULT ). "#EC NOTEXT

ENDIF.

Reagrds,

Gobi

Former Member
0 Kudos

Hi Gopi,

Many thanks for your update, but I have found where this parameter is getting set. It is hard coded as Karthik kindly pointed out. I will look into possible use of BADI to adjust this value.

Many Thanks.

Chan.

former_member191572
Contributor
0 Kudos

Hi Chan,

For ui level small functionality implementing a badi is not a write thing i guess. Ok Try with both option plan according to that.

Regards,

Gobi

Former Member
0 Kudos

Hi Chan,

i have the same issue at the moment

How did you solve the problem?

Thanks

Severine

Former Member
0 Kudos

Hi Severine,

I'm afraid we didn't resolve this problem as the value is hardcoded as mentioned by Karthik.  The reason for this setting to 500 is to not affect performance for the search and has been set by SAP.  Bearing this in mind we didn't look into this further. 

Regards
Chan

former_member191572
Contributor
0 Kudos

HI,

identify the attribute,view,component and go to the respective view in the do_prepare_output set the default value using the set_property.

Regards,

gobi

SudheerHarman
Advisor
Advisor
0 Kudos

Hello,

Launch BSP_WD_CMPWB Txn

Select your search component , expand your search view, expand your search context node , expand attribute, exapnd filed method MAX_HITS and put the brake pint in method GET_SEARCH_MAX_HITS.

This should get from the 'SEARCH_MAX_HITS'.

Regards,

Sudheer

Former Member
0 Kudos

Hello,

Will lookinto it, many thanks for quidance.

Regards,

Chan.

Former Member
0 Kudos

Hi Sudheer,

Checked the max value in debug as you suggested, but this is relating to the 'Maximum Number fo Results' which is fine and I have had feedback on how to change this. The message I get, in the message area is ' More than 500 Sold-To Parties found. Refine your search.'

This is because in the Search area I am entering criteria in the 'Sold-to Party name' that yields more than 500 Sold-To Parties, it is this value I need to change to say 800.

Regards,

Chan

robert_kunstelj
Active Contributor
0 Kudos

This I think can't be achived with parameters.Probably you would have to redefine the logic of search component. Maybe someone else knows for any other option.

Former Member
0 Kudos

There's a note that corrects this - (http://scn.sap.com/thread/1955554)

robert_kunstelj
Active Contributor
0 Kudos

Yes. In your business role assign functional profile PARAMETERS with value of your functional profile. Then go to spro>crm>ui framework>technical role definition>Define parameters. There define your profile and assign to that profile value SEARCH_MAX_HITS with value 500.

Regards.

Former Member
0 Kudos

Hi Robert,

Many thanks for quick response, but we do not have a 'functional profile' setup and am not too sure what this does. If I set up the PARAMETER in the business role under 'function profile' there are only three values available for selection in the 'Profile value' field, namely: EMAIL_ATT_PROFILE_LN, FCC and UTIL_IC.

Regards.

Former Member
0 Kudos

Hi Robert,

Many thanks for quick response, but we do not have a 'functional profile' setup and am not too sure what this does. If I set up the PARAMETER in the business role under 'function profile' there are only three values available for selection in the 'Profile value' field, namely: EMAIL_ATT_PROFILE_LN, FCC and UTIL_IC.

Regards.

robert_kunstelj
Active Contributor
0 Kudos

As I said under spro>crm>ui framework>technical role definition>Define parameters create new definition (e.g. ZPARAMETERS) and define parameter search_max_hits with value 500. Then in business role assign functional profile PARAMETERS with ZPARAMETERS value.

Former Member
0 Kudos

Thanks Robert, will give it go.

Regards.

Chan

Former Member
0 Kudos

Hi Robert,

I've tried this but it's not the value that is in question. The parameter allows change to the 'Maximum Number of Results' value. My issue is before it returns the rows for the selection. The same issue occurs in the Sales Orders, if I go to the Sales Order Search view enter 'plumb*' for the 'Sold-to-Party Name' and hit search, I get the message 'More than 500 Sold-To Parties found. Refine your search.'

So it is searching for BP's begining with 'Plumb*' before returning the Sales orders in the Result view, in this case it has found 50 Sales orders.

Regards.