Example of joining tables

New Site Address: http://abap.mirrorz.com

Make your own free website on Tripod.com



Home

Definitions
OK Code Values
Other Useful Tips
SAP and ABAP Links
SAP Functions
SAP Reports
SAP Tables
Source Code
Transaction Codes

Site Map (Index)

ABAP Keyword Help


Example of joining tables

This example works from SAP version 3.1H on up.


Example:
 select lips~vbeln lips~lfimg likp~wadat
        into corresponding fields of table ltab_orders
        from lips join likp on ( lips~vbeln = likp~vbeln )
        join vbfa on ( lips~vbeln = vbfa~vbelv )        
        where lips~matnr = matnr
        and   lips~vbeln in vbeln
        and   likp~vbeln in vbeln          
        and   vbfa~vbelv in vbeln
        and   lips~werks in werks
        and   likp~wadat in datum
        and   vbfa~vbtyp_n = 'Q'             "WMS transfer order
        and   vbfa~vbtyp_v = 'J'.            "Delivery        

New Site Address: http://abap.mirrorz.com


Send any hints or tips to ABAP Hints & Tips .
All submissions will be recognized along with the tip.

Get a cool web address
Free subdomains from
ShortURL.com