Skip to Content
1
Former Member
Apr 26, 2012 at 11:34 AM

"QUERY=OFF" and "WRITE=ON" - Custom badi logic not working

245 Views

Hi

Am using on BPC10 NW "run_rsdri_query" to retrieve data from my BPC application based on "it_range" selection for our custom badi logic

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

lo_query->run_rsdri_query(
EXPORTING
it_dim_name = lt_dim_list

it_range = lt_selection

if_check_security = ABAP_FALSE

IMPORTING
et_data = <lt_query_result>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

***<lt_query_result> data gets distributed then finaly assign data to ct_data to write into bpc application

The problem am facing occurs when writng ct_data, causes runtime dump error when calling write class method CL_UJK_WRITE. <lt_wb_rec> is expecting "MEASURES" column from ct_data structure with data which is not available because I set "QUERY=OFF" from logic script

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" PROBLEM HERE - STANDARD SAP CLASS

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""

CALL METHOD cl_ujk_model=>get_structure

EXPORTING

i_appset_id = i_appset_id

i_appl_id = l_appl_id

i_type = 'T'

if_with_measure = abap_true

* IF_WITH_SIGNEDDATA = ABAP_TRUE

RECEIVING

rr_data = lr_wr_data.

ASSIGN lr_wr_data->* TO <lt_wb_rec>.2

>> <lt_wb_rec> = et_data.

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

my custom badi logic works fine and write data to application without issues if I set "QUERY=ON" but I do not want to set "QUERY=ON" but "OFF" as it causes the badi to be slow to process because it firsts query whole bpc application and populate ct_data, theres no reason to set "QUERY=ON" because i have "run_rsdri_query" to generate only data I would like to use.

SAP support says is not product tool error but to me its an error, the system is not consistant if "QUERY=ON" and "WRITE=ON" ct_data structure include "MEASURES" column and works fine writting data.

if "QUERY=OFF" and "WRITE=ON" ct_data structure excludes "MEASURES" column and FAILS TO WRITE!!!!

Anynone knows how to solve this issue, please assist

Thanks,

Oscar