Open SQL - Streaming Open SQL supports streaming for LOBs in database tables.
System Classes and System Interfaces for Reader and Writer Streams The system classes for the various types of data streams are:
CL_ABAP_DB_C_READER for character-like reader streams. The data source is a CLOB.
CL_ABAP_DB_X_READER for binary reader streams. The data source is a BLOB.
CL_ABAP_DB_C_WRITER for character-like writer streams. The data sink is a CLOB.
CL_ABAP_DB_X_WRITER for binary writer streams. The data sink is a BLOB. The special interfaces
IF_ABAP_DB_READER
IF_ABAP_DB_WRITER are used to access the reader and writer streams independently of the stream type. For further resource-independent classes and interfaces, as well as for the hierarchy of the object types, see the figure and explanation under Streaming.
Important Methods The methods for streaming in Open SQL are the same as for general streaming.
Data Sources and Data Sinks Any LOBs declared in database tables can be considered as data sources or data sinks. The instances of the classes above are data streams joined to LOBs. These are LOB handles and implement the corresponding interfaces. Usage in Open SQL involves reference variables which point to the relevant LOB handles.
Creating Data Streams for LOBs
Reader Streams A reader stream that is bound to anLOB (that is, an instance of the class CL_ABAP_DB_C_READER or CL_ABAP_DB_X_READER) can only be created if, in the INTO clause of the statement SELECT, a LOB from the results set is assigned to a reference variable for a reader stream. Refer to SELECT - LOB Handle s.