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

Former Member
0 Likes
1,571

Dear GURU,

I got some problem when I use BAPI_ACC_Document_Post. Normally,I can fill in parameters in BAPI_ACC_Document_post(Stimulate same F-28). That's Ok. After that I checked open item of customer via FBL5N that I found document isn't clear item. It showed debit and credit(+/-) are balance but clearing document is blank that it make status of document show open item all time. How can I do for clear it via BAPI_ACC_Document_Post?

Many thanks,

Koon

6 REPLIES 6
Read only

Former Member
0 Likes
880

What did you expect it to clear against?... just posting a document won't result in a clearing unless something else runs, e.g. the standard SAP clearing program SAPF124 (which needs rules to know how to match up related items) or something like transaction FB1D.

Jonathan

Read only

Former Member
0 Likes
880

Many thanks for your answer. By the way ,I want to know whenever I use t-code : f-28 document will auto clearing item (I check tracsaction via t-code : fbl5n) but I can't use it via BAPI_ACC_DOCUMENT_POST or I fill in parameter something wrong via bapi?

Read only

0 Likes
880

F-28 is posting an incoming payment, and within it the user selects the open items to be cleared during this process. The BAPI above just posts a document (as in FB01) so you might want to investigate the function POSTING_INTERFACE_CLEARING and its friends to achieve the desired outcome... you would need a "wrapper" to make an RFC enabled function though.

Jonathan

Read only

Former Member
0 Likes
880

Hi Jonathan,

Many thanks for you help. I will test to use function POSTING_INTERFACE_CLEARING. Anyway I want to know how to "wrapper" to make an RFC enabled function.

Koon

Read only

0 Likes
880

Since the POSTING_INTERFACE_CLEARING function module is not RFC enabled, plus it needs to be preceded by a call to POSTING_INTERFACE_START and followed by POSTING_INTERFACE_END, you might want to write an RFC-enabled function module (e.g. "Z_FI_POST_WITH_CLEARING") that encapsulates data validation, undertakes the 3 calls, and returns messages (good and bad) in a suitable format to the caller etc etc. Do a "where used" on POSTING_INTERFACE_CLEARING as I think there are some examples in standard SAP.

Jonathan

Read only

Former Member
0 Likes
880

Dear Jonathan,

Many thanks for your help.

Koon