Skip to Content
0
Former Member
Jul 17, 2008 at 01:57 PM

Check Inner join

37 Views

Can you please check below select statement because there are double records reasoning somethings . Shall I need to change order of joins ?

SELECT maramatnr maraprdha marcmaabc marameins

maktmaktx marctrame mard~labst

mbewstprs mbewpeinh

INTO CORRESPONDING FIELDS OF gt_mara_itab

FROM mara

INNER JOIN makt

ON maktmatnr = maramatnr

AND makt~spras = sy-langu

INNER JOIN marc

ON marcmatnr = maramatnr

INNER JOIN mard

ON mardmatnr = maramatnr

AND mardwerks = marcwerks

LEFT OUTER JOIN mbew

ON mbewmatnr = marcmatnr

AND mbewbwkey = marcwerks.

WHERE mara~matnr IN smal_tab

AND mara~mtart IN s_mtart

AND mara~matkl IN s_matkl

AND marc~werks IN s_pplant

AND mard~lgort NOT IN gr_lgort

AND mara~lvorm = space

AND marc~lvorm = space

AND mard~lvorm = space.