ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Streaming → Streaming for data objects
Streaming for internal tables
The specific classes for streaming for internal tables are: CL_ABAP_ITAB_C_READER
- CL_ABAP_ITAB_C_READER
- CL_ABAP_ITAB_C_WRITER
- CL_ABAP_ITAB_X_READER
- CL_ABAP_ITAB_X_WRITER
These classes are subclasses of the abstract superclasses CL_ABAP_MEMORY_....
Other versions: 7.31 | 7.40 | 7.54
Example
Uses a reader stream to read an internal table.
DATA: itab TYPE TABLE OF string,
text TYPE string.
DATA itab_reader TYPE REF TO if_abap_c_reader.
APPEND `abc` TO itab.
APPEND `def` TO itab.
APPEND `ghi` TO itab.
CREATE OBJECT itab_reader TYPE cl_abap_itab_c_reader
EXPORTING
itab = itab.
WHILE itab_reader->data_available( ) = 'X'.
text = itab_reader->read( 3 ).
WRITE / text.
ENDWHILE.
itab_reader->close( ).