Skip to Content
0
Former Member
Dec 28, 2011 at 05:59 AM

replacement for IF_UJ_MODEL~GET_APPL_DATA

103 Views

Hi,

I am trying to update code from BPC 7.5 to BPC 10.

I am having diffculty to find replacement for IF_UJ_MODEL~GET_APPL_DATA and also cl_ujq_sqe_factory=>get_instance

What I am trying to do is export data from BPC to ABAP table.

Can anyone please advise me on this.

I attached part of what I have coded.

Regards

method run_query.

  data:
*      Application Set
       l_appset type ref to if_uj_model,
*       Application
       l_ibp    type ref to if_uja_application_data,

*       Shared Query Engine
        l_sqe           type ref to if_ujq_sqe,
if_ujq
*       Table of used dimensions
        lt_dim_name     type ujq_t_dim,

        lt_sel_cond     type uj0_t_sel,

        l_data          type ref to data.

  field-symbols:
*       Data table field symbol
        <fs_table>      type standard table.


* Application Set
  l_appset = cl_uj_model=>get_model( 'TESTING' ).

* Application
****************PROBLEM HERE********************
  l_ibp    = l_appset->get_appl_data( 'TEST' ).


* Get a list of dimensions in the application
  l_ibp->get_dim_list(
    importing
      et_dim_name    = lt_dim_name ).

try.
*   Create a reference to the data table:
*   This is the table in the form of the structure of the application:
*   all the dimensions + one value at the end!
*** PF_ACCOUNT, PF_CUSTOMER, .... TIME, SIGNEDDATA
      l_ibp->create_data_ref(
        exporting
           i_data_type = if_uja_application_data=>gc_type_table
        importing
          er_data      = l_data ).

*     Assign this reference to a field symbol so we can use it
      assign l_data->* to <fs_table>.

****************PROBLEM HERE********************
*     Get the instance of the Shared Query Engine
      cl_ujq_sqe_factory=>get_instance(
        exporting
          i_appset_id = 'TESTING'
          i_appl_id   = 'TEST'
        importing
          e_sqe       = l_sqe ).

*     Run the query on the application!
      l_sqe->run_rsdri_query(
        exporting
          it_dim_name       = lt_dim_name
          it_range          = lt_sel_cond
          if_check_security = abap_false
        importing
          et_data           = <fs_table> ).


    catch cx_uja_admin_error.
    catch cx_ujq_exception.
  endtry.
endmethod.