Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with i_rollup_only in RSDRI_INFOPROV_READ

Hi,

I have a problem with FM 'RSDRI_INFOPROV_READ' , the parameter i_rollup_only. As I understand it this parameter decides whether compressed or none-compressed request should be included in the call.

The problem is that some requests in my cube are compressed and some are not. I’ve created a function module that calls this FM and in the result I want none-compressed results, but if there are no none-compressed results I want to get the compressed results.

According to SDN the variable I_ROLLUP_ONLY should be used to make one lookup for the compressed values and one for the none-compressed values… That is, I will have to call the FM twice, but that is fine. The issue is that no matter how I do, I can NOT collect only the none-compressed values, even in a test scenario.


FORM get_all_data_from_infocube CHANGING g_s_ZPY_P01.
 
TYPE-POOLS: rs, rsdrc.
DATA:

g_s_sfc         TYPE rsdri_s_sfc,
g_th_sfc        TYPE rsdri_th_sfc,

g_s_sfk         TYPE rsdri_s_sfk,
g_th_sfk        TYPE rsdri_th_sfk,

g_s_range       TYPE rsdri_s_range,
g_t_range       TYPE rsdri_t_range.

DATA: g_end_of_data  TYPE rs_bool,
g_first_call   TYPE rs_bool.


* For the following characteristics / navigational attributes values
* should be returned:
CLEAR g_th_sfc.

* VERSION
CLEAR g_s_sfc.
* --- name of characteristic
g_s_sfc-chanm    = '0VERSION'.
* --- name of corresponding column in g_s_ZPY_P01
g_s_sfc-chaalias = '0VERSION'.
* --- no ORDER-BY
g_s_sfc-orderby  = 0.
* --- include into list of characteristics
INSERT g_s_sfc INTO TABLE g_th_sfc.

* 0EMPLOYEE
CLEAR g_s_sfc.
* --- name of characteristic
g_s_sfc-chanm    = '0EMPLOYEE'.
* --- name of corresponding column in g_s_ZPY_P01
g_s_sfc-chaalias = '0EMPLOYEE'.
* --- no ORDER-BY
g_s_sfc-orderby  = 0.
* --- include into list of characteristics
INSERT g_s_sfc INTO TABLE g_th_sfc.

* 0COSTCENTER
CLEAR g_s_sfc.
* --- name of characteristic
g_s_sfc-chanm    = '0COSTCENTER'.
* --- name of corresponding column in g_s_ZPY_P01
g_s_sfc-chaalias = '0COSTCENTER'.
* --- no ORDER-BY
g_s_sfc-orderby  = 0.
* --- include into list of characteristics
INSERT g_s_sfc INTO TABLE g_th_sfc.

* 0FISCPER3
CLEAR g_s_sfc.
* --- name of characteristic
g_s_sfc-chanm    = '0FISCPER3'.
* --- name of corresponding column in g_s_ZPY_P01
g_s_sfc-chaalias = '0FISCPER3'.
* --- no ORDER-BY
g_s_sfc-orderby  = 0.
* --- include into list of characteristics
INSERT g_s_sfc INTO TABLE g_th_sfc.

* 0FISCYEAR
CLEAR g_s_sfc.
* --- name of characteristic
g_s_sfc-chanm    = '0FISCYEAR'.
* --- name of corresponding column in g_s_ZPY_P01
g_s_sfc-chaalias = '0FISCYEAR'.
* --- no ORDER-BY
g_s_sfc-orderby  = 0.
* --- include into list of characteristics
INSERT g_s_sfc INTO TABLE g_th_sfc.

* For the following key figures should be returned:

CLEAR g_th_sfk.


* 0AMOUNT / Beløb
CLEAR g_s_sfk.
* --- name of key figure
g_s_sfk-kyfnm    = '0AMOUNT'.
* --- name of corresponding column in g_s_ZPY_P01
g_s_sfk-kyfalias = '0AMOUNT'.
* --- aggregation
g_s_sfk-aggr     = 'SUM'.
* --- include into list of key figures
INSERT g_s_sfk INTO TABLE g_th_sfk.

* The reading module is called:

* --- this variable will be set to TRUE when the last data
*     package is read
g_end_of_data = rs_c_false.
* --- this variable indicates whether this is an initial
*     call to the reading module or a follow-up call (which
*     simply retrieves already selected data)
g_first_call  = rs_c_true.

WHILE g_end_of_data = rs_c_false.

CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
i_infoprov             = 'ZPY_P01'
i_th_sfc               = g_th_sfc
i_th_sfk               = g_th_sfk
i_t_range              = g_t_range
*       i_reference_date       = sy-datum
*       i_save_in_table        = rs_c_false
        i_rollup_only          = ' '
        i_packagesize          = 1000000
*       i_authority_check      = rsdrc_c_authchk-read
i_authority_check      = rsdrc_c_authchk-none
IMPORTING
e_t_data               = g_t_ZPY_P01
e_end_of_data          = g_end_of_data
CHANGING
c_first_call           = g_first_call
EXCEPTIONS
illegal_input          = 1
illegal_input_sfc      = 2
illegal_input_sfk      = 3
illegal_input_range    = 4
illegal_input_tablesel = 5
no_authorization       = 6
illegal_download       = 8
illegal_tablename      = 9
OTHERS                 = 11.

IF sy-subrc <> 0.
EXIT.
ENDIF.

ENDWHILE.
ENDFORM. " GET_ALL_DATA_FROM_INFOCUBE " format_BPS_text

Tags:
Not what you were looking for? View more on this topic or Ask a question