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: 

SQL : Select clause

Former Member
0 Kudos

Hi all..

In open sql, is it impossible..?

Select a~*

into table gt_mara

from mara as a inner join marc as b

~~~

For performance, I want to fetch the fields of table mara. But, while compiling, occur error..

How to do..? What to do..? tell me plz..

Thank you!!

regards..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Use this :

data : gt_mara like mara OCCURS 0.
Select *
into corresponding fields of table gt_mara
from mara as a inner join marc as b
ON a~matnr = b~matnr.

Ps: Reward points if helpful.

2 REPLIES 2

Former Member
0 Kudos

Use this :

data : gt_mara like mara OCCURS 0.
Select *
into corresponding fields of table gt_mara
from mara as a inner join marc as b
ON a~matnr = b~matnr.

Ps: Reward points if helpful.

Former Member
0 Kudos

Hi Kil,

Just an addition to the prev post..

Avoid the "into corresponding fields" for performance reasons... as long as the fields in the internal table are in the same order, use the below clause..

Select *

into table gt_mara

from mara as a inner join marc as b

ON amatnr = bmatnr.

Rgds,

Prash.