Hi,
I could suggest to use BAPI: BAPI_ACC_DOCUMENTS_RECORD, to extract the FI Document, would ease the data extraction a lot.
An excellent documentation on the BAPI is at:
Identify the follow on documents from a given document
Hope it could help.
Best Regards,
Jaymin R. Bhatt