Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Select Query with Inner Join

Dear Experts,

I have writen a inner join code with MKPF and MSEG which taking too much time, while I have used index.

Indexes are:

MSEG

MATNR

WERKS

LGORT

BWART

SOBKZ

MKPF

BUDAT

MBLNR

My Select Query is :

SELECT B~MATNR

B~MAT_KDAUF

B~MAT_KDPOS

B~BWART

B~MENGE

B~MEINS

B~AUFNR

INTO TABLE IT_MSEG

FROM MKPF AS A

INNER JOIN MSEG AS B

ON AMBLNR EQ BMBLNR

AND AMJAHR EQ BMJAHR

WHERE A~BUDAT IN BUDAT

AND B~MATNR IN MATNR

AND B~WERKS IN WERKS

AND B~LGORT IN LGORT

AND B~BWART IN BWART.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question