07-30-2022 7:45 AM
Dear All
Please help me where I am missing. I am using BAPI_ACC_DOCUMENT_POST to post the documents. Everything is working fine. But the Header text is not populated.
header-username = sy-uname.
header-header_txt = 'Transfer Cost Posting'.
header-comp_code = '1000'.
header-doc_date = p_bldat. " wa_finalposting_cc-bldat.
header-pstng_date = p_budat. " wa_finalposting_cc-budat.
header-doc_type = 'TR'.
header-ref_doc_no = 'TR-06'.
Is anything related to document type setting? Kindly help me.
Regards,
Venkat
07-31-2022 9:23 AM
Thank you gabmarian and sandra.rossi
Your directions helped me a lot.
Yes, there was a BADI implemented AC_DOCUMENT - but no functional code exists. Only there was some break point checks were there. Hence I replied that there was no enhancements.
But later as per sandra's comment, i further searched and found that - even if you dont' have any code but the method is implemented for any reason - the header text will be over written.. That was the message I got.
So adding further code in those methods - brought the header text.
CHANGE_INITIAL & CHANGE_AFTER_CHECK
DATA: wa_header TYPE acchd.
IF sy-xprog EQ 'SAPMSSY1'.
CLEAR wa_header.
wa_header = im_document-header.
ex_document-header-bktxt = wa_header-bktxt.
CLEAR wa_header.
ENDIF.
Many thanks to gabmarian and sandra.rossi
Regards,
Venkat
07-30-2022 8:41 AM
Did you check whether it is cleared by a substitution rule or a user exit (e.g. the one where you can process the extension fields)?
07-30-2022 6:57 PM
Hi gabmarian
There are no exits / rule that replaces this value.
Regards,
Venkat
07-30-2022 8:05 PM
You may search the forum/SAP Web site with your favorite Web search engine. I see many answers for search below. Based on the results, if it still doesn't solve, you may anyway refine your query/provide more information.
BAPI_ACC_DOCUMENT_POST header_txt site:sap.com
07-31-2022 9:23 AM
Thank you gabmarian and sandra.rossi
Your directions helped me a lot.
Yes, there was a BADI implemented AC_DOCUMENT - but no functional code exists. Only there was some break point checks were there. Hence I replied that there was no enhancements.
But later as per sandra's comment, i further searched and found that - even if you dont' have any code but the method is implemented for any reason - the header text will be over written.. That was the message I got.
So adding further code in those methods - brought the header text.
CHANGE_INITIAL & CHANGE_AFTER_CHECK
DATA: wa_header TYPE acchd.
IF sy-xprog EQ 'SAPMSSY1'.
CLEAR wa_header.
wa_header = im_document-header.
ex_document-header-bktxt = wa_header-bktxt.
CLEAR wa_header.
ENDIF.
Many thanks to gabmarian and sandra.rossi
Regards,
Venkat