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: 

Question regarding: select * into corresponding fields

Former Member
0 Kudos
278

Hi,

My question is about this select statement "select * from A into CORRESPONDING FIELDS of Table B". When ABAP executes this statement, would abap select all fields from table A and assign value to table B or would it select only some fields in table A which is existed in table B ?

Thanks,

Pavin

1 ACCEPTED SOLUTION

former_member156446
Active Contributor
0 Kudos
113

select all fields from table A and assign corresponding value to table B

2 REPLIES 2

former_member156446
Active Contributor
0 Kudos
114

select all fields from table A and assign corresponding value to table B

former_member305388
Active Contributor
0 Kudos
113

Hi,

In this whether A and B have same fields, i mean... both are of same structure..?

If yes, select query will select all the fields and assign to the table B with the same field name..

If no, means, if A and B are of different structures, then you should not use INTO CORRESPONDING.. though u use it, it will fetch nothing... For this kind of examples you must give the exact field names..like:

SELECT fld1 fld2

FROM tab_a

INTO CORRESPONDIONG FIELDS OF TABLE tab_b.

Hope this explains..