The HANDLE data type stores a pointer to a structure that represents a running built-in ABL procedure or an object in a procedure such as a socket, temp-table, or button. Handles allow you to access attributes and methods that ABL defines for each object, which you can use to interact with an object's state and behavior.

Handle-based objects are conceptually analogous to, but different from, class-based objects. Unlike class-based objects, the types and capabilities of all handle-based objects are built in to the AVM. You cannot define your own handle-based objects. Handle-based objects are also not garbage collected. You must manage the memory by cleaning up handle-based objects, using the DELETE OBJECT statement, when they are no longer needed.

ABL automatically creates instances of certain other handle-based object types in various ways, including system objects that you can access using an appropriate keyword-defined system handle. Examples of some system object handles include:
You define static instances, or create dynamic instances of many handle-based object types using the DEFINE and CREATE statements. You reference a static instance by the defined object name or its handle. You reference a dynamic instance only by its handle. The following example code show you how to define and access both a static and dynamic instance of an object.
/* Define and access a static instance of an object */

/* Define a temp-table */
DEFINE TEMP-TABLE ttCustomer NO-UNDO 
  FIELD CustName AS CHARACTER
  FIELD CustId AS CHARACTER. 

/* Define a handle variable */
VAR HANDLE tth.

/* Set the handle to the statically defined temp-table */
tth = TEMP-TABLE ttCustomer:HANDLE.

/* Access the HAS-RECORDS method using the handle */
DISPLAY "ttCustomer has records:" tth:HAS-RECORDS.

/* Alternatively, access the HAS-RECORDS method using the object name*/
DISPLAY "ttCustomer has records:" TEMP-TABLE ttCustomer:HAS-RECORDS.
/* Define and access a dynamic instance of an object */

/* Define a handle variable */
VAR HANDLE tth.

/* Create an empty temp-table */
CREATE TEMP-TABLE tth.
tth:ADD-NEW-FIELD("CustName","CHARACTER").
tth:ADD-NEW-FIELD("CustId","CHARACTER").
tth:TEMP-TABLE-PREPARE("cust").

/* Access the HAS-RECORDS method using the handle */
DISPLAY "tth has records:" tth:HAS-RECORDS.

Some commonly used object type handles in ABL are:

For the complete list of system and object handles, see the Handle Reference. Attributes and methods for object type handles are described in the Handle Attributes and Methods Reference.