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

Using the FI document no in BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
786

Dear all,

I am using BAPI_ACC_DOCUMENT_POST to post invoices.

This works fine.

Now, I have the problem, that I have to write the current FI posting number concatenated with other information into the field XBLNR (referenz posting number).

The Problem is, that we are using internal number rages for FI postings. That means, when calling the Bapi BAPI_ACC_DOCUMENT_POST I do not know the next FI posting number.

Maybe I can read the BKPF to find out the next FI posting number, but in case of different users which are posting invoices at the same moment, this will not work in any cases.

Do you know if there is a user exit, bapi or badi to modify this header field XBLNR after the FI has determined the next FI posting number? If there is a bapi to update the created FI positng I can also use this to update the FU posting.

Thanks a lot for your help!

Kind regards,

Stefan

3 REPLIES 3
Read only

ThomasZloch
Active Contributor
0 Likes
623

I'm sure you need a second step to do this reliably. Take the new document number you get from the first step then use e.g. FI_DOCUMENT_CHANGE to update XBLNR in a second step.

Thomas

Edit: unless there is an exit point (substitution, BTE, etc.) where the new document number is already known and you are still allowed to change the value of XBLNR...sorry not enough time to find out, maybe you can research yourself.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
623

Deleted ...

Edited by: Suhas Saha on Jun 15, 2010 9:59 PM

Read only

Former Member
0 Likes
623

Before spending a lot of time on this, you might check with your functional analyst to see if this is configurable.

Rob