on 06-15-2011 3:40 PM
Hi,
I am using the function module RSDRI_INFOPROV_READ to read the data from transactional cube.
I am using the below code but data is not getting retrived.
The FM is not getting triggred in the while loop
WHILE v_end_of_data = rs_c_false.
System is not recognizing the rs_c_false and rs_c_true, if is put in the comments 'rs_c_false' it is accepting but the FM is not triggering and v_end_of_data is type TYPE rs_bool so it is accepting the singlecharacter because of this the FM is not geting triggred.
Here is the code i am using
TYPES: BEGIN OF t_s_data,
tmp_ZMKTSPED type /BIC/OIZMKTSPED,
tmp_Z_MKSRATE type /BIC/OIZ_MKSRATE
tmp_FISCYEAR(4) type C,
End of t_s_data.
DATA: i_t_data TYPE STANDARD TABLE OF t_s_data WITH HEADER LINE,
i_t_data2 TYPE STANDARD TABLE OF t_s_data WITH HEADER LINE,
i_th_sfc TYPE rsdri_th_sfc,
i_th_sfk TYPE rsdri_th_sfk,
wa_s_sfc TYPE rsdri_s_sfc,
wa_s_sfk TYPE rsdri_s_sfk,
wa_s_range TYPE rsdri_s_range,
i_t_range TYPE rsdri_t_range,
i_td_range TYPE rsdri_t_range,
v_first_call TYPE rs_bool,
v_end_of_data TYPE rs_bool.
Characteristics
wa_s_sfc-chanm = 'ZMKTSPED'. "name of characteristic
wa_s_sfc-chaalias = 'tmp_ZMKTSPED'. "column in G_T_DATA
wa_s_sfc-orderby = 0. " order by
INSERT wa_s_sfc INTO TABLE i_th_sfc.
Characteristics
wa_s_sfc-chanm = '0FISCYEAR'. "name of characteristic
wa_s_sfc-chaalias = 'tmp_FISCYEAR'. "column in G_T_DATA
wa_s_sfc-orderby = 0. " order by
INSERT wa_s_sfc INTO TABLE i_th_sfc.
Key Figures.
wa_s_sfk-kyfnm = 'Z_MKSRATE'. "Name of key figure
wa_s_sfk-kyfalias = 'tmp_Z_MKSRATE'. "Column heading
wa_s_sfk-aggr = 'SUM'. "Aggregation
INSERT wa_s_sfk INTO TABLE i_th_sfk.
First call indicator. Must be set to true.
v_first_call = rs_c_true.
End of data flag. Must be set to false.
v_end_of_data = rs_c_false.
REFRESH i_t_range.
End of data flag. Must be set to false.
v_end_of_data = rs_c_false.
REFRESH i_t_range.
CLEAR wa_s_range.
Select all data in cube that is equal to Fiscal year 2007
wa_s_range-chanm = '0FISCYEAR'. "Name Of Characteristic
wa_s_range-sign = 'I'. "Include
wa_s_range-compop = 'EQ'. "Operator
wa_s_range-low = '2007'.
APPEND wa_s_range TO i_td_range.
The call to this function module must be performed within a loop
while the v_end_of_data flag is 'false' because the number of records
returned is based on the 'packagesize' parameter. Once all records
have been extracted, The function sets v_end_of_data to 'true' and
the loop is terminated.
WHILE v_end_of_data = rs_c_false.
REFRESH i_t_data2.
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
i_infoprov = 'ZCPN_C08' "Info Cube Name
i_th_sfc = i_th_sfc "Characteristics Table
i_th_sfk = i_th_sfk "Key Figures Table
i_t_range = i_t_range "Range Filter Table
i_use_db_aggregation = rs_c_false "Default True
i_currency_conversion = rs_c_false "Default True
i_packagesize = 10000 "Default 1000
IMPORTING
e_t_data = i_t_data2[] "RESULT File
e_end_of_data = v_end_of_data "End Of Data Flag
CHANGING
c_first_call = v_first_call "First Call Ind.
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.
IF sy-subrc = 0.
LOOP AT i_t_data2.
MOVE-CORRESPONDING i_t_data2 TO i_t_data.
APPEND i_t_data.
ENDLOOP.
ENDIF.
ENDWHILE.
Please suggest if i am missing something. I did the debug also i couldn't find out exact cause of the error.
Thanks
Best regards
SG
Hello SG,
Don't forget to set the I_ROLLUP_ONLY parameter to space otherwise it will only extract data from closed requests (if you have only one opened request in your cube, it will extract no data). The i_rollup_only is the equivalent of the standard BEX variable (0S_RQMRC - most current data) you use for the same purpose in BEX queries.
Regards,
Fred
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Fred,
I will set that parameter also, but my problem is i am unable to set the parameters
WHILE v_end_of_data = 'RS_C_FALSE' and RS_C_TRUE if i use this paramters system is not accepting as mentioned in th how to parer and and in demo also.
v_first_call TYPE rs_bool,
v_end_of_data TYPE rs_bool.
these types are like boolean and it is accept only single character but how can i pass the 'RS_C_FALSE' and RS_C_TRUE
this where i am getting the problem, Please suggest if i am missiing anything here, If you have done this one please share ur code .
Thanks
Best regards
SG
Hello Guys,
I have fixed the error by declaring type pools: RSDRC. But i am getting short dump
Short test : Internal error in the database interface occured during access to the data of table
"RSMDATASTATE"
FUNCTION RSM_DATASTATE_GET.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_INFOCUBE) TYPE RSD_INFOCUBE
*" VALUE(I_BYPASS_BUFFER) TYPE RS_BOOL DEFAULT RS_C_FALSE
*" EXPORTING
*" REFERENCE(E_S_DATASTATE) TYPE RRSM_S_DATASTATE
*" REFERENCE(E_REPORTING_RNSID) TYPE RSSID
*" EXCEPTIONS
*" INFOCUBE_NOT_FOUND
*"----
IF I_BYPASS_BUFFER = RS_C_FALSE.
SELECT SINGLE * FROM RSMDATASTATE * I am getting error at this lane.
INTO E_S_DATASTATE
WHERE INFOCUBE = I_INFOCUBE.
ELSE.
SELECT SINGLE * BYPASSING BUFFER
FROM RSMDATASTATE
INTO E_S_DATASTATE
WHERE INFOCUBE = I_INFOCUBE.
ENDIF.
IF SY-SUBRC <> 0.
RAISE INFOCUBE_NOT_FOUND.
ENDIF.
if e_s_datastate-aggrexist = rs_c_true.
e_reporting_rnsid = e_s_datastate-rollup.
else.
e_reporting_rnsid = e_s_datastate-qualok.
endif.
ENDFUNCTION.
I am using this Funcation module to get the data from Realtime infocube.is there any special settings or any parameters do i need to transfer regarding relatime infocube.
is anyone idea about this error, does anybody across this situvation. Please share your ideas on this.
when i check in the debugging it shows cube tyoe is B but iam not actal it is realtinme infocube.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.