Open SQL - Streaming
System Classes and System Interfaces for Reader and Writer Streams
The special interfaces
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.
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
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
clause of the statement
SELECT, a LOB from the results set is assigned to a reference variable for a reader stream.
SELECT - LOB Handles.
A writer stream that is bound to an LOB (that is, an instance of the class CL_ABAP_DB_C_WRITER or CL_ABAP_DB_X_WRITER)
can only be created if a reference variabe for a reader stream is specified as a source in the statements
Closing Data Streams for LOBs
Since the number of data streams open at one time is limited to 16, they should be closed as soon as
possible using the CLOSE method. Regardless of this, reader streams are closed implicitly at the end
SELECT loop and at the end of a database LUW. An open writer stream can be closed implicitly only by using a
Database commits for open writer streams, on the other hand, produce the runtime error