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 and corresponding

Former Member
0 Kudos

Select erdat

from databasetable

into corresponding fields of table itab

where......

Now if itab has two fields erdat and edatu which are both of same type (both erdat and edatu are of sy-datum type) , now which field of itab will be filled because of the above select statement. erdat or edatu?

Thanks.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

The corresponding means, that it will move the values from the same field names, not types. So if you specify ERDAT it will try to move the value into the ERDAT field.

To answer your question, ERDAT will be filled.

Regards,

Rich Heilman

7 REPLIES 7

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

The corresponding means, that it will move the values from the same field names, not types. So if you specify ERDAT it will try to move the value into the ERDAT field.

To answer your question, ERDAT will be filled.

Regards,

Rich Heilman

Former Member
0 Kudos

hi,

Select erdat

from databasetable

into corresponding fields of table itab

where......

<b>For this erdat field will get field up.</b>

Regards,

Manohar.

Former Member
0 Kudos

The one with the same name as in DB table will be filled

Former Member
0 Kudos

hi nuren,

as u have into corresponding fields of itab

it will fill erdat.

0 Kudos

hi Nuren,

Since you are selecting erdat field in your select statement it will fill <b>ERDAT</b> field only

LucianoBentiveg
Active Contributor
0 Kudos

You fill only field with same name in internal table. To fill the other you need to do something like this:

Select erdat AS edatu

from databasetable

into corresponding fields of table itab

where......

Former Member
0 Kudos

HI

GOOD

IT WILL FILLED YOUR INTERNAL TABLE WITH DATA FROM BOTH THE FIELDS, MOVE CORRESPONDING DOES NOT MAKES ANY DIFFERENCE IN YOUR CASE.

THANKS

MRUTYUN