REPORT ZSM_INNERJOIN3.
TYPES: BEGIN OF str,
VBELN TYPE VBELN_VL, " Creation of a structure
VKORG TYPE VKORG,
LFART TYPE LFART,
POSNR TYPE POSNR_VL,
MATNR TYPE MATNR,
MATKL TYPE MATKL,
END OF str.
DATA: it TYPE STANDARD TABLE OF str, " Creation of internal table
wa TYPE str. " Creation of work area
select LIKP~VBELN
LIKP~VKORG " Operation for inner join
LIKP~LFART
LIPS~POSNR
LIPS~MATNR
LIPS~MATKL
FROM LIKP INNER JOIN LIPS
ON LIKP~VBELN = LIPS~VBELN INTO TABLE it UP TO 50 ROWS.
loop at it INTO wa.
WRITE:/ wa-VBELN, wa-VKORG, wa-LFART, wa-POSNR, wa-MATNR, wa-MATKL.
ENDLOOP. " Displaying the process
0 Comments