Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 4552

CL_CRM_DOCUMENT - Why I can't attach MS Word Document to my Task?

$
0
0

Dear Experts,

 

within a report I am creating Tasks (BUS2000125) and after creating the tasks I want to attacht to every task an MS Word Document wich I have created in the same report too. With the OLE Functionality I am creating the Word Documents without errors or problems. The I use method cl_crm_documents=>create_with_file and there I got no errors too. But when I want to see the attachment it is not there. The MS Word Document is saved in an 'normal' folder on the same server where the SAP is intalled. What I am doing wrong. Why it is not attaching the Word Document to my Task?

 

DATA: 
lv_file_save_as        TYPE c LENGTH 255,
lv_nombre_fichero    TYPE sdok_filnm,
lv_directory                TYPE sdok_chtrd,
ls_loio                        TYPE skwf_io,
ls_phio                      TYPE skwf_io,
ls_error                     TYPE skwf_error,
ls_business_object     TYPE sibflporb.

 CLEAR ls_guid.

  LOOP AT lt_guid INTO ls_guid.    ls_business_object-instid  = ls_guid-guid.    ls_business_object-typeid = 'BUS2000125'.    ls_business_object-catid   = 'BO'.    lv_directory = '\\SRVDRMSAP\logs_crm_actividades\'.    lv_nombre_fichero ='Name_of_word_document.doc'.          CALL METHOD cl_crm_documents=>create_with_file      EXPORTING        file_name       = lv_nombre_fichero        directory       = lv_directory
*       properties      =
*       properties_attr =        business_object = ls_business_object
*       parent_folder   =
*       package_id      =      IMPORTING        loio            = ls_loio        phio            = ls_phio        error           = ls_error.

 


Viewing all articles
Browse latest Browse all 4552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>