SAP ASSIGN EXCEPTIONS ABAP Statements

Get Example source ABAP code based on a different SAP table
  


ABAP Code Snippet



Runtime Exceptions

Catchable Exceptions
CX_SY_ASSIGN_CAST_ILLEGAL_CAST
Reason for error:
The type of the source field and the target type do not match exactly in offset and type in those components that are strings, tables, or references.
Runtime error:
ASSIGN_CASTING_ILLEGAL_CAST

CX_SY_ASSIGN_CAST_UNKNOWN_TYPE
Reason for error:
A type specified dynamically after CASTING is unknown.
Runtime error:
ASSIGN_CASTING_UNKNOWN_TYPE

CX_SY_ASSIGN_OUT_OF_RANGE
Reason for error:
The data object in addition RANGE does not contain the assigned data object.
Runtime error:
ASSIGN_FIELD_NOT_IN_RANGE


Non-catchable Exceptions
Reason for error:
The field symbol is structured and the assigned field is shorter than the structure.
Runtime error:
ASSIGN_BASE_TOO_SHORT
Reason for error:
The alignment for field f is too short for the type of the field symbol.
Runtime error:
ASSIGN_BASE_WRONG_ALIGNMENT
Reason for error:
You can specify only simple types for TYPE.
Runtime error:
ASSIGN_CAST_COMPLEX_TYPE
Reason for error:
The source field is longer than 16 bytes and cannot be interpreted as a type p field.
Runtime error:
ASSIGN_CAST_P_TOO_LARGE
Reason for error:
The alignment of field f is too short for the type specified in TYPE.
Runtime error:
ASSIGN_CAST_WRONG_ALIGNMENT
Reason for error:
The length of field f does not match the type specified in TYPE.
Runtime error:
ASSIGN_CAST_WRONG_LENGTH
Reason for error:
The type specified in TYPE is unknown.
Runtime error:
ASSIGN_CAST_WRONG_TYPE
Reason for error:
A maximum of 14 columns is permitted.
Runtime error:
ASSIGN_DECIMALS_TOO_HIGH
Reason for error:
Decimal places are allowed only for type p.
Runtime error:
ASSIGN_DECIMALS_WRONG_TYPE
Reason for error:
A length of 0 was specified for field f.
Runtime error:
ASSIGN_LENGTH_0
Reason for error:
A length less than 0 was specified for field f.
Runtime error:
ASSIGN_LENGTH_NEGATIVE
Reason for error:
An offset less than 0 was specified for field f.
Runtime error:
ASSIGN_OFFSET_NEGATIVE
Reason for error:
An offset or length was specified for field f and the data type of the assigning field does not allow partial access. (This is the case for data types I, F, and P.)
Runtime error:
ASSIGN_OFFSET_NOTALLOWED
Reason for error:
The offset specified for field f exceeds the range of the ABAP variable.
Runtime error:
ASSIGN_OFFSET_TOOLARGE
Reason for error:
In the area addressed in the offset and length specifications for field f, deep components exist (data references, object references, strings, internal tables), which may not be overwritten.
Runtime error:
ASSIGN_OFF+LENGTH_ILLEGAL_CAST
Reason for error:
Offset and length specified for field f exceed the range of the ABAP variable.
Runtime error:
ASSIGN_OFFSET+LENGTH_TOOLARGE
Reason for error:
Field f is not a data reference. However, a data reference was expected.
Runtime error:
ASSIGN_REFERENCE_EXPECTED
Reason for error:
The type of the source field and the target type do not match exactly in offset and type in those components that are strings, tables, or references.
Runtime error:
ASSIGN_STRUCTURE_ILLEGAL_CAST
Reason for error:
You cannot assign substrings to a field symbol.
Runtime error:
ASSIGN_SUBSTRING_NOT_ALLOWED
Reason for error:
The field symbol is typed and the type of the assigned field is incompatible with it.
Runtime error:
ASSIGN_TYPE_CONFLICT
Reason for error:
The type of the source field contains strings, tables, or references.
Runtime error:
ASSIGN_TYPE_ILLEGAL_CAST
Reason for error:
The type of the source field is a structure and, on Unicode, is not compatible with the target type.
Runtime error:
ASSIGN_UC_STRUCT_CONFLICT

Return to menu