Application Development 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: 

Modify Database Table From Dynamic Internal Table.

Former Member
0 Kudos

Hi Experts,

Created a report which calls a RFC and gets data from Quality Server into Development server. Also creates dynamic internal table.

The RFC fetches data from Q server and comes to Dev Server, now I need to Modify database table in Dev Server with the data from Q Server.

Please Help.

This is the code which I use for Modify

*Declarations

FIELD-SYMBOLS: <outtab> TYPE ANY TABLE,

<l_line> TYPE ANY,

<l_field> TYPE ANY.

DATA: new_table TYPE REF TO data.

DATA: new_line TYPE REF TO data.

PARAMETERS: tab TYPE dd02l-tabname OBLIGATORY ,

****

loop at <outtab> into <l_line>.

modify (tab) from <l_line>.

endloop.

It gives a Error

"The types of the operands "dbtab" and "wa" are not mutually convertible."

Please Help.

Regards,

Raghu

3 REPLIES 3

Former Member
0 Kudos

Hi,

I dont think you can just modify by using modify (tab) from <l_line>.

I think you have to ASSIGN COMPONENT to the <l_field> and pass those values to the wa of the table you are trying to modify and finally modify the table.

I am not sure though...can give it a try.

Sri

former_member195698
Active Contributor
0 Kudos

If you have all your data in the table <outtab> you can directly modify the database table using the statement

modify (tab) from table <outtab>

Have you done the proper assignment of the field symbols to the required types?

Regards,

Abhishek

0 Kudos

I have all data in the table <outtab>

i tried Modify (tab) from table <outtab>

but it gives me dump with error

"Alignment of lines in an internal table is not sufficient."

Please Help

Regards,

Raghu