BAPI_ACC_DOCUMENT_POST寫入COPA特性值

1 宣告
DATA: IT_CRITERIA LIKE TABLE OF BAPIACKEC9 WITH HEADER LINE

2 依需求填入值
IT_CRITERIA-ITEMNO_ACC = ITAB-BUZEI.
IT_CRITERIA-FIELDNAME = ‘VTWEG’.
IT_CRITERIA-CHARACTER = ITAB-VTWEG.
APPEND IT_CRITERIA. CLEAR IT_CRITERIA.

3 過帳
CALL FUNCTION ‘BAPI_ACC_DOCUMENT_POST’
EXPORTING
DOCUMENTHEADER = GD_DOCUMENTHEADER
IMPORTING
OBJ_TYPE = GS_BAPIACHE09-OBJ_TYPE
OBJ_KEY = GS_BAPIACHE09-OBJ_KEY
OBJ_SYS = GS_BAPIACHE09-OBJ_SYS
TABLES
ACCOUNTGL = IT_ACCOUNTGL
CURRENCYAMOUNT = IT_CURRENCYAMOUNT
CRITERIA = IT_CRITERIA
RETURN = IT_RETURN.

你可能感兴趣的:(function,header,table)