‎2011 Jan 19 7:38 AM
Hi Experts,
Iam using BAPI_ACC_DOCUMENT_POST, document is getting posted succesfully but, If i check document in FB03 documnet header text is not updated. but iam passing document header text (EX_DOCUMENT-header-bktxt = IM_DOCUMENT-header-bktxt.
) Plese help me where it is missing.
Thanks and regards,
RRk
‎2011 Jan 19 7:44 AM
It is to be passed to the field BKTXT of parameter structure DOCUMENTHEADER.
‎2011 Jan 19 9:20 AM
Dear Vinod,
The same iam passing.
HEADER_TXT field in BAPIACHE09, let me know if it is wrong.
‎2011 Jan 19 11:30 AM
Hi Ravi,
Yeah you are correct, you have to pass Header Text to HEADER_TXT of BAPI BAPIACHE09. I have tested here, it is getting updated here. Check whether any BADI implementation exist for BADI ACC_DOCUMENT, coz it will get triggered when using this BAPI, there might be a chance that some code is written to clear the data of Header Text.
Thanks & Regards,
Faheem.
‎2012 Jul 05 8:29 AM
correct answer is this..
U have to implement the BADI for this.. ‘AC_DOCUMENT’
Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,
*---<SAPLBPFC> is for Posting with BAPI: BAPI_ACC_DOCUMENT_POST
*---<SAPCNVE > is for Posting(Tax) with BAPI: BAPI_ACC_DOCUMENT_POST
*---<SAPMSSY1> is for Test(Check) with BAPI: BAPI_ACC_DOCUMENT_CHECK
*for example I used this for getting the header text
DATA: wa_header TYPE acchd.
IF sy-xprog NE ' SAPMSSY1 '.
CLEAR wa_header.
wa_header = im_document-header.
ex_document-header-bktxt = wa_header-bktxt.
CLEAR wa_header.
ENDIF.