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

Accessing data references: Differences in dereferencing

Former Member
0 Likes
438

Hi Community,

could someone tell me what is the difference when accessing values in a data reference (e.g. specific fields in a structure).

A) m_dlv_data->docid = '1234'.

B) m_dlv_data->*-docid = '1234'.

Thanks in advance

Michael

1 ACCEPTED SOLUTION
Read only

former_member188458
Active Participant
0 Likes
416

Hi Michael ,

It is the same thing .

However , the second statement is mostly used when we dont have the type defined at design time .

e.g.

data : lo_data type ref to data .

field-symbols : <ls_data> type any .

create lo_data type ('MARA').

Assign lo_data->* to <ls_any> . ""De-referencing the lo_Data

Hope this helps.

Regards,

Rini

1 REPLY 1
Read only

former_member188458
Active Participant
0 Likes
417

Hi Michael ,

It is the same thing .

However , the second statement is mostly used when we dont have the type defined at design time .

e.g.

data : lo_data type ref to data .

field-symbols : <ls_data> type any .

create lo_data type ('MARA').

Assign lo_data->* to <ls_any> . ""De-referencing the lo_Data

Hope this helps.

Regards,

Rini