Ansicht
Dokumentation
ABAPASSIGN_TYPE - ASSIGN TYPE
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up General Data in Customer MasterThis documentation is copyright by SAP AG.
ASSIGN
Addition 2
... TYPE type
See No Obsolete Casting Allowed With ASSIGN.
Effect
With an untyped field symbol, this addition allows you to change the current type of the field symbol to type. The displayed length of the field symbol is adjusted to that of the new type.
With typed field symbols, you should only use this addition if the type of the field f is not
compatible with that of the field symbol <fs>. The specified type type must then
be compatible with the type of the field symbol. Since there is no conversion (unlike in a MOVE
statement), the system must be able to interpret the contents of f with the type type.
You specify the type as a literal or a field. You can currently only specify a system type
(C, D, T, P, X, N, F, I or W), as well as type 's' for a 2-byte integer with plus or minus
sign, and 'b' for a single-byte integer without plus or minus sign (see also DESCRIBE FIELD).
Note
This type of statement causes a runtime error if the system cannot recognize the specified type or it is incompatible with the field you want to assign (wrong alignment or length). Länge).
Example
DATA LETTER TYPE C.
FIELD-SYMBOLS <F> TYPE ANY.
ASSIGN LETTER TO <F>.
The field symbol has the type C and output length 1.
ASSIGN LETTER TO <F> TYPE 'X'.
The field symbol has the type X and output length 2.
CPI1466 during Backup RFUMSV00 - Advance Return for Tax on Sales/Purchases
This documentation is copyright by SAP AG.
Length: 2066 Date: 20240425 Time: 190333 sap01-206 ( 44 ms )