Hello all,
I need some help. Below is my code and I keep getting X_Message = 11 exception. I cannot see what's wrong with it. As you can see, I want to extract the amount value on the specific project in the cube. Does anybody know what I am doing wrong below? I will reward points for any useful answers.
TYPE-POOLS: rs, rsdrc.
TYPES:
BEGIN OF gt_s_data,
0PROJECT TYPE /BI0/OIPROJECT,
0COSTELMNT TYPE /BI0/OICOSTELMNT,
0FISCYEAR TYPE /BI0/OIFISCYEAR,
0CURRENCY TYPE /BI0/OICURRENCY,
0CURTYPE TYPE /BI0/OICURTYPE,
END OF gt_s_data.
DATA:
g_s_data TYPE gt_s_data,
g_t_data TYPE STANDARD TABLE OF gt_s_data
WITH DEFAULT KEY INITIAL SIZE 10,
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: plnyr4(4).
CLEAR g_th_sfc.
CLEAR g_s_sfc.
g_s_sfc-CHANM = '0PROJECT'.
g_s_sfc-CHAALIAS = '0PROJECT'.
g_s_sfc-ORDERBY = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
g_s_sfc-CHANM = '0COSTELMNT'.
g_s_sfc-CHAALIAS = '0COSTELMNT'.
g_s_sfc-ORDERBY = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
g_s_sfc-CHANM = '0FISCYEAR'.
g_s_sfc-CHAALIAS = '0FISCYEAR'.
g_s_sfc-ORDERBY = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
g_s_sfc-CHANM = '0CURRENCY'.
g_s_sfc-CHAALIAS = '0CURRENCY'.
g_s_sfc-ORDERBY = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
g_s_sfc-CHANM = '0CURTYPE'.
g_s_sfc-CHAALIAS = '0CURTYPE'.
g_s_sfc-ORDERBY = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
WHAT KEY FIGURES YOU WANT RETURNED
CLEAR g_th_sfk.
g_s_SFK-KYFNM = '0AMOUNT'.
g_s_SFK-KYFALIAS = '0AMOUNT'.
g_s_sfk-aggr = 'SUM'.
INSERT g_s_sfk INTO TABLE g_th_sfk.
WHERE YOU SET THE PARAMETERS/FILTERS.
CLEAR g_t_range.
CLEAR g_s_range.
g_s_RANGE-CHANM = '0PROJECT'.
g_s_RANGE-SIGN = 'I'.
g_s_RANGE-COMPOP = 'EQ'.
g_s_RANGE-LOW = 'PROJ05-IS002'.
APPEND g_s_range TO g_t_range.
CLEAR g_s_range.
g_s_RANGE-CHANM = '0COSTELMNT'.
g_s_RANGE-SIGN = 'I'.
g_s_RANGE-COMPOP = 'EQ'.
g_s_RANGE-LOW = '0000416951'.
APPEND g_s_range TO g_t_range.
*
plnyr4 = SY-datum(4) + 1.
*
CLEAR g_s_range.
g_s_RANGE-CHANM = '0FISCYEAR'.
g_s_RANGE-SIGN = 'I'.
g_s_RANGE-COMPOP = 'EQ'.
g_s_RANGE-LOW = plnyr4.
APPEND g_s_range TO g_t_range.
CLEAR g_s_range.
g_s_RANGE-CHANM = '0CURRENCY'.
g_s_RANGE-SIGN = 'I'.
g_s_RANGE-COMPOP = 'EQ'.
g_s_RANGE-LOW = 'USD'.
APPEND g_s_range TO g_t_range.
*
CLEAR g_s_range.
g_s_RANGE-CHANM = '0CURTYPE'.
g_s_RANGE-SIGN = 'I'.
g_s_RANGE-COMPOP = 'EQ'.
g_s_RANGE-LOW = '10'.
APPEND g_s_range TO g_t_range.
*
DATA: LIN_COUNT TYPE I.
DATA: g_first_call TYPE rs_bool.
*g_end_of_data TYPE rs_bool.
--- 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.
clear e_subrc.
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
I_INFOPROV = 'ZSEMCUBE01'
I_TH_SFC = g_th_sfc
I_TH_SFK = g_th_sfk
I_T_RANGE = g_t_range
I_TH_TABLESEL =
I_T_RTIME =
I_REFERENCE_DATE = SY-DATUM
I_ROLLUP_ONLY = RS_C_TRUE
I_T_REQUID =
I_SAVE_IN_TABLE = rs_c_false
I_TABLENAME = rs_c_false
I_SAVE_IN_FILE = ' '
I_FILENAME =
I_PACKAGESIZE = 10
I_MAXROWS = 1
I_AUTHORITY_CHECK = RSDRC_C_AUTHCHK-READ
I_CURRENCY_CONVERSION = 'X'
I_USE_DB_AGGREGATION = RS_C_TRUE
I_USE_AGGREGATES = RS_C_TRUE
I_READ_ODS_DELTA = RS_C_FALSE
I_CALLER = RSDRS_C_CALLER-RSDRI
I_DEBUG = RS_C_FALSE
I_CLEAR = RS_C_FALSE
IMPORTING
E_T_DATA = g_t_data
E_END_OF_DATA = g_end_of_data
E_AGGREGATE =
E_SPLIT_OCCURRED =
E_T_MSG =
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 = 7
ILLEGAL_TABLENAME = 8
TRANS_NO_WRITE_MODE = 9
INHERITED_ERROR = 10
X_MESSAGE = 11
OTHERS = 12.
e_subrc = sy-subrc.
DESCRIBE TABLE g_t_data LINES LIN_COUNT.
WRITE : LIN_COUNT.
Hi Cory,
Hi Corry could you go to tcode st22 ?
Could you get the message e.g. msgid/something there ?
Tks.
Regards,
Niel
Add a comment