Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Document header text in BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
3,132

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,674

It is to be passed to the field BKTXT of parameter structure DOCUMENTHEADER.

Read only

0 Likes
1,674

Dear Vinod,

The same iam passing.

HEADER_TXT field in BAPIACHE09, let me know if it is wrong.

Read only

0 Likes
1,674

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.

Read only

raviraj7
Explorer
0 Likes
1,674

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.