增强点:交货单过账后的增强点->SE18->DELIVERY_PUBLISH
这个增强点是在VL02N修改/过账之后触发的
业务场景:需要在交货单过账之后自动开发票
sy-ucomm = 'WABU_T' "交货过账
"分子公司转采的单子需要同步开发票IF ( ( sy-tcode = 'VL01N' OR sy-tcode = 'VL02N' OR sy-tcode = 'VL06') AND sy-ucomm = 'WABU_T' ) .READ TABLE lt_likp WITH KEY wbstk = 'C' TRANSPORTING NO FIELDS. "判断是否完全交货IF sy-subrc = 0 .SELECT COUNT(*) FROM zsdt013 WHERE vbeln_vl = ls_likp-vbeln . "判断是否为转采单据IF sy-subrc = 0 ."开发票CALL FUNCTION 'ZSD013_VF01' STARTING NEW TASK 'task'EXPORTINGlv_vbeln = ls_likp-vbeln.ENDIF .ENDIF .ENDIF .