Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 26, 2012 at 01:51 PM

    You might want to try to handle the dimension list manually when creating your dynamic internal table.

    data: l_appset_id type uj_appset_id value 'TESTENV',

    l_appl_id type uj_appl_id value 'TESTMODEL',

    lt_dim_list type uja_t_dim_list,

    lo_appl_mgr type ref to if_uja_application_manager,

    lr_data type ref to data.

    field-symbols: <lt_query_result> type standard table.

    append 'ACCOUNT' to lt_dim_list.

    append 'TIME' to lt_dim_list.

    append 'CATEGORY' to lt_dim_list.

    append 'ENTITY' to lt_dim_list.

    append 'RPTCURRENCY' to lt_dim_list.

    append 'INTERCO' to lt_dim_list.

    append 'AUDITTRAIL' to lt_dim_list.

    append 'PRODUCT' to lt_dim_list.

    append 'MEASURES' to lt_dim_list.

    call method cl_uja_bpc_admin_factory=>get_application_manager

    exporting

    i_appset_id = l_appset_id

    i_application_id = l_appl_id

    receiving

    ro_return = lo_appl_mgr.

    call method lo_appl_mgr->create_data_ref

    exporting

    i_data_type = 'T'

    it_dim_name = lt_dim_list

    if_tech_name = abap_false

    if_signeddata = abap_true

    importing

    er_data = lr_data.

    assign lr_data->* to <lt_query_result>.

    Cheers,

    Rich Heilman


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.