ABAPASSIGN_TYPE - ASSIGN TYPE

Fill RESBD Structure from EBP Component Structure   Addresses (Business Address Services)  
This 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 notcompatible with that of the field symbol <fs>. The specified type type must thenbe compatible with the type of the field symbol. Since there is no conversion (unlike in a MOVEstatement), 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 minussign, 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.


Vendor Master (General Section)   PERFORM Short Reference  
This documentation is copyright by SAP AG.


Length: 2032 Date: 20120518 Time: 193208     triton ( 94 ms )