TYPES - LOB HANDLE
TYPES dtype TYPE dbtab lob_handle_type FOR lob_handle_columns
[lob_handle_type FOR lob_handle_columns
Derivation of an LOB handle structure as work area for working with
streaming and locators in Open SQL. For
dbtab, you must specify a
database table which is defined in the ABAP dictionary, or a
view that is defined in the ABAP Dictionary.
The column specifications
lob_handle_columns are used to determine
The statement creates a deep structure which is constructed exactly the same for all columns which are
not included in the column specification as it is for a normal
TYPE reference to
dbtab. For the LOBs included in the column specifications, 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 which is determined by the type specification
lob_handle_type, and is assigned to the respective column specification.
- A structure for read accesses can only contain the type specifications
- The definition of the LOB handle components must not contain contradictions, 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. Each specification of
... lob_handle_type FOR lob_handle_columns ...
must create a set of LOB handle components which do not overlap with the LOB handle component set of another specification.
The definition of LOB handle components must have a minimum number of specifications. If a specification
can create the same set of LOB handle components as multiple specifications, the more extensive specification must be used.
- At least one column specification must be made.
- The type specification for the first three column specifications for LOB handle component read accesses and the first two columns for LOB handle component write accesses can not be the same.
In each case there can only be one column specification
ALL ... COLUMNS, in which
The column specifications ALL
BLOB|CLOB COLUMNS include all BLOBs or CLOBs. When they are specified, you cannot also specify an individual BLOB or CLOB in a
COLUMNS ...for the same static type.
The column specification ALL
OTHER COLUMNS includes all columns that are not specified individually.
ALL OTHER BLOB COLUMNSand
ALL OTHER CLOB COLUMNScannot be specified at the same time.
ALL COLUMNScolumn specification includes all LOBs and can therefore only be specified on its own.
LOB handle structures can also be defined using the corresponding specification of components between
- LOB handle structures can also be derived in the ABAP Dictionary. A function is provided for this purpose when database tables or views that contain LOBs are displayed.
dbtabdoes not contain any LOBs that match the column specifications, no LOB handle components are created and the statement creates a normal work area.
dbtabis enhanced later by LOBs which match the column specifications
ALL [OTHER] ..., then LOB handle components are also created for these.
Refer to Deriving LOB handle structures.