on 01-29-2014 9:34 AM
Very good morning,
I wanted to call a search help, and pass default values. In the call(from my Outbound Plug), I try to use lr_col for to pass the default value. But the first time dont work, and the next time the field are duplicated,but with default value.
I know that is possible to do it from other places of help value component(), but i want to use from my componet ' SRQM_INCIDENT_H'. The help value name is 'PRD01QR'. My code es:
lr_context_node = productvaluehelp_popup->get_context_node( iv_cnode_name = 'SEARCH' ).
lr_query_service ?= lr_context_node->collection_wrapper->get_current( ).
IF lr_query_service IS NOT BOUND.
lr_query_service = cl_crm_bol_dquery_service=>get_instance( 'ProdAdvSearchRgProducts' ).
ENDIF.
CALL METHOD lr_query_service->add_selection_param
EXPORTING
iv_attr_name = 'PRODUCT_ID'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = ''.
CALL METHOD lr_query_service->add_selection_param
EXPORTING
iv_attr_name = 'DESCRIPTION'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = ''.
CALL METHOD lr_query_service->add_selection_param
EXPORTING
iv_attr_name = 'CATEGORY_ID'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'Z0003'.
CALL METHOD lr_query_service->add_selection_param
EXPORTING
iv_attr_name = 'CATEGORY_DESC'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = ''.
lr_col = lr_query_service->get_selection_params( ).
productvaluehelp_popup->open( iv_inbound_plug = gv_refproduct_search_ip iv_collection = lr_col )
1000 thanks!!
Hi Victor,
Try this code
DATA:
lr_col TYPE REF TO if_bol_bo_col,
lr_qs TYPE REF TO cl_crm_bol_dquery_service.
CONSTANTS lc_query_name TYPE crmt_ext_obj_name VALUE 'ProdAdvSearchRgProducts'.
CALL METHOD cl_crm_bol_dquery_service=>get_instance
EXPORTING
iv_query_name = lc_query_name
RECEIVING
rv_result = lr_qs.
lr_qs->add_selection_param(
EXPORTING
iv_attr_name = 'CATEGORY_ID'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'Z0003'.
).
"Pass the dquery object to the collection.
IF lr_col IS NOT BOUND.
CREATE OBJECT lr_col TYPE cl_crm_bol_bo_col.
ELSE.
lr_col->clear( ).
ENDIF.
lr_col->add( lr_qs ).
productvaluehelp_popup->open( iv_inbound_plug = 'SEARCHPRODUCTS' iv_collection = lr_col ).
Regards JP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're on the right way , JP
it works fine but just the first time, the second time the field appears duplicated, i change a litle bit your code por the second time
thanks and Greetings.
lr_context_node = productvaluehelp_popup->get_context_node( iv_cnode_name = 'SEARCH' ).
lr_query_service ?= lr_context_node->collection_wrapper->get_current( ).
IF lr_query_service IS NOT BOUND.
lr_query_service = cl_crm_bol_dquery_service=>get_instance( 'ProdAdvSearchRgProducts' ).
CALL METHOD lr_query_service->add_selection_param
EXPORTING
iv_attr_name = 'CATEGORY_ID'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'Z0003'.
ENDIF.
User | Count |
---|---|
7 | |
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.