Application Development 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: 

Difference Between Assigning and Reference to keywords

Former Member
0 Kudos

Hi all,

Can Anyione tell me that what is the difference between looping at internal table using the Assigning <Fs> keyword and Reference to keyword.Thanks in Advance

Rajiv

5 REPLIES 5

Former Member
0 Kudos

hello Rajiv ,

if you idea about about the C Programming ..then it's simple ..

you can understand Reffrence (Data Reffrence) as pointer .

and assigning is like value at (*) operator in C .

Thanks and Regards ..

Priyank

0 Kudos

Hi,

Thanks for all ur replies.

can u put a light a on performance statistics b/w the two.

Which is more efficient.

Are there any scenarios when shold be used others should not be.

Which one would u prefer on Looping at Internal Table..?

Which one would u prefer on looping at Nested internal tables..?

Thnaks In Advance..

Rajiv Kanoria

Former Member
0 Kudos

Former Member
0 Kudos

Assigning :

-


try ASSIGN COMPONENT sy-index OF STRUCTURE <fs_recordt> (this need not be a field symbol can be a work area/ internal table) TO <fs_field>.

if u want to assign field symbol on field by field basis use this statement inside do endo.

else use loop at internal_table assigning <FS>. u dont hav 2 unassign the field symbol, the loop statement internally takes care of dat.

refernce :

-


Refernce is used refer the variables for inport and export parameters.

Former Member
0 Kudos

Hi,

Thanks for all ur replies.

can Anyone put a light a on performance statistics b/w the two.

Which is more efficient.

Are there any scenarios when shold be used others should not be.

Which one would u prefer on Looping at Internal Table..?

Which one would u prefer on looping at Nested internal tables..?

Thnaks In Advance..

Rajiv Kanoria