AB_SQL - Locators AB_SQL supports locators> for LOBs> in data sources. ITOC
System Classes for Locators The associated system classes> for the two types of LOBs are:
CL_ABAP_DB_C_LOCATOR>> for CLOBs>.
CL_ABAP_DB_X_LOCATOR>> for BLOBs>. The instances of the classes are LOB handles > and implement the corresponding interfaces >. Their use in AB_SQL involves reference variables that point to LOB handles of this type.
Important Methods Locators contain the following methods BEGIN_SECTION VERSION 5 OUT that are implemented as kernel methods> END_SECTION VERSION 5 OUT . The actual access to LOBs is performed by the ABAP runtime framework.
Methods in Both Locator Types
GET_LENGTH> returns the length of the LOB that is bound to a locator.
FIND> searches from an offset for a substring of an LOB which is bound to a locator, and returns its position. The length of a character-like substring that can be found using FIND> is limited to 1333 characters. The length of a binary substring is limited to 2666 bytes. Methods from the IF_ABAP_CLOSE_RESOURCE>> interface:
CLOSE> closes the locator.
IS_CLOSED> returns X , if the locator is closed.
Methods in Character-Like Locators
GET_SUBSTRING> returns the substring specified using offset and length, of a CLOB which is bound to a locator.
Methods in Binary Locators
GET_BYTES> returns the substring, specified using offset and length, of a BLOB which is bound to a locator.
Creating Locators for LOBs A locator bound to an LOB, that is, an instance of the class CL_ABAP_DB_C_LOCATOR> or CL_ABAP_DB_X_LOCATOR>, can only be created by assigning a LOB from the result set to a reference variable for a locator in the INTO>> clause of the statement SELECT>>. See SELECT> - LOB Handles>.