12-16-2015 9:05 AM
Hello Gents,
kindly help me. after executing FM 'RSDRI_INFOPROV_READ' getting sy-subrc = 11.
below is the code. please suggest me where is the mistake.
TYPES: BEGIN OF ty_cube_data,
zioe_sku TYPE /BI0/9AOIMATNR,
zioe_depo TYPE /BI0/9AOILOCNO,
zioe_srsid TYPE /BIC/OIZIO_SRCID,
zioe_prod TYPE /BI0/9AOIFPROD,
END OF ty_cube_data.
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,
it_cube_data TYPE STANDARD TABLE OF ty_cube_data,
wa_cube_data TYPE ty_cube_data,
g_end_of_data TYPE rs_bool,
g_first_call TYPE rs_bool.
CONSTANTS: rs_c_false TYPE rs_bool VALUE ' ',
rs_c_true TYPE rs_bool VALUE 'X',
c_max_record TYPE i VALUE '100'.
REFRESH: g_th_sfc.
CLEAR: g_s_sfc.
g_s_sfc-chanm = '9AMATNR'.
g_s_sfc-chaalias = '9AMATNR'.
g_s_sfc-orderby = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
CLEAR: g_s_sfc.
g_s_sfc-chanm = '9ALOCNO'.
g_s_sfc-chaalias = '9ALOCNO'.
g_s_sfc-orderby = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
REFRESH: g_th_sfk.
CLEAR: g_s_sfc.
g_s_sfc-chanm = 'ZIO_SRCID'.
g_s_sfc-chaalias = 'ZIO_SRCID'.
g_s_sfc-orderby = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
CLEAR: g_s_sfk.
g_s_sfk-kyfnm = '9AFPROD'.
g_s_sfk-kyfalias = '9AFPROD'.
g_s_sfk-aggr = 'MAX'.
INSERT g_s_sfk INTO TABLE g_th_sfk.
* --- this variable will be set to FALSE when the last data
* package is read
g_end_of_data = rs_c_false.
* --- this variable indicates whether this is an initial call
g_first_call = rs_c_true.
*WHILE g_end_of_data = rs_c_false.
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
i_infoprov = 'ZIC_PLO'
i_th_sfc = g_th_sfc
i_th_sfk = g_th_sfk
* i_t_range =
i_save_in_table = rs_c_false
i_save_in_file = rs_c_false
i_packagesize = c_max_record " The maximum records is set to 100 only
IMPORTING
e_t_data = it_cube_data
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
ncum_not_supported = 7
illegal_download = 8
illegal_tablename = 9
OTHERS = 11.
IF sy-subrc EQ 0.
ENDIF.
*ENDWHILE.
B/Regards,
Jamal.
12-16-2015 9:23 AM
Set a BREAKPOINT in Class CL_RSDRI_INFOPROV Method READ to find out reason for RC=11.
12-16-2015 11:29 AM
Hi Michael,
I have checked, RC value is coming '8', but '8' is not in WHEN condition in class, hence going into OTHERS case and giving subrc is '11'.
CASE l_subrc.
WHEN 0.
WHEN 1. RAISE illegal_download.
WHEN 2. RAISE illegal_input.
WHEN 3. RAISE illegal_input_range.
WHEN 4. RAISE illegal_input_sfc.
WHEN 5. RAISE illegal_input_sfk.
WHEN 6. RAISE illegal_input_tablesel.
WHEN 7. RAISE illegal_tablename.
WHEN 9. RAISE no_authorization.
WHEN 10. RAISE trans_no_write_mode.
WHEN OTHERS. RAISE x_message.
ENDCASE.
suggest or help me for resolve this.
B/Regards,
Jamal.
12-16-2015 11:58 AM
try:
rs_c_false TYPE rs_bool VALUE space.
in stead of
rs_c_false TYPE rs_bool VALUE ' ',
12-16-2015 12:11 PM
Hello Peter,
I have changed as you suggested and tested.
CONSTANTS: rs_c_false TYPE rs_bool VALUE space,
but same error and i passed ranges as well but no use.
Please suggest.
12-16-2015 12:24 PM
Well then I don't really know.
I think the best thing you can do is to debug in detail to see where the exception is raised. Then you might understand why.
12-16-2015 12:43 PM
Thanks Peter.
I debug the FM and it is giving error at below method.
* read data
CALL METHOD s_r_infoprov->read
after executing this method, method giving exception error '8', 8 means ' inherited_error '.
EXCEPTIONS
illegal_download = 1
illegal_input = 2
illegal_input_range = 3
illegal_input_sfc = 4
illegal_input_sfk = 5
illegal_input_tablesel = 6
illegal_tablename = 7
inherited_error = 8
no_authorization = 9
trans_no_write_mode = 10
x_message = 11.
what is the mistake of inherited error in code.
12-16-2015 12:51 PM
I meant to say that you will have to debug step by step, so also in this method and all the methods and function modules that you encounter during debugging