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

BAPI_ACC_DOCUMENT_POST problem in header text(bktxt)

Former Member
0 Likes
6,624

Hi experts,

Am using bapi BAPI_ACC_DOCUMENT_POST for gl upload for t-code f-02. the problem is header text(bktxt) is not uploading in fb03. how to solve this problem??

Regards,

Sunita.

1 ACCEPTED SOLUTION
Read only

Former Member
3,131

Because BAPI: BAPI_ACC_DOCUMENT_POST will Check BADI with Posting

1.BADI Information:

(1)Object Type Name(Interface) is IF_EX_AC_DOCUMENT (T-code: SE24)

(2)Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK

2.Reason:

(1)Once This BADI has been created for any reason,

BAPI:BAPI_ACC_DOCUMENT_CHECK & BAPI_ACC_DOCUMENT_POST

will check it for Document Header Text

(2)If Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK has been created for any reason,

but Creator return an null Document Header Text, then BAPI will clear Document Header Text

3.Solution:

(1)Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,

please refer to (2) for detail source code below

(2)

*********************************************************************

DATA: wa_header TYPE acchd.

IF sy-xprog EQ 'SAPLBPFC'.

*---<SAPLBPFC> is for Posting with BAPI: BAPI_ACC_DOCUMENT_CHECK

*---<SAPMSSY1> is for Test(Check) with BAPI: BAPI_ACC_DOCUMENT_POST

CLEAR wa_header.

wa_header = im_document-header.

ex_document-header-bktxt = wa_header-bktxt.

CLEAR wa_header.

ENDIF.

8 REPLIES 8
Read only

former_member632729
Contributor
0 Likes
3,131

Hi Dude,

Go through this links :

Link:[http://www.sapnet.ru/viewtopic.php?t=1510]

Link:[;

Read only

Adi_Bathineni
Participant
0 Likes
3,131

Sunita,

Could you please check the code once again????

we are able to passing the Header Text.

in the BAPI, under Export Parameters you should pass the data to "DOCUMENTHEADER".

in that there is a filed for Header Text.

Thanks,

Adi.

Read only

Former Member
0 Likes
3,131

is AC_DOCUMENT badi implemeted for any requirements. If so check oss note 1025810

Read only

Former Member
3,132

Because BAPI: BAPI_ACC_DOCUMENT_POST will Check BADI with Posting

1.BADI Information:

(1)Object Type Name(Interface) is IF_EX_AC_DOCUMENT (T-code: SE24)

(2)Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK

2.Reason:

(1)Once This BADI has been created for any reason,

BAPI:BAPI_ACC_DOCUMENT_CHECK & BAPI_ACC_DOCUMENT_POST

will check it for Document Header Text

(2)If Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK has been created for any reason,

but Creator return an null Document Header Text, then BAPI will clear Document Header Text

3.Solution:

(1)Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,

please refer to (2) for detail source code below

(2)

*********************************************************************

DATA: wa_header TYPE acchd.

IF sy-xprog EQ 'SAPLBPFC'.

*---<SAPLBPFC> is for Posting with BAPI: BAPI_ACC_DOCUMENT_CHECK

*---<SAPMSSY1> is for Test(Check) with BAPI: BAPI_ACC_DOCUMENT_POST

CLEAR wa_header.

wa_header = im_document-header.

ex_document-header-bktxt = wa_header-bktxt.

CLEAR wa_header.

ENDIF.

Read only

0 Likes
3,131

Hi,

Thank you ....it is very helpful for me.

Regards

Ashutosh

Read only

Former Member
0 Likes
3,131

Because BAPI: BAPI_ACC_DOCUMENT_POST will Check BADI with Posting

1.BADI Information:

(1)Object Type Name(Interface) is IF_EX_AC_DOCUMENT (T-code: SE24)

(2)Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK

2.Reason:

(1)Once This BADI has been created for any reason,

BAPI:BAPI_ACC_DOCUMENT_CHECK & BAPI_ACC_DOCUMENT_POST

will check it for Document Header Text

(2)If Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK has been created for any reason,

but Creator return an null Document Header Text, then BAPI will clear Document Header Text

3.Solution:

(1)Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,

please refer to (2) for detail source code below

(2)

*********************************************************************

DATA: wa_header TYPE acchd.

IF sy-xprog EQ 'SAPLBPFC'.

*---<SAPLBPFC> is for Posting with BAPI: BAPI_ACC_DOCUMENT_CHECK

*---<SAPMSSY1> is for Test(Check) with BAPI: BAPI_ACC_DOCUMENT_POST

CLEAR wa_header.

wa_header = im_document-header.

ex_document-header-bktxt = wa_header-bktxt.

CLEAR wa_header.

ENDIF.

Read only

Former Member
0 Likes
3,131

Sorry! I have corrected source code

*********************************************************************

DATA: wa_header TYPE acchd.

IF sy-xprog NE 'SAPMSSY1'.

*---<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

CLEAR wa_header.

wa_header = im_document-header.

ex_document-header-bktxt = wa_header-bktxt.

CLEAR wa_header.

ENDIF.