Skip to Content

BAPI_ACC_DOCUMENT_POST fill BKPF Custom Fields

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Dec 23, 2014 at 09:49 AM

    Hi,

    Please use BTE - SAMPLE_INTERFACE_RWBAPI01 to fill the fields which are added in header or item table.

    Regards,

    Aashika

    Add comment
    10|10000 characters needed characters exceeded