SQL in SAP ABAP (Example)

Aus MattWiki

Examples of ABAP SQL Statements for SAP BW tables and fields containing inner join.

This example shows proper usage of single quotes, double qoutes and case sensitive in the SAP GUI on the Netweaver platform 7.50+

SELECT *
  FROM "/BIC/AZDOMABC00" AS A
  INNER JOIN "/BIC/ADOMXYZ" AS X
ON
  (A."/BIC/ZDOMLOGSY" = B."/BIC/ZDOMLOGSY") AND
  (A."/BIC/ZDOMKOKRS" = B."/BIC/ZDOMKOKRS") AND
  (A."/BIC/ZDOMVKORG" = B."/BIC/ZDOMVKORG")
  
WHERE (B."/BIC/ZDOMSTDK" < '01.01.2020') AND (B."/BIC/ZDOMBSTDK" != '00000000')