SELECT - Assigment rules for individual columns
Prerequisites
The following table shows the prerequisites for assigning individual columns of the result set to individual
data objects - that is, for all forms of the SELECT statement,
except when all columns in a work area wa are read with
* and CORRESPONDING
FIELDS is not specified at the same time. The table shows which data types of the result set can be assigned to which ABAP data types.
| Data type of the columns in the result set |
ABAP data type |
| CHAR, CLNT,CUKY, LANG, SSTRING, STRING, UNIT, VARC |
c, string |
| ACCP, NUMC |
c, n |
| LCHR |
c |
| RAW, RAWSTRING |
x, xstring |
| LRAW |
x |
| CURR, DEC, INT1, INT2, INT4, PREC, QUAN |
i, p, f |
| FLTP |
f |
| DATS |
d |
| TIMS |
t |
Rules
The following rules apply to the assignment procedure:
- If the target field is of data type c or
x, the content of the result field is inserted into the target field, left-aligned. If the
target field is too short, the result is truncated to the right. If the target field is too long, spaces or hexadecimal 0 are filled to the right.
- If the target field is of data type string or
xstring, the content of the result field is inserted into the target field, left-aligned.
In result fields of the type STRING, trailing spaces are adopted. The target field has the same length as the result field.
- If the target field is of data type n, the content
of the result field is inserted into the target field, right-aligned. If necessary, it is filled with zeros to the left. If the target field is too short, the result is truncated to the left.
- If the target field is of the numerical data type i, p, or f, the
value area must be long enough for the value of the result field.
- If the result field contains a null value, a type-specific initial value is assigned to the target field.
Note
As of release 6.10, strings can be specified after INTO.