Skip to Content

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

how to use inner joins for 4 0r 5 tables

Hai Experts,

plz check my code, n plz help to inner join all the tables

TYPES : BEGIN OF ITAB,

EBELN TYPE EKKO-EBELN, "P.O.NUMBER

AEDAT TYPE EKKO-AEDAT, "DATE

BPRME TYPE EKPO-BPRME, "UNIT PRICE

MENGE TYPE EKPO-MENGE, "Purchase order quantity

WERKS TYPE EKPO-WERKS, "PLANT

BRTWR TYPE EKPO-BRTWR, "Gross order value in PO

STRAS TYPE LFA1-STRAS, "House number and street

LIFNR TYPE LFA1-LIFNR, "VENDOR NO

NAME1 TYPE LFA1-NAME1, "V NAME

ORT01 TYPE LFA1-ORT01, "CITY

LAND1 TYPE LFA1-LAND1, "LAND

PSTLZ TYPE LFA1-PSTLZ, "POSTAL CODE

MAKTX TYPE MAKT-MAKTX, "DESCRIPTION

END OF ITAB.

<b>and i got stucked here:</b>

<u></u>

SELECT EKKO~EBELN

EKKO~AEDAT

EKPO~BPRME

EKPO~MENGE

EKPO~WERKS

EKPO~BRTWR

LFA1~LIFNR

LFA1~STRAS

LFA1~NAME1

LFA1~ORT01

LFA1~LAND1

LFA1~PSTLZ

MAKT~MAKTX

INTO TABLE ITAB

FROM EKKO

INNER JOIN EKPO LFA1 T001W MAKT

ON EKKOEBELN = EKPOEBELN

EKKO~EBELN

WHERE EKKO~EBELN IN S_EBELN.

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