Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A


Dear Experts,

How to fill BKPF custom fields through BAPI_ACC_DOCUMENT_POST?

I've done the following things:

- Append structure to BKPF table

- Append structure to ACCHD structure

- Fill Extension2 BAPIPAREX structure to fill the extension fields and pass to BAPI_ACC_DOCUMENT_POST

- create ACC_DOCUMENT BAdI implementation and implements the CHANGE method to get the Extension2 structure and pass the custom fields to C_ACCHD structure.

In debug, I've seen the custom fields has been passed to the C_ACCHD structure. But somehow, it is not transferred to the XBKPF structure.

In the program flow, I've found in program LFACIF4S subroutine fi_document_fill. That is when the XBPKF structure is filled from a structure named p_acc.

In program LFACIGEN is the definition of p_acc structure.

For now, I think I can:

- create an implicit enhancement in the end of subroutine fi_document_fill (program LFACIF4S) to transfer my custom fields from ACCHD to XBKPF

- Find out how to generate my custom fields in structure p_acc in LFACIGEN.

Is this the standard way to fill custom fields in BKPF through BAPI_ACC_DOCUMENT_POST?

Thank you,

Suwandi C.


Hi Aashika,

Thank you for the reply.

In my case, fields from ACCHD does not automatically transferred to BKPF. I still have to run a report for the custom fields to be added to a structure in the standard program.

Thank you,

Suwandi C

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question