Application Development and Automation 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: 
Read only

SQL : Select clause

Former Member
0 Likes
524

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
Read only

Former Member
0 Likes
501

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
Read only

Former Member
0 Likes
502

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.

Read only

Former Member
0 Likes
501

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.