02-12-2007 9:25 AM
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
02-12-2007 4:08 PM
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
02-12-2007 7:03 PM
Hi Xin,
Christian is right, there is no difference in the execution of the two INNER JOIN queries.
Regards
Nishant
02-13-2007 1:10 AM
02-13-2007 5:13 PM
Hi Xin,
Please close the thread if answered.
Regards
Nishant
02-13-2007 8:42 AM