Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ArchiveLink RFC

Former Member
0 Likes
2,118

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

5 REPLIES 5
Read only

Former Member
0 Likes
1,298

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

Read only

0 Likes
1,298

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

Read only

0 Likes
1,298

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

Read only

asarat
Explorer
0 Likes
1,298

Yeah Florin. I remember using it too.

Read only

Former Member
0 Likes
1,298

Hello,

many many thanks for your help

i´ll try.

thanks

Thomas