Copyright 2022 - BV TallVision IT

The JOIN addition on SELECT allows you to merge several data tables together into a single result or result table (mostly). As database servers are quite clever bits of machinery, using a join is not only nice coding, it can be very helpful in a good performance too.

A simple example:

SELECT hdr~vbeln itm~posnr 
itm~matnr   FROM vbuk AS hdr   INNER JOIN vbup AS itm   ON hdr~vbeln = itm~vbeln   INTO TABLE gt_results   WHERE hdr~vbeln in so_vbeln.