Hi All,
I have a requirement to implement a search based on a query object. The query object name is 'ProdAdvSearchRgProducts'.
I am trying to use this in a report program. I am using the class 'cl_crm_bol_dquery_service'.
But the problem is I am getting a run time error.
I am using the below code to instantiate.
DATA : lo_dquery TYPE REF TO cl_crm_bol_dquery_service. CALL METHOD cl_crm_bol_dquery_service=>get_instance EXPORTING iv_query_name = 'ProdAdvSearchRgProducts' RECEIVING rv_result = lo_dquery.
This goes to the constructor method. Inside there it goes to the below code:
if ME->OBJECT_MODEL->GET_OBJECT_KIND( ME->QUERY_NAME ) ne IF_GENIL_OBJ_MODEL=>DQUERY_OBJECT. raise exception type CX_CRM_UNSUPPORTED_OBJECT exporting OBJ = IV_QUERY_NAME. endif.
in the get_object_kind method:
method IF_GENIL_OBJ_MODEL~GET_OBJECT_KIND . field-symbols: <OBJ_PROPS> type GENIL_PROPS_WITH_COMP. read table ME->PROPERTIES_TAB with table key OBJECT_NAME = IV_OBJECT_NAME assigning <OBJ_PROPS>. if SY-SUBRC = 0. RV_OBJ_KIND = <OBJ_PROPS>-PROPERTIES->OBJECT_KIND. else. raise exception type CX_CRM_UNSUPPORTED_OBJECT exporting OBJ = IV_OBJECT_NAME. endif. endmethod. "IF_GENIL_OBJ_MODEL~GET_OBJECT_KIND
The Me->properties_tab does not contain the query name. But it has some 426 values.
This is the reason why it is giving a short dump.
But when i am trying out a similar standard code from the Web UI, i can find my query name in the properties tab.
Can anyone help me in fixing this issue?
Is something wrong in the way i am using the query object in the report program?
Please provide valuable suggestions.
Thanks!
Regards,
Heera