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

field symbol

Former Member
0 Likes
950

hi

just wanted to confirm

if we use field symbol in a loop

loop at gi_result assigning <fs_result>.

we dont need to use the command modify to change a field in the internal table, right?

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
927

right!

5 REPLIES 5
Read only

JozsefSzikszai
Active Contributor
0 Likes
928

right!

Read only

matt
Active Contributor
0 Likes
927

Of course right. When you are using field-symbols you are accessing the memory directly. So within a LOOP AT ... ASSIGNING, you're handling the row in the table directly.

matt

Read only

Former Member
0 Likes
927

Yes...we don't have to use modify statement as the after field symbol assignment the field-symbol will point to the memory location of the current internal table index.

Read only

0 Likes
927

Just to be more precise: a field symbol is not a pointer, and you are writing directly into the storage location. So modify is obsolete and in addition the loop will be much more performant because no memory-to-memory copy is necessary.

Read only

0 Likes
927

Absolutely right!