2014 Dec 23 9:45 AM
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.
2014 Dec 23 9:49 AM
Hi,
Please use BTE - SAMPLE_INTERFACE_RWBAPI01 to fill the fields which are added in header or item table.
Regards,
Aashika
Hi Suwandi,
What did you do to that will work? another extension, program, or something else? how do you fix this?
2014 Dec 23 9:49 AM
Hi,
Please use BTE - SAMPLE_INTERFACE_RWBAPI01 to fill the fields which are added in header or item table.
Regards,
Aashika
2014 Dec 23 10:06 AM
Hi Aashika,
Thank you for the reply.
I thought implementing the BTE RWBAPI01 (and filling the Extension1 structure), it will only transfer the fields to DOCUMENTHEADER (ACCHD). If that's right, in that case BTE RWBAPI01 and BAdI ACC_DOCUMENT both only fills to the ACCHD structure but not to the BKPF structure
CMIIW.
Thank you,
Suwandi C.
2014 Dec 23 11:26 AM
Hi,
In BTE you can also manipulate values from tables:
*" TABLES
*" IT_ACCIT STRUCTURE ACCIT
*" IT_ACCCR STRUCTURE ACCCR
*" RETURN STRUCTURE BAPIRET2
*" EXTENSION STRUCTURE BAPIACEXTC
*" IT_ACCWT STRUCTURE ACCIT_WT
*" CHANGING
*" VALUE(DOCUMENT_HEADER) LIKE ACCHD STRUCTURE ACCHD
In my one of the issue, I have passed the value to IT_ACCIT, and it successfully updated the same in BSEG.
Regards,
Aashika Agarwal
2014 Dec 24 2:39 AM
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
2014 Dec 24 5:08 AM
Hi,
Have you created a Z program to modify BKPF table.
Regards,
Aashika
2015 Jan 05 1:49 PM
Hi,
Sorry for the late reply..
What kind of Z program that you mean?
Thank you,
Suwandi C.
2015 Aug 28 12:38 AM
Hi Suwandi,
What did you do to that will work? another extension, program, or something else? how do you fix this?
2015 Aug 28 5:22 AM
Hi,
I've done the steps in my first post and then the last step is to run the standard program RFPOSXEXTEND.
Hope this helps.
Thank you,
Suwandi C.
2022 Aug 24 8:40 AM
Hi Suwandi,
currently i tried to post zfield value into BAPI_ACC_DOCUMENT_POST, but after i implement BTE - SAMPLE_INTERFACE_RWBAPI01
it's not trigering my zfunction module. Please help. Thank you.
Denny Bayu
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |