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

innerjoin

Former Member
0 Likes
1,487

hi,

SELECT amatnr aersda aaenam cwerks cpstat dlfmon

INTO CORRESPONDING FILEDS OF TABLE itab

FROM ( ( mara AS a

INNERJOIN marc AS c ON amatnr = cmatnr )

INNERJOIN mard AS d ON cmatnr = dmatnr )

WHERE matnr IN mat_no.

is there a mistake in the above stmt. it is giving me a syntac error as field corresponding is unknown.

plz help

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,455

Hi,

What??I tried this and it generated the code..

SELECT amatnr aersda aaenam cwerks cpstat dlfmon

INTO CORRESPONDING FIELDS OF TABLE itab

FROM mara AS a

INNER JOIN marc AS c ON amatnr = cmatnr

INNER JOIN mard AS d ON cmatnr = dmatnr

WHERE a~matnr IN mat_no.

Thanks,

Naren

13 REPLIES 13
Read only

Former Member
0 Likes
1,455

where a~matnr in mat_no.

Read only

Former Member
0 Likes
1,455

hi alchemi,

try to go thro this code.

u have to use a~matnr in mat_no.

SELECT amatnr aersda aaenam cwerks cpstat dlfmon

INTO CORRESPONDING FILEDS OF TABLE itab

FROM ( ( mara AS a

INNER JOIN marc AS c ON amatnr = cmatnr )

INNER JOIN mard AS d ON cmatnr = dmatnr )

WHERE <b>a~matnr IN mat_no</b>.

u have to declare the internal table with the field names which u are using in the inner join.

Regards...

Arun.

Reward points if useful.

Read only

Former Member
0 Likes
1,455

Hi,

Spelling mistake in FIELDS.

GIve

INTO corresponding fields of table itab

Instead of

INTO CORRESPONDING <b>FILEDS</b> OF TABLE itab

Thanks,

Naren

Read only

0 Likes
1,455

have corrected the spelling mistake.

now it gives has no closing ")"

Read only

0 Likes
1,455

try this code

SELECT amatnr aersda aaenam cwerks cpstat dlfmon

INTO CORRESPONDING FIElDS OF TABLE itab

FROM mara AS a

INNER JOIN marc AS c ON amatnr = cmatnr

INNER JOIN mard AS d ON cmatnr = dmatnr

WHERE a~matnr in mat_no.

Read only

0 Likes
1,455

i tried all those suggested above. It is still giving me same error...

has no closing")".

Read only

Former Member
0 Likes
1,455

Hi,

Check the modified SQL..Changes marked in bold..

SELECT amatnr aersda aaenam cwerks cpstat dlfmon

INTO CORRESPONDING <b>FIELDS</b> OF TABLE itab

FROM ( ( mara AS a

INNERJOIN marc AS c ON amatnr = cmatnr )

INNERJOIN mard AS d ON cmatnr = dmatnr ) <b>)</b> "Give another )

WHERE <b>a~</b>matnr IN mat_no.

Thanks,

Naren

Read only

Former Member
0 Likes
1,455

Hi

Give it in one more braces

SELECT amatnr aersda aaenam cwerks cpstat dlfmon

INTO CORRESPONDING FILEDS OF TABLE itab

FROM( ( ( mara AS a

INNERJOIN marc AS c ON amatnr = cmatnr )

INNERJOIN mard AS d ON cmatnr = dmatnr ))

WHERE a~matnr IN mat_no.

Regards,

Laxmi

Read only

Former Member
0 Likes
1,455

Hi,

Try this..

SELECT amatnr aersda aaenam cwerks cpstat dlfmon

INTO CORRESPONDING FIELDS OF TABLE itab

FROM mara AS a

INNER JOIN marc AS c ON amatnr = cmatnr

INNER JOIN mard AS d ON cmatnr = dmatnr

WHERE a~matnr IN mat_no.

Thanks,

Naren

Read only

0 Likes
1,455

no good.

It says wrong expression....from clause.

am i the only one getting this...or it happens always with innerjoins?

Read only

Former Member
0 Likes
1,456

Hi,

What??I tried this and it generated the code..

SELECT amatnr aersda aaenam cwerks cpstat dlfmon

INTO CORRESPONDING FIELDS OF TABLE itab

FROM mara AS a

INNER JOIN marc AS c ON amatnr = cmatnr

INNER JOIN mard AS d ON cmatnr = dmatnr

WHERE a~matnr IN mat_no.

Thanks,

Naren

Read only

ferry_lianto
Active Contributor
0 Likes
1,455

Hi,

Please try this.


SELECT A~MATNR A~ERSDA A~AENAM C~WERKS C~PSTAT D~LFMON
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM ( ( MARA AS A
INNER JOIN MARC AS C ON A~MATNR = C~MATNR
INNER JOIN MARD AS D ON C~MATNR = D~MATNR ) )
WHERE A~MATNR IN MAT_NO.

Regards,

Ferry Lianto

Read only

0 Likes
1,455

thanks guys.