*&---------------------------------------------------------------------*
*& Include ZXM01U04
*&---------------------------------------------------------------------*
DATA : LT_EKPO TYPE TABLE OF EKPO WITH HEADER LINE.
IF SY-TCODE = 'ZPOEMAIL' OR SY-CPROG = 'Z_PO_EMAIL'.
SELECT *
FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE LT_EKPO
WHERE EBELN = CX_DOC-XEKKO-EBELN.
LOOP AT LT_EKPO WHERE LOEKZ <> 'L'.
EXIT.
ENDLOOP.
* All item was deleted
IF SY-SUBRC <> 0.
SY-SUBRC = 0.
EX_RETCO = 1.
ENDIF.
ENDIF.
*& Include ZXM01U04
*&---------------------------------------------------------------------*
DATA : LT_EKPO TYPE TABLE OF EKPO WITH HEADER LINE.
IF SY-TCODE = 'ZPOEMAIL' OR SY-CPROG = 'Z_PO_EMAIL'.
SELECT *
FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE LT_EKPO
WHERE EBELN = CX_DOC-XEKKO-EBELN.
LOOP AT LT_EKPO WHERE LOEKZ <> 'L'.
EXIT.
ENDLOOP.
* All item was deleted
IF SY-SUBRC <> 0.
SY-SUBRC = 0.
EX_RETCO = 1.
ENDIF.
ENDIF.

本文介绍了一个ABAP程序片段,该片段用于在SAP系统中根据特定条件从EKPO表中选择数据。当系统事务代码为'ZPOEMAIL'或检查程序为'Z_PO_EMAIL'时,此代码会从EKPO表中读取所有与给定销售订单相关的项目,并处理非'删除'状态的项目。
9003

被折叠的 条评论
为什么被折叠?



