2006 Mar 31 3:35 PM
Hello to all,
i need simple code sample (or tips) which describes
a request via an archiveLink connection to
receive a document. The retrieved data stream
should be saved.
many thanks
Thomas
Hello to all,
i need simple code sample (or tips) which describes
a request via an archiveLink connection to
receive a document. The retrieved data stream
should be saved.
many thanks
Thomas
2006 Mar 31 4:17 PM
Hi Thomas,
with HTTP Content-Server use:
DATA: binobject LIKE TBL1024 OCCURS 200,
length_bin TYPE I.
REFRESH: binobject.
CALL FUNCTION 'SCMS_AO_TABLE_GET'
EXPORTING
ARC_ID = archiv_id
DOC_ID = arc_doc_id
COMP_ID = 'data'
IMPORTING
LENGTH = length_bin
TABLES
DATA = binobject
EXCEPTIONS
error_http = 1
error_archiv = 2
error_kernel = 3
error_config = 4
others = 5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
RAISING ERROR_RETRIEVAL.
ENDIF.with an RFC archive use:
I don't know the function module by heart but it's like
ARCHIVOBJECT_GET_TABLE and it imports archiveID and archiveDocID and gives you the document back in the internal table docs[].
Best wishes,
Florin
2006 Apr 03 10:50 AM
Hi Florin,
using the Function ARCHIVOBJECT_GET_TABLE i get the Exception 'Für 4G is keine RFC-Destination für Archiv-DLL vorhanden'. There is no entry in table 'SDOKPROF'. Have you any idea?
Thanks,
Andi
2006 Apr 03 6:28 PM
Hello Andi,
hm. This error could only come up when you're using frontend communication (e.g. scanning, display etc.) and with and RFC-Archive 3.1, but now with the function ARCHIVEOBJECT_GET_TABLE, because it uses backend communication.
With releases prior to 4.5 you were able to customize the backend communication in the ArchiveLink protocol (transaction oaa3) but this has been disregarded by the SAP by now. Maybe this archiv was installed before an upgrade?
To localize the problem I would suggest to check the following steps:
- OAC0 Archive definition of 4G:
-- Which types is it (HTTPcontent server or RFC-Archive)
- OAC3 ArchiveLink protocol
-- create an empty archivelink protocol, let's say: "ARCHIVTEST". Don't do any special about it.
-- Enter the protocol ARCHIVTEST in the contRep-Customizing OAC0 for the archiv 4G.
Then try again.
To have an Archive installed doesn't neccessarily mean that the RFC communication is set up correctly. To check this, look at the entry "RFC-Destination" in the contRep-customizing. Then switch to SM59 and perform an RFC-Test (ping).
Let's see what you get!
Best wishes,
Florin
2006 Mar 31 4:21 PM
2006 Apr 03 9:34 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |