UNPACK

UNPACK Syntax Diagram

Effect

Unpacks the packed field f and places it in the field g with leading zeros. If g is too short, it is truncated on the left.

Example

DATA: P_FIELD(2) TYPE P VALUE 103, 
	C_FIELD(4) TYPE C. 
UNPACK P_FIELD TO C_FIELD.

P_FIELD: P'103C' --> C_FIELD: C'0103'

If f is not type P, it is converted to type P (see MOVE).