on 04-27-2012 6:18 PM
Hi All,
I have been using UJQ_RUN_RSDRI_QUERY FM to read transactional data very frequently in 7.5 but in 10 it doesn't read any data. There is no change in the code which call it but when I debug UJQ_RUN_RSDRI_QUERY.
But when I debug UJQ_RUN_RSDRI_QUERY, it intenally calls IF_UJQ_SQE~RUN_RSDRI_QUERY method. Now this method has function do_util->get_techname which takes ls_range-dimension as input and suppose to return l_dim_techname which it does not and hence there is no data returned.
Can anyone tell me the work around or anyone has faced this issue before or maybe there is a note to fix this.
Your help will be greatly appreciated.
Thanks,
Diksha.
The UJQ module has been replaces with the UJO module. Here is some sample code showing how to read transaction data in 10.0.
DATA: lv_environment_id TYPE uj_appset_id VALUE 'TESTENV',
lv_application_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,
lo_query TYPE REF TO if_ujo_query,
lr_data TYPE REF TO data,
lt_message TYPE uj0_t_message,
ls_application type UJA_S_APPLICATION,
ls_dimensions type UJA_s_DIMENSION.
FIELD-SYMBOLS: <lt_query_result> TYPE STANDARD TABLE.
lo_appl_mgr = cl_uja_bpc_admin_factory=>get_application_manager(
i_appset_id = lv_environment_id
i_application_id = lv_application_id ).
clear ls_application.
lo_appl_mgr->GET(
exporting
IF_WITH_MEASURES = ABAP_FALSE " BPC: Generic indicator
IF_SUMMARY = ABAP_FALSE " BPC: Generic indicator
importing
ES_APPLICATION = ls_application ). " Applications table type
refresh lt_dim_list.
loop at ls_application-dimensions into ls_dimensions.
append ls_dimensions-dimension to lt_dim_list.
endloop.
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>.
TRY.
lo_query = cl_ujo_query_factory=>get_query_adapter(
i_appset_id = lv_environment_id
i_appl_id = lv_application_id
).
lo_query->run_rsdri_query(
EXPORTING
it_dim_name = lt_dim_list " BPC: Dimension List
* it_range = " BPC: Selection condition
if_check_security = ABAP_FALSE " BPC: Generic indicator
* i_packagesize = " BPC: Size of Returned Data Package
* i_call_badi = ABAP_TRUE
* if_db_aggregate = ABAP_TRUE " BPC: Generic indicator
IMPORTING
et_data = <lt_query_result>
* e_end_of_data = " BPC: Last Data Package Yes/No
* e_split_occurred = " Result may not be completely aggregated
et_message = lt_message " BPC: Messages
* e_stats_guid = " BPC: Statistics Session
* e_cell_filted =
* CHANGING
* c_first_call = " BPC: First Call Yes/No
).
* CATCH cx_ujo_read. " Exception of common read
CATCH cx_ujo_read. " Exception of common read
ENDTRY.
Cheers,
Rich Heilman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rich,
we recently installed SAP BPC 10 NW on a sandbox for testing before moving into development environment.
when use SE37 to execute function UJO_RUN_RSDRI_QUERY, I got "Function Module UJO_RUN_RSDRI_QUERY does not exist"
When I use SE38 and run UJO_SQE_TEST, it works.
am i am in the wrong context for running UJO_RUN_RSDRI_QUERY?...
where else can i paste your sample code to run UJO_RUN_RSDRI_QUERY
any advice is welcome!
Thanks!
You will notice that my sample code does not reference a function module, instead it uses a class/method. There is no corresponding UJO function module which replaces the UJQ_RUN_RSDRI_QUERY function module. The entire UJQ package has been deprecated and replaced with the UJO package.
Cheers,
Rich
Sure, copy and paste the entire code sample into a program in SE38. Replace the values for the following variables with your environment/model names, and run it in debug mode. Step through the call to the API, and the data should be in the table <lt_query_result>.
DATA: lv_environment_id TYPE uj_appset_id VALUE 'TESTENV',
lv_application_id TYPE uj_appl_id VALUE 'TESTMODEL',
CHeers,
Rich
Great Thank You!
But I just discovered that I am not registered as ABAP Developer in our SAP Environment.
Just opened the ticket request with the BASIS team, so it will probably be until tomorrow or next week, before I have the my sap developer access key and test your code.
I noticed we are linkedin as well.
Thanks for your help!
Cheers!!
Hey Rich,
I am building an application which will post data in ECC 6.0 from BPC 10.0.
For this, I wrote a standalone program which pulls the dimensions of a cube using environment ID and Model.
Apart from that, I even want to get the attributes (children) of each dimension. Hence I am looking into the code of report UJO_SQE_TEST created by you for selection with Axis option. However, the code related to selection of children members is commented out.
Could you please let me know why was it commented out in BPC 10. Also, let me know if I can use the commented code in my program to get the required details. If not, then any other alternative to get the attributes and their values?
Thanks a lot for your support.
Awaiting your reply eagerly.
Thanks,
Abdulaziz.
I'm not sure why it is commented out in 10.0. I wrote that program for 7.0 and it was maintained by someone else for 10.0. Anyway, you can probably use this example code to read the members.
REPORT ZBPC_READ_MDATA_V10.
data: lv_appset_id type uj_appset_id value 'ENVIRONMENTSHELL',
lv_dim_name type uj_dim_name value 'TIME',
lt_attr_list type uja_t_attr_name,
lt_member type uja_t_dim_member,
lr_data type ref to data,
lo_query type ref to if_uja_md_query,
lo_md_reader type ref to if_uja_md_reader.
field-symbols: <lth_data> type hashed table,
<lt_data> type STANDARD TABLE,
<ls_data> type any.
lo_md_reader = cl_uja_bpc_admin_factory=>get_masterdata_reader(
i_appset_id = lv_appset_id
i_dimension_id = lv_dim_name ).
lo_query = cl_uja_bpc_admin_factory=>get_masterdata_query(
i_appset_id = lv_appset_id
i_dimension_id = lv_dim_name ).
* select specific attributes by adding to the LT_ATTR_LIST table
* insert ujr0_c_attr_calc into table lt_attr_list.
* insert uja00_cs_attr-hir into table lt_attr_list.
* lo_query->set_sel_attr( lt_attr_list ).
* OR.....
* you can select all attribute using this method.
lo_query->select_all_attr(
IF_INC_NON_DISPLAY = 'Y'
* IF_INC_GENERATE
IF_INC_TXT = 'Y'
* IF_INC_SLT
).
* Select specific members by adding to the LT_MEMBER table
* or pass empty LT_MEMBER table for all members
* append '2011.OCT' to lt_member.
lo_query->set_sel_members(
exporting
it_members = lt_member ).
lo_md_reader->read(
exporting
io_read_opt = lo_query
if_return_hash = abap_true
importing
er_data = lr_data ).
assign lr_data->* to <lth_data>.
* SHow data via ALV
DATA: lo_table TYPE REF TO cl_salv_table.
DATA: lo_functions TYPE REF TO cl_salv_functions.
TRY.
create data lr_data like line of <lth_data>.
assign lr_data->* to <ls_data>.
create data lr_data like STANDARD TABLE OF <ls_data>.
assign lr_data->* to <lt_data>.
<lt_data> = <lth_data>.
cl_salv_table=>factory( IMPORTING r_salv_table = lo_table
CHANGING t_table = <lt_data> ).
lo_functions = lo_table->get_functions( ).
lo_functions->set_all( abap_true ).
lo_table->display( ).
CATCH cx_salv_msg.
ENDTRY.
Cheers,
Rich Heilman
Hello Rich,
Thank you very much for the sample programs.
Can your sample code (to read BPC cube data) be incorporated in a Function Module based generic datasource for further usage? I wonder how we deal with large volume of records and datapackaging them?
Appreciate your help.
Thank you,
Ram Kannan
Hi,
In my case i am defining I_package = 50000 so that the internal table <lt_query_result> shouldnt throw dump.
But in my BPC cube I have more than 50000 records but the program is only considering first 50000 record and it is not fetching other remaining records.
Could you please let me know how can we get other remaining records?
User | Count |
---|---|
6 | |
5 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.