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

problem with field symbol

Former Member
0 Likes
972

Hi All,

I have problem with field symbol, i am getting one problem please give me suggestion.

when i read any field symbol into work area like:

READ TABLE <fs_dyn_table> INTO <fs_dyn_wa> index fp_row_no-row_id.

then it reflect the internal table <fs_dyn_table> data also with <fs_dyn_wa> data. and if clear work area <fs_dyn_wa> then it also clear from internal table.

How i can stop that.

Thanks,

jaten

Hi All,

I have problem with field symbol, i am getting one problem please give me suggestion.

when i read any field symbol into work area like:

READ TABLE <fs_dyn_table> INTO <fs_dyn_wa> index fp_row_no-row_id.

then it reflect the internal table <fs_dyn_table> data also with <fs_dyn_wa> data. and if clear work area <fs_dyn_wa> then it also clear from internal table.

How i can stop that.

Thanks,

jaten

6 REPLIES 6
Read only

Former Member
0 Likes
941

Hi

What do u need to stop?

The field-symbol is a pointer only, not a new variable, so if you don't need to clear it....don't clear it

U can unassign or assign <fs_dyn_wa> again if you want to modify it without to modify the table data

Max

Read only

0 Likes
941

i want to stop the changes data into internal table thru workarea.

Read only

0 Likes
941

HI

Just as I wrote in my previous answer: u can't do it, this is the main characteristic of field-symbol.

But it doesn't make sense change the Workarea and not the table, if you need it, i.e change the workarea, it means u need to change the table too.

So don't change the workarea or unassigne it after going out from the loop.

Max

Read only

0 Likes
941

Hi you have two options.

1. do not declare the work area as a field sysbol, declare it as a normal data type.

READ <FS> INTO WA INDEX IDX.

2. Do not clear the work are field sysbol. Unassign it.

UNASSIGN <FS_WA>.

Regards

Prasenjit

Read only

Former Member
0 Likes
941

Check the type of the field synbols it should be of type table and work area of type any. Field symbols act like pointers in C, they refer to the same memery location for an given object, hence reflection occurs in all the field symbols pointing to the same memeory location.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
941

Dont assign the row to a field symbol

READ TABLE <fs_dyn_table> INTO wa index fp_row_no-row_id.