In the user exit of the custom tab, you may have to write a code the call the CV02N/CV03N t-code.
The code here will involve a call the FM: BAPI_DOCUMENT_GETOBJECTDOCS (let me know if you need the sample code for this).
The returned DOCUMENTLIST table would have the document details (like the document no, document part, document version and document type).
Next you call the CV02N/CV03N via BDC/BAPI.
Hope this helps.