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: 

field symbol

Former Member
0 Kudos

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

JozsefSzikszai
Active Contributor
0 Kudos

right!

5 REPLIES 5

JozsefSzikszai
Active Contributor
0 Kudos

right!

matt
Active Contributor
0 Kudos

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

former_member212653
Active Contributor
0 Kudos

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.

0 Kudos

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.

0 Kudos

Absolutely right!