SAP DB LOCATOR ABEXA



Get Example source ABAP code based on a different SAP table
  



AB_SQL - Locator, Access to Column Content
This example demonstrates how to access texts in DDIC database tables using locators.

ABAP_SOURCE_CODE
DEMO CL_DEMO_DB_LOCATOR

ABAP_DESCRIPTION
In this example, a SELECT loop and locators created there are used to access the text column of a DDIC database table in which texts from Online Text Repository (OTR) are stored in a column of the type STRING.
The methods of the locators make it possible to get information about the texts without them having to be transported into the ABAP class. In this example, the average length of all texts of a language is determined and the number of texts which contain a specific character string is returned.
Since the number of locators in each database LUW is limited, the locator created there must be closed explicitly at the end of each SELECT loop. The runtime error DBIF_RSQL_TOO_MANY_LOB_HANDLES occurs if the maximum number of open locators is exceeded.