on 12-13-2013 7:50 AM
Hi,
I want to initialize query service dynamically using a field symbols concept ?
Regards,
Sumeet
Hi Sumeet,
To initialize query Service dynamically add the Below code in do_init_context.
method do_init_context.
call method super->do_init_context.
* Initialize query Service
data:lr_qs type ref to cl_crm_bol_query_service.
field-symbols: <qs_name> type crmt_ext_obj_name.
lr_qs ?= me->typed_context->search->collection_wrapper->get_first( ).
if lr_qs is not bound.
assign me->typed_context->search->('BASE_ENTITY_NAME') to <qs_name>.
* Get QUery Instance
lr_qs = cl_crm_bol_query_service=>get_instance( <qs_name> ).
check lr_qs is bound.
* Set Query Instance
me->typed_context->search->collection_wrapper->add( lr_qs ).
endif.
endmethod.
Hope,this would work for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.