‎2010 Jun 15 5:02 PM
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
‎2010 Jun 15 5:18 PM
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.
‎2010 Jun 15 5:28 PM
‎2010 Jun 15 6:03 PM
Before spending a lot of time on this, you might check with your functional analyst to see if this is configurable.
Rob