我可以选择更多的选择和选择。 4个表格(最后一个表格只是收集所有数据)
但现在认为,要选择所有领域的方法,只需要一份选择说明。 这里是巨大的选择:
SELECT vbak~vbeln vbak~audat
tvakt~bezei
vbap~posnr vbap~matnr vbap~kwmeng vbap~vrkme
lips~vbeln lips~posnr lips~werks lips~lfimg
vbfa~vbtyp_n
FROM vbak JOIN vbap ON vbak~vbeln = vbap~vbeln
JOIN tvakt ON vbak~auart = tvakt~auart
LEFT JOIN vbfa ON vbfa~vbelv = vbak~vbeln AND vbfa~posnv = vbap~posnr
JOIN lips ON vbfa~vbeln = lips~vbeln AND vbfa~posnn = lips~posnr
INTO TABLE gt_salord
WHERE tvakt~spras = EN AND
vbak~vbeln IN s_vbeln AND
vbak~audat IN s_audat.
The problem is this doesn t work. When i try to activate it throws this error: " Unable to compare with "VBAP~POSNR". A table can be joined with a maximum of one other table using LEFT OUTER JOIN " If i don t use LEFT JOIN and only JOIN it works but i don t get all what i want. I need to get all the SALES ORDERS even if they don t have a DELIVERY ORDER assigned. Is there a way to do that, or do i really have to split my select?