on 04-27-2015 1:22 PM
Hi guys,
I had a query which i will require you to help me with.
The requirement is to download the attached document from the open text server.
Currently i am using the following function modules to get the URL of the file and display it to the user (which is happening correctly) :
1. CALL FUNCTION 'ARCHIVELINK_URL_GENERATE'
2. CALL FUNCTION '/IXOS/DC46_V_URL_DISPLAY'
As per the new requirements, I need to download the file to a specific path. Can someone please help me?
Thanks in advance,
Devrath Sampat
Hi Devrath,
Use SCMS_DOC_INFO (CREP_ID = archive id, DOC_ID ) to get the component name of a document and then SCMS_HTTP_GET_FILE (CREP_ID, DOC_ID, COMP_ID, PATH, FRONTEND) to save it on frontend or server.
Regards,
Benedikt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Benedikt,
I am trying to pass archive ID (TOA01-ARCHIV_ID) to SCMS_DOC_INFO (crep id) but I am getting error document not found even though it exists in the table. Can you please help me with any standard T Codes where i can check its data . Open text is kind of new to me.
Thanks and Regards
Devrath
Hi Devrath,
what table do you mean? Normally ArchiveLink information is stored in "connection tables" TOA01, TOA02, TOA03. For SCMS_DOC_INFO you have to provide TOA01-ARCHIV_ID for CREP_ID and TOA01-ARC_DOC_ID for DOC_ID. If you test this in transaction SE37, please check the Uppercase/Lowercase flag if you have docids with lower-case characters.
Regards,
Benedikt
Hi Devrath,
ArchiveLink documents do not have a name in the archiving system. The main component is always called "data" or "data1". And then there are additional components like "note" or "anno.ixos" etc.
Using note 1451769 the filenames of uploaded documents (object services, create..., store business document) are stored in table TOAAT.
Names are stored in archiving system only for KPro scenario e. g. using SAP DMS (CV00).
Regards,
Benedikt
Hello Devrath,
You can make use of following Func Modules
SCMS_DOC_READ
SCMS_DOC_INFO
SCMS_DOC_UPDATE
SCMS_DOC_URL_READ
SCMS_HTTP_DOC_GET_FILES – download archived document
SCMS_HTTP_CREATE_FILES – upload new document
ARCHIV_CONNECTION_INSERT – create new ArchiveLink connection
ARCHIV_DELETE_META – delete ArchiveLink connection
ARCHIV_GET_CONNECTIONS – list ArchiveLink connections
Sample code
call function 'ALINK_RFC_DOCUMENTS_GET' - Read Archive link Document
exporting
im_botype = rmpsd_const_objtype_post
im_boid = l_objkey_post
* IM_X_URLS =
* IMPORTING
* EX_MESSAGE =
tables
ex_results = lt_related_objects .
* EX_URLS =
loop at lt_related_objects into wa_related_objects .
* No multiple links supported!
exit .
endloop .
* Get file extension
call method cl_rmps_general_functions=>get_extension_from_mime
exporting
im_mime_type = wa_related_objects -mimetype
receiving
re_file_extension = wa_content -doc_type
exceptions
nothing_found = 1
others = 2.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif .
* Get linked objects
call function 'ALINK_RFC_TABLE_GET'
exporting
im_docid = wa_related_objects- docid
im_crepid = wa_related_objects -crepid
* IM_COMPID =
importing
ex_length = wa_content -docsize
* EX_MESSAGE =
tables
ex_document = lt_content_1024 .
call method cl_rmps_general_functions=>convert_1024_to_255
exporting
im_tab_1024 = lt_content_1024
receiving
re_tab_255 = wa_content -cont_hex.
wa_content- binary = if_srm =>true.
append wa_content to re_tab_content .
Regards
Sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Devrath,
please be aware of that in ArchiveLink environment the content repository names can be only 2 characters long, so you might face a problem. Use the more generic KPro CMS function modules instead. (And anyways ArchiveLink also uses the KPro CMS.)
Best regards,
Janos
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.