Skip to Content
0
Former Member
Oct 20, 2006 at 10:51 PM

Urgent: Please find the error in the code to read data from cube.

27 Views

Hi Gurus,

I am trying to read the data from the cube. Below is my code. It returns nothing. Could any please help me to solve this.

TYPES:

BEGIN OF S_DATA,

Z_CHAR1 like /BIC/CTABLE-ZCHAR1,

Z_CHAR2 like /BIC/CTABLE-ZCHAR2,

Z_CHAR3 like /BIC/CTABLE-ZCHAR3,

Z_FISCPER like /BIC/CTABLE-0FISCPER,

0AMOUNT type p DECIMALS 2,

END OF S_DATA.

data:

i_s_data TYPE s_data,

i_t_data TYPE STANDARD TABLE OF s_data

WITH DEFAULT KEY INITIAL SIZE 10,

c_data TYPE s_data occurs 0 with header line,

i_s_sfc TYPE rsdri_s_sfc,

i_th_sfc TYPE rsdri_th_sfc,

i_s_sfk TYPE rsdri_s_sfk,

i_th_sfk TYPE rsdri_th_sfk,

i_s_range TYPE rsdri_s_range,

i_t_range TYPE rsdri_t_range.

DATA: end_of_data TYPE rs_bool,

clear: i_th_sfc.

g_s_sfc-chanm = 'Z_CHAR1'.

g_s_sfc-chaalias = 'Z_CHAR1'.

g_s_sfc-orderby = 0.

INSERT i_s_sfc INTO TABLE i_th_sfc.

clear: i_s_sfc.

g_s_sfc-chanm = 'Z_CHAR2'.

g_s_sfc-chaalias = 'Z_CHAR2'.

g_s_sfc-orderby = 0.

INSERT i_s_sfc INTO TABLE i_th_sfc.

clear: i_s_sfc.

g_s_sfc-chanm = 'Z_CHAR3'.

g_s_sfc-chaalias = 'Z_CHAR3'.

g_s_sfc-orderby = 0.

INSERT i_s_sfc INTO TABLE i_th_sfc.

clear: i_s_sfc.

g_s_sfc-chanm = 'Z_FISCPER'.

g_s_sfc-chaalias = 'Z_FISCPER'.

g_s_sfc-orderby = 0.

INSERT i_s_sfc INTO TABLE i_th_sfc.

clear: i_s_sfk..

g_s_sfk-kyfnm = '0AMOUNT'.

g_s_sfk-kyfalias = '0AMOUNT'.

g_s_sfk-aggr = 'SUM'.

INSERT i_s_sfk INTO TABLE i_th_sfk.

clear: i_t_range, i_s_range.

i_s_range-chanm = 'Z_FISCPER'.

i_s_range-sign = rs_c_range_sign-including.

i_s_range-compop = rs_c_range_opt-equal.

i_s_range-low = 200601.

i_s_range-high = 200606.

APPEND i_s_range TO i_t_range.

CALL FUNCTION 'RSDRI_INFOPROV_READ'

EXPORTING

i_infoprov = 'ZC_CUBE'

i_th_sfc = i_th_sfc

i_th_sfk = i_th_sfk

i_t_range = i_t_range

i_reference_date = sy-datum

i_save_in_table = rs_c_false

i_save_in_file = rs_c_false

i_packagesize = 20

IMPORTING

e_t_data = i_t_data

e_end_of_data = end_of_data

CHANGING

c_first_call = i_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

ncum_not_supported = 7

illegal_download = 8

illegal_tablename = 9

OTHERS = 11.

append lines of I_t_data to c_data.

Thanks

Regards

aarthi

aarthi.sap@gmail.com