參考文件:
plko AS ko
INNER JOIN plas AS ps
ON ko~plnty = ps~plnty AND ko~plnnr = ps~plnnr
AND ko~plnal = ps~plnal
INNER JOIN plas AS ps
ON ko~plnty = ps~plnty AND ko~plnnr = ps~plnnr
AND ko~plnal = ps~plnal
要注意 PLPO-ZAEHL 不要跟 PLAS-ZAEHL串在一起
還有需要加上下列條件,應該就可以找出正確的途程資料
plko-LOEKZ <> 'X' .
plpo-LOEKZ <> 'X' .
plas-LOEKZ <> 'X' .
mapl-LOEKZ <> 'X' .
plko-DATUV <= sy-datlo and plko-valid_to >= sy-datlo .
plpo-DATUV <= sy-datlo and plpo-valid_to >= sy-datlo .
plas-DATUV <= sy-datlo and plas-valid_to >= sy-datlo .
沒有留言:
張貼留言