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

FB01 Posting Issue using PRELIMINARY_POSTING_FB01, BAPI_ACC_DOCUMENT_POST

titus_thomas2
Explorer
0 Likes
2,253

Hi all,

I am facing an issue when posting an FI document. I have used the FM PRELIMINARY_POSTING_FB01 successfully to park a document, but when it comes to posting, it simply isnt getting posted. I tried passing i_xcmpl = 'X' but it is not getting posted. To verify if posted, i check the BSEG entries, but find no entries. BKPF-BSTAT remains 'V'.

I then used BAPI_ACC_DOCUMENT_POST, but in the return structure, errors like Error in "BBKPF Document $1 " and "Balance in transaction currency" and so on. I dont know how to proceed.

I further used another FM POSTING_INTERFACE_DOCUMENT. Some internal message no.s are coming which says Posting period 007 49 not found for company code. But when i run the transaction FB01 manually, document is getting posted with the program values.

Please help.

Titus

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,762

Hi thomas,

In BAPI_ACC_DOCUMENT_POST-if you have any errors by default you will get that BKPFFdocument error '' error.

once you cleared all the errors that will go.so don't look into it.

for balance in currancy---you need to balance the currancy to post the document.

if suppose.

GLdebit = 40000.

Vendor or customer credit should be -40000.

In ur file it might be with out minus.

Regards,

Sri

4 REPLIES 4
Read only

Former Member
0 Likes
1,763

Hi thomas,

In BAPI_ACC_DOCUMENT_POST-if you have any errors by default you will get that BKPFFdocument error '' error.

once you cleared all the errors that will go.so don't look into it.

for balance in currancy---you need to balance the currancy to post the document.

if suppose.

GLdebit = 40000.

Vendor or customer credit should be -40000.

In ur file it might be with out minus.

Regards,

Sri

Read only

Former Member
0 Likes
1,762

You can use BAPI_ACC_DOCUMENT_POST. "Balance in transaction currency" error comes only if the total amount of all the records in the structure "currencyamount" is not equal to Zero. Check whether the values (+/-) based on Posting key.

Regards

Vinod

Read only

Former Member
0 Likes
1,762

Hi,

According to my understanding 'PRELIMINARY_POSTING_FB01' can be used only for parking the document not posting.

In one of the scenarios, I used Bapi 'BAPI_ACC_DOCUMENT_CHECK' used for validating the data and then bapi 'BAPI_ACC_DOCUMENT_POST' for posting the data.

Read only

titus_thomas2
Explorer
0 Likes
1,762

Thanks Sri &Vinod..

The error was that i didnt give the negative amount for the second line item.. so there was always a balance...

That was my mistake...

Thanks a lot...