‎2007 Jun 21 2:09 PM
Hi,
Is there any BAPI/FM to post FI document (FB01).
Thanks & REgards,
Abhishek Sarkar
‎2007 Jun 21 2:11 PM
‎2007 Jun 21 2:11 PM
‎2007 Jun 21 2:12 PM
‎2007 Jun 21 2:14 PM
‎2024 Nov 18 5:45 PM
Call this BAPI
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
document header = lw_document_header
TABLES
accountgl = lt_accountgl
accountreceivable = lt_accountcust
accountpayable = lt_accountvend
accounttax = lt_accounttax
currencyamount = lt_currencyamount
return = lt_return
extension2 = lt_extension2.
DATA: lv_success TYPE abap_bool.
lv_success = abap_true.
LOOP AT lt_return INTO DATA(ls_return).
WRITE: / ls_return-message. "Output return message
IF ls_return-type = 'E' OR ls_return-type = 'A'.
lv_success = abap_false. "Set success flag to false on error
ENDIF.
ENDLOOP.
"Commit Work if Successful
IF lv_success = abap_true.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
WRITE: / 'Document posted successfully:', lv_document_number.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'. "Rollback on error
WRITE: / 'Document posting failed.'.
ENDIF.
‎2024 Nov 17 4:36 AM
any one have documentation how we can use BAPI_ACC_DOCUMENT_POST
‎2024 Nov 18 12:47 PM
Hi,
check note 2083799 and the referenced notes for special postings.
Regards, Oliver