sapdev logo background
sapdev logo sapdev logo
Comments

SAP ITAB STREAMS documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

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_... .

    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 ).
    cl_demo_output=>write_text( text ).
    ENDWHILE.
    itab_reader->close( ).

    cl_demo_output=>display( ).
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    ITAB_STANDARD_KEY
    ITAB_TABLE_LINE




    comments powered by Disqus