on 02-03-2016 9:00 AM
Hello,
i would like to define an existing custom Z field ZZFLD000054 from CRMD_PARTNER as the complaints' search criteria (component = BT120S_CPL, view = AdvSearchCompIEF). If the user enters a value into this new search field, SAP should return a list of complaints, that include partners that have this value in the Z field.
I added this Z field into a SEARCH node of the view (Add Model Attribute, BOL entity = BTPartner, BOLAttribute = ZZFLD000054), but the problem is the field is not available in the Configuration.
Please help!
Is the Z field in the AET marked as relevant for search?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This would work if the Z field would be part of header data (CRMD_ORDERADM_H). I need to enable searching based on a Z field as part of partner data (CRMD_PARTNER).
I found out that structure with complaints' search criteria is called CRMST_QUERY_COMPL_BTIL. I appended the Z field ZZFLD000054 to it and it became available in the view configuration. I added it to the view. Using the field returns "PROBLEM_WITH_QUERY" exception.
Please, anybody ?
Hi Jose,
sorry for the late reply. Thank you very much for the links, the 2nd link (Enhancing Search Screen) has almost all the information i need.
I followed these steps:
1. Append the structure 'CRMST_QUERY_COMPL_BTIL' with new field and make that field available in UI.
2. Copy the class 'CL_CRM_QCOMPL_RUN_BTIL' to a z class . and make the required changes in method 'GET_DYNAMIC_QUERY_RESULT' for the newly added field.
3 . Now define this newly created Z class for your search object 'BTQCompl' in SPRO under path :-
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.
This way my new Z class ZCL_CRM_QCOMPL_RUN_BTIL is correctly called and i can implement the search logic in the IF_CRM_QUERY_RUNTIME_BTIL~GET_DYNAMIC_QUERY_RESULT method. Do you perhaps have an idea how could i do this most elegantly ? The main standard search is done with this code:
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 i use this same method for my new ZZFLD000054 search field (part of CRMD_PARTNER) ?
Currently without any code implementation, i get an exception when searching complaints using this field:
User | Count |
---|---|
6 | |
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.