Ansicht
Dokumentation

ABENSTREAMS_LOCATORS - STREAMS LOCATORS

ABENSTREAMS_LOCATORS - STREAMS LOCATORS

ABAP Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

- Streaming and Locators

In , data streams and locators can be used to access LOBs. LOBs are fields in data sources of type STRING or RAWSTRING, or SQL expressions that return one of these data types, for example, type conversion functions. The associated objects are grouped together under the term LOB handles. While a locator is always an LOB handle, in principal there can also be data streams for other resources (see Streaming).

For regular access to LOBs, ABAP data objects of the types string and xstring are used, to which the entire LOB is passed in the case of reads and from which the entire LOB is taken in the case of writes. Data streams and locators, however, work as follows:

  • For reads, reader streams can be linked with LOBs using the assignment of corresponding reference variables. The same applies to writes and writer streams. LOB data can be processed in portions using the methods of the streams. This has the benefit that LOBs do not have to be completely realized in the ABAP program.
  • In the case of reads and writes, locators can be linked with LOBs by assigning corresponding reference variables. Using the methods of the locators, the substrings of LOBs or the properties of LOBs can be accessed without requiring a complete realization in the ABAP program. Furthermore, locators enable the copying of LOBs within the database without having to transport the data between the database and the AS ABAP.

The use of data streams and locators for LOBs in DDIC database tables can improve performance with respect to the program runtime, by omitting unnecessary data transports. There are, however, also some disadvantages:

  • The use of locators leads to higher resource consumption in the database system. Locators are not yet supported by all databases. In this case, they must be emulated from the database interface on AS ABAP.
  • The use of data streams does not lead to increased resource consumption in the database system, but data streams are somewhat more limited in their use. In particular, data streams cannot be used if internal tables are used in the statements.

The following sections introduce the classes for data streams and locators as well as the interfaces they include for general LOB handles.

Note

A maximum of 1000 LOB handles can be open in a database LUW.






ABAP Short Reference   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 3768 Date: 20240329 Time: 000259     sap01-206 ( 30 ms )