Hi,
In your GET_DYNAMIC_QUERY_RESULT method, after fetching the results from Database, you add the results to IV_ROOT_LIST (type IF_GENIL_CONT_ROOT_OBJECTLIST). See the sample code from the link in your post:
Data: lr_root_object type ref to if_genil_cont_root_object,
lt_request_obj type crmt_request_obj_tab.
field-symbols: <fs_results> type zbol_empl_master_key.
* Loop through the results to build search result objects
loop at lt_results assigning <fs_results>.
try.
* Try to create a new result object
lr_root_object = iv_root_list->add_object( iv_object_name = 'EMPLOYEE'
is_object_key = <fs_results> ).
* Flag it as direct query result
lr_root_object->set_query_root( abap_true ).
Here, the Structure of <fs_results> should exactly match lt_cust_no structure in your GET_OBJECTS method:
* Getting the first entity key
lr_root->get_key( IMPORTING es_key = lt_cust_no ).
Regards
Anji