Hi guys!
I hope somebody will be able to help me on this. I am using the RSDRI_INFOPROV_READ function call in my start routine,
and the error message i am currently getting is 'Statement "ENDMETHOD" is missing'
Here is the code, which i wrote with reference to the SAP documentation on this function usage...
When I take out the Form block, it is alright...
What am I missing?
TYPE-POOLS: rs, rsdrc.
TYPES:
BEGIN OF gt_s_data,
/bic/zbatch TYPE /BIC/OIZBATCH,
/bic/z_ap_ref TYPE /BIC/OIZ_AP_REF,
/bic/ztr_type TYPE /BIC/OIZTR_TYPE,
END OF gt_s_data.
DATA:
*working area that holds the query
g_s_data TYPE gt_s_data,
*internal table that holds the results
g_t_data TYPE gt_s_data,
*description of characteristics requested by query
g_s_sfc TYPE rsdri_s_sfc,
g_th_sfc TYPE rsdri_th_sfc,
*description of key figures requested by query
g_s_sfk TYPE rsdri_s_sfk,
g_th_sfk TYPE rsdri_th_sfk,
*description of a restriction on a characteristic
g_s_range TYPE rsdri_s_range,
g_t_range TYPE rsdri_t_range.
CLEAR g_th_sfc.
CLEAR g_s_sfc.
g_s_sfc-chanm = 'ZBATCH'.
g_s_sfc-chaalias = 'ZBATCH'.
g_s_sfc-orderby = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
CLEAR g_s_sfc.
g_s_sfc-chanm = 'Z_AP_REF'.
g_s_sfc-chaalias = 'Z_AP_REF'.
g_s_sfc-orderby = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
CLEAR g_s_sfc.
g_s_sfc-chanm = 'ZTR_TYPE'.
g_s_sfc-chaalias = 'ZTR_TYPE'.
g_s_sfc-orderby = 0.
INSERT g_s_sfc INTO TABLE g_th_sfc.
DATA:
g_end_of_data TYPE rs_bool,
g_first_call TYPE rs_bool.
variable will be set to TRUE when the last data package is read
g_end_of_data = rs_c_false.
*variable will indicate 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.
WHILE g_end_of_data = rs_c_false.
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
i_infoprov = 'ZUK_C03A'
i_th_sfc = g_th_sfc
i_th_sfk = g_th_sfk
i_t_range = g_t_range
i_reference_date = sy-datum
i_save_in_table = rs_c_false
i_save_in_file = rs_c_false
i_packagesize = 10
i_authority_check = rsdrc_c_authchk-read
IMPORTING
e_t_data = g_t_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
illegal_download = 8
illegal_tablename = 9
OTHERS = 11.
IF sy-subrc <> 0.
BREAK-POINT.
EXIT.
ENDIF.
ENDWHILE.
FORM print_result.
LOOP AT g_t_data INTO g_s_data.
WRITE: / g_s_data-zbatch,
g_s_data-z_ap_ref,
g_s_data-ztr_type.
ENDLOOP.
ENDFORM.
Edited by: l.volodina on Jul 1, 2009 1:57 PM