‎2007 Dec 05 6:13 AM
Dear all,
I am facing a problem wherein i want to modify <FS_DYN_TABLE> from <FS_DYN_TABLE_TEMP>.It is getting modified,i.e the column for which i want it modified is getting modified but remaining values of that corresponding row are not being displayed.
my declaration for above two are as follows:-
FIELD-SYMBOLS: <FS_DYN_TABLE> TYPE STANDARD TABLE,"Dynamic table
<FS_DYN_TABLE_TEMP> TYPE ANY ,.Temporary Dynamic table
My syntax was
MODIFY <FS_DYN_TABLE> FROM <FS_DYN_TABLE_TEMP> INDEX W_INDEX TRANSPORTING PERCN.
If i give
MODIFY <FS_DYN_TABLE> FROM <FS_DYN_TABLE_TEMP> TRANSPORTING PERCN ,it gives an error saying :-
"The specified type has no structure and therefore no component called
"PERCN". component called "PERCN".
How to resolve this problem?
‎2007 Dec 05 9:03 AM
It's not entirely clear to me what your problem is. <FS_DYN_TABLE_TEMP> is not a table. It is a work area/structure with the same structure as a record in <FS_DYN_TABLE>?
I guess somehow you've set the PERCN field in <FS_DYN_TABLE_TEMP>.
Try:
READ TABLE <fs_dyn_table> INTO <fs_dyn_table_temp> INDEX w_index.
...then set the PERCN field of <fs_dyn_table_temp>.
MODIFY <fs_dyn_table> FROM <fs_dyn_table_temp> INDEX w_index.matt
‎2007 Dec 05 9:03 AM
It's not entirely clear to me what your problem is. <FS_DYN_TABLE_TEMP> is not a table. It is a work area/structure with the same structure as a record in <FS_DYN_TABLE>?
I guess somehow you've set the PERCN field in <FS_DYN_TABLE_TEMP>.
Try:
READ TABLE <fs_dyn_table> INTO <fs_dyn_table_temp> INDEX w_index.
...then set the PERCN field of <fs_dyn_table_temp>.
MODIFY <fs_dyn_table> FROM <fs_dyn_table_temp> INDEX w_index.matt
‎2007 Dec 05 9:49 AM
Dear Matt,
Thanks a lot.u have got my point exactly.
the only problem here is how do i set the PERCN field of <fs_dyn_table_temp>.
What is the syntax?
<fs_dyn_table_temp>-percn wil throw me an error.
what to do regarding this?
‎2007 Dec 05 10:01 AM
Dear Matt,
Thhannks a tooon.
My issue has been resolved.
Actually before modifying i had not read the previous values into TEMP.
So they were getting wiped off..
Now its all in Place.Purfect!!
Full points rewarded to u!!
‎2007 Dec 05 10:14 AM
Thanks, Rahul.
One point. You asked "the only problem here is how do i set the PERCN field of <fs_dyn_table_temp>."
The answer is, for future reference,
FIELD-SYMBOLS: <l_percn> TYPE ANY. " Or you can specify the type
ASSIGN COMPONENT 'PERCN' OF STRUCTURE <fs_dyn_table_temp> TO <l_percn>.Then any changes you make to <l_percn> will also be in <fs_dyn_table_temp>.
Regards
matt
‎2007 Dec 05 10:30 AM