When you are posting the Doc via BAPI* , you are aware of the Receiving Company Code and the Reference Text that we are passing along .
After performing a Commit , Try to retrieve the values by hitting BKPF table against the above mentioned Company Code and Reference text
or
Performance wise - Populate all the Values of the return table into a seperate internal table and retrieve at once.
Hope this helps.