To get the original document : Use fields BKPF-AWTYP and AWKEY (take a look at table TTYP which carries structure to buyild key and FM to display document) but then the data displayed depends on type of document.
Hint: You can easily find the database table with either Abap trace (SAT, SE30) or SQL trace (ST05)
To execute F-43 you could (either)
- Use BAPI: BAPI_ACC_DOCUMENT_POST, BAPI_ACC_INVOICE_RECEIPT_POST
- Build BDC yourself
- Use FM POSTING_INTERFACE_* that will build the BDC
Beware: Check your actual requirement, you are building a vendor invoice from data of your system ?
Regards,
Raymond