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: 

How to transfer few fields of one table to another table?

Former Member
0 Kudos

Hi all........

Can you please tell me how to transfer few fields of one table to another table along with the data? I need to copy some fields to another custom table?

Thankx in advance...

8 REPLIES 8

former_member156446
Active Contributor
0 Kudos

you can create a database view with those fields only....database view helps you to write select query on it as well....

Former Member
0 Kudos

Hi,

You need to create the report to update the custom table for the new fields added. Sap has not provided this functionality.

1. Read the data from source table into internal table .

2. update the target table from internal table depending on required condition.

kamesh_g
Contributor
0 Kudos

Hi

if you want to look into data different tables we can create view corresponding to 2 tables .

And if you dont mind ask the question with some clarity .. you need to copy the fileds or data into custom table .

If you want to traposrt data to other table you ned ti maintain the table (Custom) . USe SM30 tcode to maintain data into table .

If you are not clear with doubt please update the question wiyh some clarity!!

Thank you

Former Member
0 Kudos

get data from source table to internal table.

then pass data from inter table to target table

awin_prabhu
Active Contributor
0 Kudos

Hi friend,

Directly we cannot transport few fields from one table to another.

Use Read and Update statements.

ex: 1. READ TABLE itab INTO wa WITH KEY num = 40 TRANSPORTING name.

2. MODIFY itab1 FROM wa index 4. (For internal tables)

OR

UPDATE itab1 FROM wa. (For tables in Data Dictionary)

Former Member
0 Kudos

Hi Shakti,

If you want to select the particular fields on different tables, you need to create a view.With view it is possible to get the selected fields on different tables.

With views you can perform many 'selects statements' means you can nest the select statements based on the requirement and you can mention the fields you want.

Please go through the views concept.It will helpful to u.

Regards

Kiran

Former Member
0 Kudos

Hi Shakti,

For transfering the data from one table to another table u need to fetch the data to one internal table in your program & subsequently u need to insert the fields of that internal table to your desired database table using insert/update statements.

Hope This solves your issue!!

Thanks

Ravi Aswani

Former Member
0 Kudos

Hi,

Try this,

To move some fields from 1 table into other table ,

we have to first read the contents of the required fields into an internal table and with the help of that internal table again we have to update data to the required table