I am still struggling with my report for download of invoice-related documents from the archive.
For the downl,oad of PDF-attachments from invoices I was meanwhile successful.
Now there come a further requirements which is the download of consignment notes (CMR) from transports (business object VTTK).
I use the function module ALINK_DOCUMENTS_GET_CLIENT.
Therein I get a error-message from the function module SCMS_CLTFC_FILE_GET with the message "GetStream failed".
The difference to the invoice-attachments is that the consignment notes have document-type = 'FAX' (instead of 'PDF' with the invoice-attachments).
Does anybody of you have a hint for me?
The call of function modules ALINK_DOCUMENTS_GET_CLIENT is as following:
CALL FUNCTION 'ARCHIV_GET_CONNECTIONS'
objecttype = 'VTTK'
object_id = l_object_id
connections = lt_connections
nothing_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
READ TABLE lt_connections INTO lw_connections INDEX 1.
* Download des Anhangs der Faktura nach generierter Datei
lv_document_class = lw_connections-reserve.
CALL FUNCTION 'ALINK_DOCUMENTS_GET_CLIENT'
archiv_id = lw_connections-archiv_id
document_class = lv_document_class
archiv_doc_id = lw_connections-arc_doc_id
filename = '\\P1030.gruppe.local\_Austausch\Factoring_ungarn\Download_Frachtbrief.PDF'
retfilename = fname_c
error_contentrepository = 1
OTHERS = 2.