‎2012 Jan 31 5:57 AM
Hi All,
I want to post account document using BAPI_ACC_DOCUMENT_POST.
However, there is no way I see to upload reference Key fields XREF1_HD and XREF2_HD using this BAPI.
Is there any way this can be achieved?
Thanks in advance.
‎2012 Jan 31 8:13 AM
Documentation says that these fields can only be filled internally, so you need to setup an FI substitution or use the EXTENSION1 structure of the BAPI along with the corresponding BADI implementation, please look for available information.
Thomas
‎2012 Jan 31 8:31 AM
Hi
See SAP Note 487722 - Using EXTENSION1 for accounting BAPIs
Regards
Eduardo
‎2015 Jul 01 7:11 AM
Hi,
I too had the same problem and found a solution. Hope it will be useful to someone.
1. Pass field names 'XREF1_HD' & 'XREF2_HD' in valuepart1 of structure 'EXTENSION2' and their corresponding values in valuepart2.
2. Create an implementation for BADI 'ACC_DOCUMENT'.
3. The extension values will be available in 'C_EXTENSION2' parameter of Method 'Change'.
4. The fields XREF1_HD & XREF2_HD are available in ACCIT but not in ACCHD. Modify these fields in ACCIT.
5. Once doc is posted, you should be able to see values in the header.
Regards,
Laxman