Start of Content Area

Dereferencing Data References  Locate the document in its SAP Library structure

To access the contents of the data object to which a data reference is pointing, you must dereference it.

ASSIGN dref->* TO <fs> [CASTING ...].

This statement assigns the data object to the field symbol <fs> which the data reference in the reference variable <dref> points to. If the assignment is successful, sy-subrc is set to zero.

If the field symbol is fully generic, it adopts the data type of the data object. If the field symbol is partially or fully typed, the system checks the data types for compatibility. Casting is also possible for the assigned data object.

If the data reference in <dref> is initial or invalid, you cannot dereference it. The field symbol remains unchanged, and sy-subrc is set to 4. 

If you create a data object dynamically, the only way to access its contents is to use dereferencing.

 

 

End of Content Area