cancel
Showing results for 
Search instead for 
Did you mean: 

Save Document (URL) programatically

Former Member
0 Kudos

Hi all,

I'd like to ask if it is possible to upload a document as URL in RPM programatically?


I tried to program an upload similar to the one used in the Web Dynpro Component /RPM/Document in the View VI_UPLOADDETAIL, but it fails.

More specifically:

the returning ls_ndoc_data is initial when I use this method with the same values as the WebDynpro calls it:

    lr_doc_utils->create_doc_in_fol(

      EXPORTING

        is_context       = wd_this->gs_object_data

        is_parent_folder = ls_pfol_data

        it_all_docs      = wd_this->mt_docs_folders

        is_base_object   = wd_this->ms_object

        iv_docpath       = stru_uploadnewdoc-url

        iv_docmime       = stru_uploadnewdoc-mimetype

        iv_description   = stru_uploadnewdoc-docdesc

        iv_as_url        = abap_true

      IMPORTING

        es_new_doc       = ls_ndoc_data  ).

I tried to insert the URL + Description into the Tables /RPM/Document and DPR_Document_T, since those are the tables that consist data for documents stored in RPM, but this is not enough.

If you have any hints, or usable function modules or can tell me what is missing on my database approach to store a URL as Document in RPM, that'd be helpful.

Kind Regards,
Josef

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I did find a way for uploading files as URLs programatically.

Important is, that /rpm_cl_document_api is used with sc_document_create with the ke4y containing root guid and object type and the data is done with a type /rpm/ts_api_document with save_as_url = abap_true.


final save is done with cl_inm_ppm_services=>save

Hope it helps!

b_sridhar_121
Discoverer
0 Kudos

Hi Josef,

Can you please elaborate the steps in detail or provide me sample code to achieve this.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Josef,

Have you resolved the issue stated above? We are also planning to achieve same functionality dynamically by developing program.

Best Regards,

Aditya Kotak

Former Member
0 Kudos

Hi Aditya,

I am still working on this issue. If I get this done, I'll let you know how it can be achieved.

Kind Regards,
Josef

Former Member
0 Kudos

Hi Josef,

can you please elaborate this as what exactly you are trying to do?

" if it is possible to upload a document as URL in RPM programatically?"

We have developed custom reports/FMs where we have integrated PPM system with outlook/smart tags from where we upload/send documents and they get inserted to individual projects of document section under desired folder in backend by calling those reports in backend.

Thanks,

Pavan.

Former Member
0 Kudos

Hi Pavan,

task ist that on Iteam creation a URL should be saved as document. This should be for an external document management, so the URL differs for each item.

I hope that makes it more clear.


Thanks,
Josef