on 10-31-2013 5:21 AM
HI
I am using the ACFUpDownload UI to upload files to KPRO.
How do I see these files in KPRO?
The up and down function well as I see no error and files
are downloaded to my desktop.
Can I write my open applet to store files in
DMS and not in KPRO?
What prefix do I give the document? The type of document?
regards
Yuval
ACF UpDown does not automatically store files in KPRO, the file is simply uploaded to the context of the involved Web Dynpro. I guess this is a continuation of discussion thread
http://scn.sap.com/thread/3439857
in that thread WD_TEST_APPL_ACFUPDOWN is mentioned. That WDA happens to store the uploaded file in KPRO but it could store the file just about anywhere. For example in KM, as a local file on the application server, etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The chosen content repository defines how and where the files are stored. The WDA in question uses function module SCMS_URL_GENERATE to store files in the chosen content repository which has to be of storage type HTTP. The WDA returns an URL to access the very same file. Since the content repository is a HTTP content repository, the location of the file depends on the content server. To access the stored files from other applications, you can use the same function module with command "get", you will have to know at least contRep, docId and compId. Anyway, this is more a DMS question.
I think there is some confusion here. Since in this case the file is stored in a content repository of storage type HTTP, you will have to use the HTTP interface to access the file. By using function module SCMS_URL_GENERATE command "get" you will get the URL of the stored file. You can then use any of the HTTP client implementations to retrieve the file and do whatever you want with it. The WDA in question uses the filename of the file as docId and compId. In this case to get the URL to a previously stored file in content repository ZCONTREP called test.TXT you would do the following:
call function 'SCMS_URL_GENERATE'
exporting
command = 'get'
contrep = 'ZCONTREP'
docid = 'test.TXT'
compid = 'test.TXT'
accessmode = 'r'
security = 'B'
importing
absolute_uri = uri
Variable uri will hold the URL for retrieving the file. See ABAP report RSHTTP52 for an simple example, I myself would prefer to use CL_HTTP_CLIENT though. If the file was stored in a content repository of storage type database, you could access the file directly.
I already told you. You have to fetch the file using the provided URL, you can then store the resulting binary string in an XSTRING variable if that is your requirement. I usually do not spoon-feed people but here you go:
data lo_client type ref to if_http_client.
data lv_content type xstring.
data lv_url type string.
lv_url = 'http://www.google.com'.
call method cl_http_client=>create_by_url
exporting
url = lv_url
importing
client = lo_client
exceptions
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
others = 4.
if sy-subrc = 0.
lo_client->send( ).
lo_client->receive( ).
lv_content = lo_client->response->get_data( ). " store content in variable lv_content
lo_client->close( ).
endif.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.