Skip to content

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 SONV-FLAG Column separator in the output. Use \| to avoid collisions.
NO_DATA IMPORTING SONV-FLAG Pass 'X' to return field metadata only.
ROWSKIPS IMPORTING SOID-ACCNT Skip first N rows (pagination). Default 0.
ROWCOUNT IMPORTING SOID-ACCNT Max rows to return. Default 0 = all.
OPTIONS TABLES RFC_DB_OPT WHERE clause fragments, max 72 chars each.
FIELDS TABLES RFC_DB_FLD Fields to return. Empty = all fields.
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.

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.

CALL FUNCTION 'BBP_RFC_READ_TABLE'
  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
    field_not_valid      = 3
    not_authorized       = 4
    data_buffer_exceeded = 5
    OTHERS               = 6.

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 OPTIONS row is still limited to 72 characters. Concatenate longer conditions across multiple rows.
  • Client filtering: does not automatically filter by client. Add MANDT = SY-MANDT to OPTIONS for client-dependent tables.
  • Authorization: S_TABU_DIS activity 03 is still required for the target table's authorization group.
  • Ultimate fallback: if both BBP_RFC_READ_TABLE and /BODS/RFC_READ_TABLE are missing, write a custom RFC-enabled FM with a proper typed SELECT — 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

Comments