Ansicht
Dokumentation

ABAPSELECT_CREATING - SELECT CREATING

ABAPSELECT_CREATING - SELECT CREATING

General Data in Customer Master   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

SELECT, CREATING

Short Reference



... CREATING ${  READER$|LOCATOR FOR ${ COLUMNS blob1 blob2 ... clob1 clob2 ... $}
                                 $| ${ ALL $[OTHER$] $[BLOB$|CLOB$] COLUMNS $}
               $[READER$|LOCATOR FOR ...$] $}

           $| ${  (crea_syntax) $}  ...

Additions

1. ... READER$|LOCATOR

2. ... $[ALL $[OTHER$] $[BLOB$|CLOB$]$] COLUMNS $[blob1 blob2 ... clob1 clob2 ...$]

3. ... (crea_syntax)

Effect

The addition CREATING must be specified after INTO or APPENDING when a reference variable for a LOB handle is assigned to a LOB of the result set as a target field and the static type of this reference variable is one of the following three LOB interfaces:

The specifications after CREATING determine the class from which the associated LOB handles are created. For all other possible static types, the class can be determined from the static type and the LOB type. CREATING cannot be specified in this case.

The CREATING addition can be specified either statically or dynamically. In the static variant, the class and columns are determined using additions. In the dynamic variant, the syntax of the static variants is specified in crea_syntax.

The syntax and the rules for the additions after CREATING correspond to the type and columns specified for the derivation of LOB handle structures with TYPES. Unlike the statement TYPES, the type specified is limited here to READER and LOCATOR, and only components that are typed with a LOB interface are respected. The types specified for the first two specifications after CREATING must be different.

Note

The addition CREATING cannot be used in combination with SQL expressions that return LOBs. It can only be used with LOB fields directly.

Addition 1

... READER$|LOCATOR

Effect

These additions determine the LOB handle class for each of the columns specified after it.

  • LOCATOR creates locators for all of the columns specified after it.

The assignment to the classes is the same as the type specified in the derivation of a LOB handle structure using TYPES, except that here it is the dynamic type that is determined and not the static type.

Example

After a row is read, the dynamic type of reader is CL_ABAP_DB_X_READER.

Addition 2

... $[ALL $[OTHER$] $[BLOB$|CLOB$]$] COLUMNS $[blob1 blob2 ... clob1 clob2 ...$]

Effect

These additions assign the previous type specifications to the columns of the result set. The meaning of the additions is the same as the columns specified in the derivation of an LOB handle structure using TYPES. The difference is that the set of columns used consists exactly of those columns from the result set that were assigned to a reference variable whose static type is an LOB interface:

  • Individual columns for which this is not the case must not be specified.
  • The specification of ALL ... COLUMNS only respects such columns.

The combination options for columns specified with one another and with types specified are the same as for TYPES. Specifically, the column specified as ALL OTHER ... must be the last column specified.

Notes

  • The specification of ALL ... COLUMNS also respects columns which are added by later enhancements to the data sources.
  • The actual names must be used for the columns specified as blob1, blob2, clob1, clob2, .... The alias names defined using AS are ignored.

Example

Like the previous example, but the column PICTURE is selected automatically here.

Addition 3

... (crea_syntax)

Effect

As an alternative to static variants, a data object crea_syntax can be specified in parentheses which contains the syntax of the static additions or is initial when executing the statement. The same applies to crea_syntax as to column_syntax when specifying columns dynamically in the SELECT list. If the content of crea_syntax is initial, the addition CREATING is ignored.

Example

Like the previous example, but the items after CREATING are specified dynamically here.






Vendor Master (General Section)   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 8427 Date: 20240419 Time: 192755     sap01-206 ( 112 ms )