Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Data referencing and Dereferencing.

subbarao_ilam
Explorer
0 Likes
2,041

Hi,

Can any one tell me what is the data referencing and dereferencing. and what is the use of it.

Thanks.

Hi,

Can any one tell me what is the data referencing and dereferencing. and what is the use of it.

Thanks.

2 REPLIES 2
Read only

Former Member
0 Likes
1,153

DEREFERNCING

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 SYMBOLl <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

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. ...

DATA REFERENCE

The unary prefix operator, &, may be used to create a reference to an object, which is similar to a pointer in other languages. References are commonly used as a mechanism to pass a function as an argument to another function

Award points if found usefull.

Cheers,

Chandra Sekhar.