BBP_RFC_READ_TABLE¶
SRM/EBP variant of RFC_READ_TABLE with extended row support.
Purpose¶
BBP_RFC_READ_TABLE is a drop-in replacement for RFC_READ_TABLE that lifts the 512-byte row width restriction. It originated in the SAP SRM (Supplier Relationship Management) / EBP component, but it is frequently present on ECC and S/4HANA systems as a side-effect of SRM transport imports — making it more widely available than /BODS/RFC_READ_TABLE.
Not part of the standard kernel
BBP_RFC_READ_TABLE is delivered via the SRM/EBP software component. Its presence depends on which components have been imported into the target system. Always check SE37 before relying on it.
Signature¶
Identical to RFC_READ_TABLE — swap the function module name and the rest of the code is unchanged.
| Parameter | Direction | Type | Notes |
|---|---|---|---|
QUERY_TABLE |
IMPORTING | DD02L-TABNAME |
Table to read. Required. |
DELIMITER |
IMPORTING | CHAR1 |
Column separator in the output. Use \| to avoid collisions. |
NO_DATA |
IMPORTING | CHAR1 |
Pass 'X' to return field metadata only. |
ROWSKIPS |
IMPORTING | INT4 |
Skip first N rows (pagination). |
ROWCOUNT |
IMPORTING | INT4 |
Max rows to return (0 = all). |
FIELDS |
TABLES | RFC_DB_FLD |
Fields to return. Empty = all fields. |
OPTIONS |
TABLES | RFC_DB_OPT |
WHERE clause fragments, max 72 chars each. |
DATA |
TABLES | TAB512 |
Output rows as flat strings split by DELIMITER. |
Example — using BBP_RFC_READ_TABLE as a fallback¶
DATA: lt_fields TYPE STANDARD TABLE OF rfc_db_fld,
lt_options TYPE STANDARD TABLE OF rfc_db_opt,
lt_data TYPE STANDARD TABLE OF tab512.
DATA: lv_fm_name TYPE rs38l-name.
APPEND VALUE rfc_db_fld( fieldname = 'LIFNR' ) TO lt_fields.
APPEND VALUE rfc_db_fld( fieldname = 'NAME1' ) TO lt_fields.
APPEND VALUE rfc_db_opt( text = 'MANDT = SY-MANDT' ) TO lt_options.
" Prefer /BODS/RFC_READ_TABLE; fall back to BBP variant
CALL FUNCTION 'FUNCTION_EXISTS'
EXPORTING
funcname = '/BODS/RFC_READ_TABLE'
EXCEPTIONS
function_not_exist = 1
OTHERS = 2.
IF sy-subrc = 0.
lv_fm_name = '/BODS/RFC_READ_TABLE'.
ELSE.
lv_fm_name = 'BBP_RFC_READ_TABLE'.
ENDIF.
CALL FUNCTION lv_fm_name
EXPORTING
query_table = 'LFA1'
delimiter = '|'
rowcount = 1000
TABLES
fields = lt_fields
options = lt_options
data = lt_data
EXCEPTIONS
table_not_available = 1
table_without_data = 2
option_not_valid = 3
field_not_valid = 4
not_authorized = 5
data_buffer_exceeded = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno.
ENDIF.
LOOP AT lt_data INTO DATA(ls_row).
SPLIT ls_row-wa AT '|' INTO DATA(lv_lifnr) DATA(lv_name1).
WRITE: / lv_lifnr, lv_name1.
ENDLOOP.
Availability in practice
In many ECC and S/4HANA landscapes that have or had SRM installed, BBP_RFC_READ_TABLE is present even if the SRM system itself was decommissioned. It's a reasonable first fallback before resorting to a custom FM.
Common pitfalls¶
- Component dependency: the FM belongs to the SRM/EBP delivery — it is not guaranteed on a vanilla ECC or S/4HANA system without SRM transports.
- Same WHERE clause rules: each
OPTIONSrow is still limited to 72 characters. Concatenate longer conditions across multiple rows. - Client filtering: does not automatically filter by client. Add
MANDT = SY-MANDTtoOPTIONSfor client-dependent tables. - Authorization:
S_TABU_DISactivity03is still required for the target table's authorization group. - Ultimate fallback: if both
BBP_RFC_READ_TABLEand/BODS/RFC_READ_TABLEare missing, write a custom RFC-enabled FM with a proper typedSELECT— it will be more performant anyway.
See also¶
RFC_READ_TABLE— standard variant; sufficient for tables with rows under 512 bytes/BODS/RFC_READ_TABLE— BODS-origin variant; similar extended width but requires BODS installation