Skip to Content
-1
Jun 15, 2022 at 01:52 PM

Document-Download from Archive with Function Module SCMS_DOC_READ without success

109 Views

Hello together,

I try to download an attachment for an invoice from the Archive (Archivelink).

I tried it with FM SCMS_DOC_READ but without success.

I tried it also with other Function Modules (a.o. ARCHIV_GET_TABLE), also without success.

My coding is as following:

CONCATENATE gs_invoices-vbeln '%' INTO gv_vergleich.

SELECT SINGLE object_id arc_doc_id archiv_id reserve
FROM toa01
INTO ( lv_object_id, lw_connections-arc_doc_id, lw_connections-archiv_id, lv_document_type )
WHERE object_id LIKE gv_vergleich.

CALL FUNCTION 'SCMS_DOC_READ'
EXPORTING
mandt = sy-mandt
stor_cat = ' '
crep_id = lw_connections-archiv_id
doc_id = lw_connections-arc_doc_id
TABLES
access_info = lt_info
content_txt = lt_content_txt_1022
content_bin = lt_content_bin_1022
EXCEPTIONS
bad_storage_type = 1
bad_request = 2
unauthorized = 3
comp_not_found = 4
not_found = 5
forbidden = 6
conflict = 7
internal_server_error = 8
error_http = 9
error_signature = 10
error_config = 11
error_format = 12
error_parameter = 13
error = 14
OTHERS = 15.

If you can help with with any hint I would be lucky!

Kind regards

Udo