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

field symbol problem

rahul2000
Contributor
0 Likes
824

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?

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
801

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

5 REPLIES 5
Read only

matt
Active Contributor
0 Likes
802

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

Read only

0 Likes
801

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?

Read only

0 Likes
801

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!!

Read only

matt
Active Contributor
0 Likes
801

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

Read only

0 Likes
801

Dear Matt,

Thanks a ton again nd keep posting

Cheers,

Rahul