If you use BAPI_ACC_DOCUMENT_POST to create FI Document, you will definitely get the header text is not posted although you have input header text into BAPI_ACC_DOCUMENT_POST.

The solution you need to use BADI AC_DOCUMENT of method CHANGE_INITIAL & CHANGE_AFTER_CHECK.

Go to SE18 and enter AC_DOCUMENT into BadI Name field.

bapi_acc_document_post header text not posted

Create enhancement and put this ABAP code into method CHANGE_INITIAL & CHANGE_AFTER_CHECK.