SAP通过BAPI转L类PR时,如果物料本身带有BOM,因特定业行要求会使用其他的组件带到PR中,但是标准功能会受到BOM的影响,也会带到PR组件,这样在业务上达不到用户所需。可通过下面方法处理:
INCLUDE:LCSIOFM1
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZMM_PURREQ_WF_COMP. "active version
DATA:V_FIELD(27) TYPE C VALUE '(XXXX)BAPI_WF_MATE'.
FIELD-SYMBOLS:.
ASSIGN (v_field) to .
if sy-subrc eq 0 and is ASSIGNED and eq 'X'.
RET_CODE = 4.
endif.
***BAPI创建委外PO,组件输入。 Lee
DATA lv_comp TYPE c.
if sy-tcode eq 'XX'.
IMPORT lv_comp FROM MEMORY ID 'COMP'.
IF sy-subrc EQ 0 AND lv_comp = 'X'.
ret_code = 4.
FREE MEMORY ID 'COMP'.
ENDIF.
endif.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*