cancel
Showing results for 
Search instead for 
Did you mean: 

X_Message error in RSDRI_INFOPROV_READ FM

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member187400
Active Contributor
0 Kudos

Hi Cory,

Hi Corry could you go to tcode st22 ?

Could you get the message e.g. msgid/something there ?

Tks.

Regards,

Niel

Former Member
0 Kudos

Hello Niel,

I could not find any ABAP runtime errors in st22 but I have added the message class to the FM and received this error message, "An exception with the type CX_PARAMETER_INVALID occurred, but was neither handled locally, nor declared in a RAISING clause." Hope this helps!

Thanks!

Former Member
0 Kudos

I have resolved the x_message error. I simply added the code below in bold in the beginning of the FM.

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,

<b>0AMOUNT TYPE /BI0/OIAMOUNT,</b>

END OF gt_s_data.

Now the FM module executed successfully but the result returned the value zero which it should have returned the amount in dollars. On the bright side, the G_END_OF_DATA has returned the value 'X' which means the FM extracted the value successfully but it's blank. Any ideas?

Thanks!

former_member187400
Active Contributor
0 Kudos

Hi Corry,

Nice to hear that ..

Btw,

Could you check to info-object : 0AMOUNT for the attribute only .. ?

Is it checked / not ..

Regards,

Niel

Former Member
0 Kudos

Hey corry did you get the output in gt_s_data (the internal table which will hold the data after reading it from the cube) ?

The same im trying to do but im not getting single record in result table !!

Former Member
0 Kudos

Hello Niel,

I have checked the info-object 0AMOUNT and the Attribute Only is currently unchecked. I'm curious why you asked. I always ask questions to increase my scope of knowledge of BW.

Thanks!

former_member187400
Active Contributor
0 Kudos

Hi Cory,

If you check that attribute, the function will give an error. It's due to if you check that attribute, it means, that info-object only can be display attribute (not a navigation).

And actually, that attribute doesn't belong to that info-provider (like virtual).

So when the function is running to read, it will display error, that one of the info-object is missing.

It relate to OSS : 979660.

Hopefully it can help you to enlarge the scope knowledge your bw.

Regards,

Niel

Thanks a lot for any points you choose to assign.

Answers (1)

Answers (1)

Former Member
0 Kudos

This questions has been answered by adding the key figure into the structure. Now I was able to read the values from the cube. Thanks a lot for help!

Former Member
0 Kudos

Thanks cory for updating the thread, now me also able to read the data !