2010 Jan 27 2:28 PM
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
2010 Jan 27 2:45 PM
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
2010 Jan 27 3:01 PM
i want to stop the changes data into internal table thru workarea.
2010 Jan 27 3:05 PM
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
2010 Jan 27 6:10 PM
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
2010 Jan 27 3:07 PM
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.
2010 Jan 27 6:50 PM
Dont assign the row to a field symbol
READ TABLE <fs_dyn_table> INTO wa index fp_row_no-row_id.