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

Service Request Search - Delete Entity from Search Parameter Collection (SELECTION_PARAM_COL)

Hi All,

we are using the service request search. I found out that sometimes there are set attributes as search parameters where the search values (Fields LOW and HIGH) are initial. I also could find out, that for this reason the search for service request is not working properly. I now would like to delete these entities where there does not exist any value from the search collection (cl_crm_bol_dquery_service) which are stored in the attribute SELECTION_PARAM_COL.

I tried all relevant methods but never could delete the entity. The code fragment I am using is:


DATA: lv_param_bol TYPE REF TO if_bol_selection_param.

DATA: lr_query_service2 TYPE REF TO cl_crm_bol_dquery_service,

DATA: wa_params TYPE genilt_selection_parameter,

IF wa_params-low IS INITIAL AND wa_params-high IS INITIAL.

lv_param_bol ?= lr_entity.

lr_query_service2->clear_selection_param_value( iv_selection_parameter = lv_param_bol ).


Does anybody knows how to do this?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 02, 2013 at 11:32 PM


    Why dont you use DELETE_EMPTY_SELECTION_PARAMS method of class cl_crm_bol_dquery_service which is LR_QUERY_SERVICE2 in your above code ?



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Oliver,

      Yes it will delete the attribute from UI. If you remove any selection parameters from query service then it will delete from the UI configuration.

      Better approach for your requirement would be as below.

      data: lr_service type ref to cl_Bsp_WD_dquery_service.

      data: lr_result type ref to if_bol_bo_col.

      lr_service ?= me->typed_context->search node->collection_wrapper->get_copy( ).

      check lr_Service is bound.

      * remove empty parameters

      lr_service->delete_empty_selection_params( ).

      * get result

      lr_result ?= lr_service->get_query_result( ).

      check lr_result is bound and lr_result->size( ) gt 0.

      * set the result node

      me->typed_context->result node->collection_wrapper->set_collection( lr_result ).



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.