1.表降、升序后取出第一行:
SELECT MATNR INTO TABLE GS_TAB FROM MARA
UP TO 1 ROWS ORDER BY MATNR DESCENDING.
2.在LOOP 里面。
SELECT SINGLE CZZH CZDATE CZTIME FROM ZSP_LOG INTO (gt_outtab-CZZH5,gt_outtab-CZDATE5,gt_outtab-CZTIME5) WHERE VBELN = gt_outtab-vbeln AND STATU EQ ‘Z70’
AND CZDATE = ( SELECT MAX( CZDATE ) FROM ZSP_LOG WHERE VBELN = gt_outtab-vbeln AND STATU EQ ‘Z70’).
ABAP MAX
最新推荐文章于 2024-06-14 11:01:21 发布