TYPES - LOB HANDLE
TYPES dtype TYPE dbtab|view
lob_handle_type FOR lob_handle_columns
[ lob_handle_type FOR lob_handle_columns
Derives a LOB handle structure as a work area for working with
streaming and locators in ABAP SQL.
dbtab expects a
database table defined in ABAP Dictionary or a
database view defined for
view in ABAP Dictionary.
lob_handle_columns, when specified, are used to determine
The statement creates a deep structure that is constructed for all columns not among the specified columns
exactly as it is for a regular
dbtab. For the LOBs included in the specified columns, a component with the same name is created as a
LOB handle component. The
static type of the LOB
handle components is a class or an interface determined by the specified type
lob_handle_type, and is assigned to the respective specified column.
- The definition of the LOB handle components must not contain contradictions, which means that columns must not be assigned to unsuitable types or a column cannot be assigned to multiple types.
The definition of LOB handle components must not contain redundancies. If specified, the following must create a set of LOB handle components:
... lob_handle_type FOR lob_handle_columns ...
This set of LOB handle components must not overlap with another specified set of LOB handle components.
The definition of the LOB handle components must be specified with as few components as possible. If
the same set of LOB handle components can be specified once rather than multiple times, the more comprehensive option must be used.
- At least one column must be specified.
- The types specified for the first three specified columns for LOB handle components for reads and the first two columns for LOB handle components for writes cannot be the same.
In each case, there can only be one column specified
ALL ... COLUMNSin which
If specified, the columns
ALL BLOB|CLOB COLUMNScover all BLOBs or CLOBs. When specified, a single BLOB or CLOB cannot be specified in specified columns
COLUMNS ...for the same static type.
The specified columns ALL
OTHER COLUMNS include all columns that are not specified individually.
ALL OTHER BLOB COLUMNSor
ALL OTHER CLOB COLUMNScannot be specified at the same time.
The specified columns
ALL COLUMNSinclude all LOBs and can therefore only be specified on their own.
LOB handle structures can also be defined using the corresponding typing of components between
- LOB handle structures can also be derived in ABAP Dictionary. The display of database tables or views containing LOBs includes a function for this.
dbtabdoes not contain any LOBs that match the specified columns, no LOB handle components are created and the statement creates a normal work area.
If LOBs are added to
dbtabthat match the specified columns
ALL [OTHER] ..., LOB handle components are also created for these.
Declares types for work areas with LOB handle components for a writer stream and a reader stream for the column PICTURE and a locator for all LOBs in the database table DEMO_BLOB_TABLE.
TYPES: wa1 TYPE demo_blob_table WRITER FOR COLUMNS picture, wa2 TYPE demo_blob_table READER FOR COLUMNS picture, wa3 TYPE demo_blob_table LOCATOR FOR ALL COLUMNS.