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

How to avoid using modify in loop using Field symbols

Former Member
0 Likes
894

Is this correct way of using <FS> in loop to avoid modify.

data : <fs> type vbak.

Loop at ITAB assigning <FS>

<FS>-field = 'U'.

ENDLOOP.

or i Should be using Modify itab statement before ENDLOOP.

<<Urgency Removed>>

Moderator Message: Basic question. Read sap help

Message was edited by: Kesavadas Thekkillath

2 REPLIES 2
Read only

paul_bakker2
Active Contributor
0 Likes
522

That's right, no MODIFY is required if you use fieldsymbols.

Why so URGENT? You can just try it yourself to find the answer.

cheers

Paul

Read only

Former Member
0 Likes
522

Hi Kishan,

That is Correct way of doing.

We dont modify the field symbol like we do in internal tables, because field symbol behave like pointers which changes the original value if you change the field symbol.

For more details do F1 on Field symbols.

Regards,

Amit