这非常简单,您可以编写如下代码。当表中只有字符字段时,此代码有效:
DATA: lt_options TYPE TABLE OF rfc_db_opt, lt_fields TYPE TABLE OF rfc_db_fld, lt_entries TYPE TABLE OF dpr_pha_type. CALL FUNCTION 'RFC_READ_TABLE' DESTINATION 'Y58CLNT800' EXPORTING query_table = 'DPR_PHA_TYPE' TABLES options = lt_options fields = lt_fields data = lt_entries.