cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to retrieve results using dynamic query

Former Member
0 Kudos
170

Hi Experts,

I have created a custom table and have created a custom bol to integrate it with web ui. I have redefined the dynamic query result method of genil layer. I find the data into LT_RESULT but when I invoke the root list method the LR_OBJECT does not contain the values.

Please see below the code that I have written.

====================================

METHOD IF_GENIL_APPL_INTLAY~GET_DYNAMIC_QUERY_RESULT.

DATA: LR_OBJECT TYPE REF TO IF_GENIL_CONT_ROOT_OBJECT,

LT_RESULT TYPE TABLE OF ZCRMST_XXXX,

LV_DYN_WHERE TYPE STRING,

LV_LEN TYPE I,

LS_RANGE TYPE SELOPTOBJ.

DATA: LT_XXXX TYPE TABLE OF SELOPTOBJ,

LT_YYYY TYPE TABLE OF SELOPTOBJ.

FIELD-SYMBOLS: <LFS_RESULT> TYPE ZCRMST_XXXX,

<LFS_SELECTION_RANGE> TYPE GENILT_SELECTION_PARAMETER.

  • decomposition of selection parameters and build a dynamic where condition

SELECT * FROM ZXXXX INTO TABLE LT_RESULT[].

CHECK LINES( LT_RESULT[] ) > 0.

LOOP AT LT_RESULT[] ASSIGNING <LFS_RESULT>.

LR_OBJECT = IV_ROOT_LIST->ADD_OBJECT( IV_OBJECT_NAME = 'Root'

IS_OBJECT_KEY = <LFS_RESULT>-XXXX ).

CHECK LR_OBJECT IS BOUND.

LR_OBJECT->SET_QUERY_ROOT( ABAP_TRUE ).

ENDLOOP.

ENDMETHOD.

==================================================

Thanks in advance,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please check your get_objects method of the genil class. I made some changes to my implementation of get_objects method and it fixed the problem.

Regards,

Sandeep

Former Member
0 Kudos

I managed to solve this myself.

Thanks and Regards,

Sandeep

Former Member
0 Kudos

Hi Sandeep,

Could you please provide the solution because I aslo have the similar problem.

Thanks,

Bujji