Hi Draksh,
As you ask about passing selection of reading a infocube , I would rather say your process is perfectly fine with all your ABAP syntax correct. Just that I am not sure about the data-types that you declare for TIME_FROM & TIME_TO. So, what I recommend you is to test with a hard-coded TIME values as below but do confirm that you have the data in your BPC Model for the selection.
ls_sel-dimension = 'TIME'.
ls_sel-low = '2014.10'.
ls_sel-high = '2015.12'.
APPEND ls_sel TO lt_sel.
Incase, nothing works just try this below, commenting the it_range parameter and check if everything is fine.
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
).
Wish you can resolve this with my limited support
Regards,
Bishwajit