on 09-27-2016 9:57 AM
HI All,
I have a requirement to add new fields in search criteria for normal changes, urgent changes.
I need to add
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.