cancel
Showing results for 
Search instead for 
Did you mean: 

ACFUPLOAD to kpro

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

How do I tell where the file is stored?

How can I find its physical location?

If another app needs to use this file where does it

locate the file?

I have the URL web dynpro generates for the file,

but how can we utilize this ?

Thanks

Yuval

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

So if I call http_get but to store the filed in DMS I have to get

its XSTRING representation. How do I do that?

can I use the URL to get the file as xstring?

Thanks

Yuval

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

Sorry but how do I get the file or it's xstring if I have

The URL ???

Thank you very much

Regards

Yuval

Former Member
0 Kudos

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.

Former Member
0 Kudos

HI

Thank you very much for your reply and help.

I am sorry if I was too pushy.

I was not at work today so I could not dive into

the class you provided. Sorry and thank you again.

regards

yuval

Answers (0)