Skip to content

ABAP Keyword Documentation →  ABAP − Short Reference 

ASSIGN - Short Reference

Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


ASSIGN { dobj[+off][(len)] 
       | [TABLE FIELD] (name)
       | dref->*
       | { dobj INCREMENT inc }
       | {COMPONENT comp OF STRUCTURE struc}
       | oref->(attr_name)
       | {class|(class_name)}=>{attr|(attr_name)}
       | writable_exp }
  TO <fs>
  [ { CASTING [ {TYPE type|(name)}
              | {LIKE dobj}
              | {[TYPE p] DECIMALS dec}
              | {TYPE HANDLE handle} ] }
  | { {TYPE name}
    | {[TYPE name] DECIMALS dec} } ]
  [RANGE range].

Effect

Assigns a memory area to a field symbol <fs>.

Additions

Specifying the memory area

Specifying the data type

Restriction of the memory area

  • RANGE range
    Restricts the assignable memory area to the data object range.