cancel
Showing results for 
Search instead for 
Did you mean: 

How to find enhancement/BADI name for date field in search criteria of CRM

0 Kudos

HI All,

I have a requirement to add new fields in search criteria for normal changes, urgent changes.

I need to add

  • Planned Outsourced Start Date
  • Planned Outsourced End date

now i have appended those field in the structure CRMST_QUERY_SRV_REQ_BTIL

And it is getting displayed in solman normal changes and urgent changes.

Even i can select a date from the search help.

But when i select the date and enter search button.

It is throwing an error.

I guess in need to do coding in some enhancement.

So can anyone please let me know how to overcome this problem.

It is urgent.

Accepted Solutions (0)

Answers (2)

Answers (2)

praveen_kumar194
Active Contributor
0 Kudos

Hi

you need to implement search related BADI crm_badi_rf_q1o_search. try to google it.you need to create new implementation for this with filter.

you need put your logic like if user performs search by entering values into your custom  fields, you will remove this values in this BADI and execute the search with other field values (if any ). next you perform search ( generally query the data base ) with only your field values and combine the results later ( mostly GUIDs would be returned ).

ex: user enters document id as 123 along with pland outs end dates 20160928, then in the badi you delete your field and its value from the parameter and only pass 123. say it found one GUId. Then you have query appropriate table with your field. say you get two GUIDS, then you will send only matching GUID as result.

Hope it helps.

0 Kudos

Hi Praveen,

I have implementes that BADI, but it is not getting triggered while i click on Search button.

Can you please let me know why it is not getting triggered.

0 Kudos

When search option is clicked dump is coming.

Former Member
0 Kudos

Hi Sneha,

Your dynamic query is executed in method IF_CRM_QUERY_RUNTIME_BTIL~GET_DYNAMIC_QUERY_RESULT of class CL_CRM_SRQM_SRV_REQ_RUN_BTIL. To get proper result, you will have to extend your GENIL model for custom fields that you added to the structure. It can be done as below:

1. Create a custom class (name must end with _RUN_BTIL) by inheriting from CL_CRM_SRQM_SRV_REQ_RUN_BTIL

2. Add this class name to

spro -> CRM -> CRM cross application components -> Generic interaction layer/object layer -> component specific settings -> business transactions -> define custom handler classes for business transaction model nodes

external object name BTQSrvReq, structure name: custom class name (without _RUN_BTIL)

3. redefine method IF_CRM_QUERY_RUNTIME_BTIL~GET_DYNAMIC_QUERY_RESULT, copy code from super method and then make desired changes.

You also have to find out why it is giving you an execption in first place. It is probably thrown in same method.

0 Kudos

Hi Sagar,

I have created the class as you mentioned above and also i have done SPRO configuration.

Now the class is getting triggered.

But i am getting same dump when below code executes.

CALL METHOD lr_1o_search->get_result_values

     EXPORTING

       iv_max_hits = is_query_params-max_hits

     IMPORTING

       et_results  = <compl_order_tab>

       et_return   = lt_return.

Can you please suggest an answer for this.

Former Member
0 Kudos

Please debug to find out the reason for dump. You may also fin more details in st22.

try to upload st22 screenshot, may we will find something out of it.

Former Member
0 Kudos

Hi Sneha,

in your custom code, you will find your custom parameters in importing internal table IT_SELECTION_PARAMETERS. Write your code as below:

1. Copy custom parameter values into some variables

2. Remove these custom parameters before calling super method.

3. Call super method

4. Filter the result returned by super method according to the custom parameters

0 Kudos

Hi Sagar,

In which custom Code are you telling.

I dont have any importing parameters.

Can you please explain deeply.

Former Member
0 Kudos

The method IF_CRM_QUERY_RUNTIME_BTIL~GET_DYNAMIC_QUERY_RESULT which you redefined, in this method you have to do what i said above.