I am desperate with trying to read a table over RFC and get it converted back.
This is my code so far, everything works properly.
DATA: lt_options LIKE TABLE OF rfc_db_opt,
lt_fields LIKE TABLE OF rfc_db_fld,
lt_data LIKE TABLE OF tab512,
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_data.
I just don't know how to get lt_data converted back to a table like lt_entries.
It should be as simple as
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.
However, this will only work if the table in question contains only character fields.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With