BAPI拋僄票的寫法,遇上cobl欄位的處理需要加上BADI ACCDOCUMENT
Implement 名稱取ZACC_DOCUMENT即可,需特別注意filter值要選BKPFF
這時只有BAPI才會進去
Implement Method: CHANGE
貼入以下程式碼:
DATA: LW_CI_COBL TYPE CI_COBL,
WA_ACCIT TYPE ACCIT,
WA_EXT2 TYPE BAPIPAREX .
LOOP AT C_ACCIT INTO WA_ACCIT.
READ TABLE C_EXTENSION2 INTO WA_EXT2 INDEX WA_ACCIT-POSNR.
IF SY-SUBRC = 0.
LW_CI_COBL = WA_EXT2-VALUEPART1.
MOVE-CORRESPONDING LW_CI_COBL TO WA_ACCIT.
MODIFY C_ACCIT FROM WA_ACCIT.
ENDIF.
ENDLOOP.
沒有留言:
張貼留言