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: 

What's difference between the follwing INNER JOIN syntax

Former Member
0 Kudos

Case1>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SELECT C~WERKS " Plant

C~MATNR " Material

C~EKGRP " Purchasing group

C~DISPR " MRP Profile

A~BRGEW " Gross weight

C~DISMM " MRP type

C~DISLS " Lot size

D~BERID " MRP area

D~DISMM " MRP area MRP type

D~DISLS " MRP area Lot size

D~SOBSL " MRP area special procurement

W~STPRS " Standard price

INTO TABLE TAB_DATA

FROM ( ( ( MARC AS C

INNER JOIN MARA AS A ON CMATNR = AMATNR )

INNER JOIN MBEW AS W ON CMATNR = WMATNR )

INNER JOIN MDMA AS D ON CMATNR = DMATNR )

WHERE C~WERKS = P_WERKS " Plant

AND C~MATNR IN S_MATNR " Material

AND C~DISPR IN S_DISPR " MRP profile

AND C~EKGRP IN S_EKGRP. " Purchasing group

Case2>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

SELECT C~WERKS " Plant

C~MATNR " Material

C~EKGRP " Purchasing group

C~DISPR " MRP Profile

A~BRGEW " Gross weight

C~DISMM " MRP type

C~DISLS " Lot size

D~BERID " MRP area

D~DISMM " MRP area MRP type

D~DISLS " MRP area Lot size

D~SOBSL " MRP area special procurement

W~STPRS " Standard price

INTO TABLE TAB_DATA

FROM MARC AS C

INNER JOIN MARA AS A ON CMATNR = AMATNR

INNER JOIN MBEW AS W ON CMATNR = WMATNR

INNER JOIN MDMA AS D ON CMATNR = DMATNR

WHERE C~WERKS = P_WERKS " Plant

AND C~MATNR IN S_MATNR " Material

AND C~DISPR IN S_DISPR " MRP profile

AND C~EKGRP IN S_EKGRP. " Purchasing group

5 REPLIES 5

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

My guess: nothing at all. The execution by the database will anyway be independent of your way of describing the statement, e.g. you can't force the use of an index (in open SQL).

So the brackets are only for the reader of the source code.

Regards,

Christian

Former Member
0 Kudos

Hi Xin,

Christian is right, there is no difference in the execution of the two INNER JOIN queries.

Regards

Nishant

Former Member
0 Kudos

Thanks very much.

0 Kudos

Hi Xin,

Please close the thread if answered.

Regards

Nishant

Former Member
0 Kudos

hi Xin,

Message was edited by:

Naresh Reddy