CL_CRM_DOCUMENTS= CREATE_WITH_FILE

Hi all,
            Could any one tell me where does SAP stores the documents and links it with the transaction.
Regards.

DATA: ls_bor type sibflporb,
      lv_bor TYPE SWO_OBJTYP,
      lv_loio TYPE skwf_io,
      lv_phio TYPE skwf_io,
      lv_error TYPE skwf_error.
DATA: wa_result_tab TYPE string,
      result_tab TYPE STANDARD TABLE OF string,
      lin TYPE i,
      long_nombre TYPE i,
      long_total TYPE i,
      desplazamiento TYPE i,
      filename_aux TYPE skwf_descr.
CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
  EXPORTING
    iv_orderadm_h_guid               = guid
  IMPORTING
    EV_OBJECT_TYPE                   = lv_bor
  EXCEPTIONS
   ADMIN_HEADER_NOT_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.
MOVE:lv_bor TO ls_bor-typeid,
'BO' TO ls_bor-catid,
guid TO ls_bor-instid.
CALL METHOD cl_crm_documents=>create_with_file
EXPORTING
file_name = filename  
directory = path     
business_object = ls_bor
IMPORTING
loio = lv_loio
phio = lv_phio
error = lv_error.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.

Similar Messages

  • Call method cl_crm_documents- create_with_file not creating attachment

    Hi,
    I am trying to create attachment in a transaction type using cl_crm_documents->create_with_file. But it is not creating the same, instead gives error "Error loading file &".
    I am uploading a file with fields object_id, text, file name, description  and category.
    I have passed the parameters as follows:
    data: gref_obj           type ref to cl_crm_documents.
    create object gref_obj.
              gw_prop_attr-name           = 'BDS_KEYWORD'.
              gw_prop_attr-value          = gw_attach-category.
              append gw_prop_attr to gt_prop_attr.
              gs_business_object-instid   = gw_guid-guid.(object guid)
              gs_business_object-typeid   = gv_object_type.(object type)
              gs_business_object-catid    = 'BO'.
              call method gref_obj->create_with_file
                exporting
                  file_name       = gw_attach-f_name (name as provided in my uploaded file, in my case it is test)
                  directory       = p_floder (C:\Attachment\)
                  properties      = gt_prop_attr
                  business_object = gs_business_object
                importing
                  phio            = gs_phio_id
                  loio            = gs_loio_id
                  error           = ls_error.
    Please help me on this. I doubt the directory that I am giving is wrong.
    Thanks.

    Hi,
    Please go through this...
    Re: Problem attach document with the FileUpload UI.
    Cheers,
    Kris.

  • How to find values for fields of  PROPERTIES  in cl_crm_documents= create_w

    Hi  everyone ,
    I am attaching files from local disk to CRM Opportunity by using method cl_crm_documents=>create_with_file .
    I am able to see files in SAP frontend portal , but the problem is some of the fields in properties tab coming blank .
    So how to find the NAME and VALUE fields of PROPERTIES structure in create_with_file  .
    Right now i am passing below fields these ar coming
    "-----Filling Properties structure
        ls_prop-name   = 'KW_RELATIVE_URL'.
        ls_prop-value  = wa_path-ls_name.
        APPEND ls_prop TO lt_prop.
        ls_prop-name   = 'DESCRIPTION '.
        ls_prop-value  = 'Strategy paper for action plan1' .
        APPEND ls_prop TO lt_prop.
    ls_prop-name  = 'LANGUAGE'.
        ls_prop-value = sy-langu.
        APPEND ls_prop TO lt_prop.
    but fileds like Attachment Type , Document Status ,  Line of Business , Business Year and Country of LE are not coming
    as i frontend is a CRM custom application to mentain opportunity .
    at prasent i am passing attribute Names and default values of these fields to properties structure  but then also i am unable to see it in front end.
    Please help if anybody knows where to find the NAME and VALUE fields for thse parameters.
    Regards
    Chetan

    I used insert statement to populate these fields in table CRMD_KW_DOC_GEN as these are custom fields.
    Regards
    Chetan

  • Help About Class CL_CRM_DOCUMENTS

    Hi ,
       When I use the class CL_CRM_DOCUMENTS~create_with_table to create a attachment for crm activity , the sy-subrc is 0 ,and I can see the attachment in crm activity ,but i can not browser the file ,the error message is 'open file error' , whether somebody come across same problem , or someone have sample code for create attachment ,thanks very much .
    Jialiang.Qiu

    DATA: ls_bor type sibflporb,
          lv_bor TYPE SWO_OBJTYP,
          lv_loio TYPE skwf_io,
          lv_phio TYPE skwf_io,
          lv_error TYPE skwf_error.
    DATA: wa_result_tab TYPE string,
          result_tab TYPE STANDARD TABLE OF string,
          lin TYPE i,
          long_nombre TYPE i,
          long_total TYPE i,
          desplazamiento TYPE i,
          filename_aux TYPE skwf_descr.
    CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
      EXPORTING
        iv_orderadm_h_guid               = guid
      IMPORTING
        EV_OBJECT_TYPE                   = lv_bor
      EXCEPTIONS
       ADMIN_HEADER_NOT_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.
    MOVE:lv_bor TO ls_bor-typeid,
    'BO' TO ls_bor-catid,
    guid TO ls_bor-instid.
    CALL METHOD cl_crm_documents=>create_with_file
    EXPORTING
    file_name = filename   
    directory = path      
    business_object = ls_bor
    IMPORTING
    loio = lv_loio
    phio = lv_phio
    error = lv_error.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    Edited by: visheshagarwal1 on Apr 7, 2011 8:36 AM

  • Problem attach document with the FileUpload UI.

    I am trying to attach a document to a CRM Notification from application Web Dynpro for ABAP, I have build a FM that includes the method
    cl_crm_documents=>create_with_file
    When I test the FM from SE37 transaction, I am able to attach a file from a local disk succesfully. But If I call this FM from Web Dynpro, trying to do the same operation, document cannot attach to notification and Method returns the following error: “Error loading file ” (Class of message CRM_DOCUMENTS and number 100).
    Thanks in advance.
    FUNCTION z_crm_anexar_docs_inc.
    ""Interfase local
    *"  IMPORTING
    *"     VALUE(GUID) TYPE  CRMT_OBJECT_GUID
    *"     VALUE(FILENAME) TYPE  SDOK_FILNM
    *"     VALUE(PATH) TYPE  SDOK_CHTRD OPTIONAL
    *"     VALUE(DESCRIPTION) TYPE  STRING
      DATA: ls_bor   TYPE sibflporb,
            lv_loio  TYPE skwf_io,
            lv_phio  TYPE skwf_io,
            lv_error TYPE skwf_error.
    MOVE: 'BUS2000116' TO ls_bor-typeid, "aqui le pasamos el tipo de objeto que estemos tratando
            'BO'         TO ls_bor-catid,
            guid         TO ls_bor-instid.
      DATA: wa_result_tab TYPE string.
      DATA: result_tab TYPE STANDARD TABLE OF string.
      DATA: lin TYPE i.
      DATA: long_nombre TYPE i.
      DATA: long_total TYPE i.
      DATA: desplazamiento TYPE i.
      DATA: filename_aux TYPE skwf_descr.
      SPLIT filename AT '' INTO TABLE result_tab.
      DESCRIBE TABLE result_tab LINES lin.
      READ TABLE result_tab INDEX lin INTO wa_result_tab.
      IF sy-subrc EQ 0.
        long_total = STRLEN( filename ).
        long_nombre = STRLEN( wa_result_tab ).
        desplazamiento = long_total - long_nombre.
        path = filename(desplazamiento).
        filename = wa_result_tab.
        filename_aux = wa_result_tab.
      ENDIF.
    aqui le pasamos el guid del documento sap crm que estemos tratando
      CALL METHOD cl_crm_documents=>create_with_file
        EXPORTING
        aqui le pasamos el nombre del fichero que queremos anexar
          file_name       = filename
        'c:' "aqui le pasamos la ruta del fichero que queremos anexar
          directory       = path
          business_object = ls_bor
        IMPORTING
          loio            = lv_loio
          phio            = lv_phio
          error           = lv_error.
    aqui llamamos a este método porque de lo contrario el sistema crea el anexo con el nombre que
    le da la gana y no con el que hemos indicado en el punto anterior. por eso renombramos el fichero
      CALL METHOD cl_crm_documents=>rename_object
        EXPORTING
          is_io   = lv_loio
          iv_name = filename_aux.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      IMPORTING
        RETURN        =
    ENDFUNCTION.
    Call from WDA.
      CALL FUNCTION 'Z_CRM_ANEXAR_DOCS_INC'
        EXPORTING
          guid              = guid_jarcode
        guid              = stru_importing-guid
          filename          = stru_importing-filename
        PATH              =
          description       = stru_importing-description.
    ENDMETHOD.
    Thanks in advance.

    Hi,
    you can use below steps,
    1. Create attribute file_content of type xstring and bind it to data attribute of FileUpload UI .
    2.Put the button Upload next to your FileUpload UI element and write action upload.
    3. in action, read the attribute file_content and pass it to below code
    Convert XString to String
      CALL METHOD cl_abap_conv_in_ce=>create
        EXPORTING
          input       = file_content
          encoding    = 'UTF-8'
          replacement = '?'
          ignore_cerr = abap_true
        RECEIVING
          conv        = loc_conv.
    *Read the file contents
      TRY.
          CALL METHOD loc_conv->read
            IMPORTING
              data = file_content_string
        CATCH cx_sy_conversion_codepage.
    *-- Should ignore errors in code conversions
        CATCH cx_sy_codepage_converter_init.
    *-- Should ignore errors in code conversions
        CATCH cx_parameter_invalid_type.
        CATCH cx_parameter_invalid_range.
      ENDTRY.
    4. After that u may want to put the contents into internal table so use
      SPLIT file_content string AT crlf INTO TABLE itstring_tab.
    5. At last, fill the internal table
    loop AT it_string_tab INTO wa_string.
        CHECK sy-tabix GT 1 .    "skip the first line
        SPLIT wa_string AT ',' INTO .....
    endloop.
    here in my code i have splitted the contents at comma as i had .csv file . so based on file type u can split it and fill internal table.
    hope this will help you.
    Regards,
    Chandra
    (Award points if Helpful)

  • How to Attach files in background .

    HI all ,
    How can I attach files in background in CRM .
    Thanks ,
    Naval Bhatt .

    DATA: ls_bor type sibflporb,
          lv_bor TYPE SWO_OBJTYP,
          lv_loio TYPE skwf_io,
          lv_phio TYPE skwf_io,
          lv_error TYPE skwf_error.
    DATA: wa_result_tab TYPE string,
          result_tab TYPE STANDARD TABLE OF string,
          lin TYPE i,
          long_nombre TYPE i,
          long_total TYPE i,
          desplazamiento TYPE i,
          filename_aux TYPE skwf_descr.
    CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
      EXPORTING
        iv_orderadm_h_guid               = guid
      IMPORTING
        EV_OBJECT_TYPE                   = lv_bor
      EXCEPTIONS
       ADMIN_HEADER_NOT_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.
    MOVE:lv_bor TO ls_bor-typeid,
    'BO' TO ls_bor-catid,
    guid TO ls_bor-instid.
    CALL METHOD cl_crm_documents=>create_with_file
    EXPORTING
    file_name = filename  
    directory = path     
    business_object = ls_bor
    IMPORTING
    loio = lv_loio
    phio = lv_phio
    error = lv_error.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    more details here ..
    http://scn.sap.com/community/crm/webclient-ui-framework/blog/2013/09/30/attachment-to-business-partner-or-product-in-crm

  • How to attach documents to crmd_order

    can any one tell me how to attach document in crmd_order through fm

    Use cl_crm_documents=>create_with_file method.
    Regards.

  • Error in attaching a Service Order from BSP

    I am trying to attach a document to a CRM Service Order from BSP.
    Im using the following FM
    cl_crm_documents=>create_with_file
    When I test the FM from SE37 transaction, I am able to attach a file from a local disk succesfully and the service order is getting updated. But If I call this FM from BSP, trying to do the same operation, document cannot attach to service order and Method returns the following error: “Error loading file <NameFile>” (Class of message CRM_DOCUMENTS and number 100).
    Thanks in advance.

    Hello Shravan,
    Check this weblog:
    /people/raja.thangamani/blog/2007/06/27/bsphow-to-create-attachment-in-business-transactions
    Best regards and good luck,
    Bruno

  • Upload Attachments

    Hi Gurus,
    I have a requirement where client is migrating from People Soft to CRM 7.0. There is a data conversion happening and we need to migrate attachments for Cases.
    There is a Content Server which is installed at CRM end which will handle new attachments which can be uploaded from the local workstation.
    I want to upload the attachments for the previous data which is migrated into CRM from PeopleSoft during Data Conversion process. Is there any FM or class method which I can use to do that?
    Thanks in advance
    Vishal

    Hi Preethi,
    You can use Class CL_CRM_DOCUMENTS for uploading attachments to business objects in CRM.
    If you are uploading file from Presentation server, call method CREATE_WITH_FILE and if you are uplading attachment from Application Server, use method CREATE_WITH_TABLE.
    The following code is an example of how to upload attachment from Presentation Server.
    CONSTANTS: c_activity TYPE crmt_subobject_category_db VALUE 'BUS2000123'.
    DATA: ls_bor_object  TYPE sibflporb.
    DATA: ls_object_id TYPE swotobjid.
    DATA: es_error TYPE  skwf_error .
    DATA: lt_properties TYPE sdokproptys.
    DATA: ls_properties TYPE sdokpropty.
    DATA: path TYPE string.
    DATA: targetpath TYPE string.
    DATA: path1 TYPE sdok_chtrd.
    DATA: wa_file_table TYPE file_info.
    DATA: it_files TYPE STANDARD TABLE OF file_info.
    DATA: x TYPE i.
    DATA: l_object_id TYPE crmt_object_id_db.
    DATA: l_object_id1 TYPE crmt_object_id_db.
    DATA: ext TYPE string.
    DATA: l_object_guid TYPE crmt_object_guid.
    DATA: lv_filename TYPE sdok_filnm.
    DATA: ls_phio TYPE skwf_io.
    DATA: rc TYPE i.
    data: l_filename TYPE string,
    *data: lv_filename(40).
            l_filesize TYPE i,
            l_filecontents TYPE TABLE OF sdokcntbin.
    CALL METHOD cl_gui_frontend_services=>directory_list_files
      EXPORTING
        directory                   = path
        filter                      = '*'
        files_only                  = 'X'
       directories_only            =
      CHANGING
        file_table                  = it_files
        count                       = x
      EXCEPTIONS
        cntl_error                  = 1
        directory_list_files_failed = 2
        wrong_parameter             = 3
        error_no_gui                = 4
        not_supported_by_gui        = 5
        OTHERS                      = 6
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    l_object_guid = 'DF2F786D3130ECF1A605002655269F60'.
    CHECK x IS NOT INITIAL.
    LOOP AT it_files INTO wa_file_table.
      lv_filename = wa_file_table-filename .
      CONCATENATE path lv_filename INTO path1.
      IF sy-subrc = 0.
        ls_object_id-objtype = c_activity.
        ls_object_id-objkey  = l_object_guid.
        CLASS cl_swf_utl_convert_por DEFINITION LOAD.
        ls_bor_object =
               cl_swf_utl_convert_por=>convert_bor_to_ibf( lv_filename ).
        ls_properties-name = 'KW_RELATIVE_URL'.
        ls_properties-value = lv_filename.
        APPEND ls_properties TO lt_properties.
        ls_properties-name = 'DESCRIPTION'.
        ls_properties-value = lv_filename.
        APPEND ls_properties TO lt_properties.
        CALL METHOD cl_crm_documents=>create_with_file
          EXPORTING
            file_name       = lv_filename
            directory       = path1
            properties      = lt_properties
            business_object = ls_bor_object
          IMPORTING
            phio            = ls_phio
            error           = es_error.
      ENDIF.
      CLEAR: wa_file_table,l_object_id,l_object_guid,l_object_id .
    endloop.
    I hope this helps.
    Thanks
    Vishal

  • Add attachment to Opportunity using Enterprise Services

    Hi All,
    Is there a way I can add attachments (doc,txt) to a opportunity through the services exposed by Enterprise Services in CRM 7.0. Because the stubs generated for "Create Opportunity" does not have option to add attachments.
    If I browse to the ES Workplace and check the "Create Opportunity", I do not see any method that would allow me to add attachment to the Opportunity (OpportunityCRMCreateRequest_sync).
    Please let me know what am I missing.
    Regards,
    Naveen

    Hi Naveen,
    I have done one requirement attach a document from for already created business partners from external file. In that file I have Business partner number, file path and description.   so, My code is like this. I think it will help ful for you. I dont no wether your requirement will full fill but the coding may help ful for your requirement. try it.. gud luck.. any doubts please ask me i will help u...
    types: begin of ty_upload,
             bp_no type but000-partner,
              path  type sdok_chtrd,
       ls_description type sdok_titel,
            end of  ty_upload.
    data: it_upload type standard table of ty_upload. "Internal table for upload
    data: wa_upload type ty_upload.
      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.
      data: ls_guid type ty_upload.
      data: lt_guid type standard table of ty_upload.
      data: ls_path type ty_upload.
      data: lt_path type standard table of ty_upload.
      data: wa_properties type sdokpropty.
      data: lt_properties like wa_properties occurs 0.
      data ls_but000 type but000.
      select single *
        from but000
       into ls_but000
        where partner = wa_upload-bp_no.
    ls_business_object-instid = wa_but000-partner_guid.
      ls_business_object-typeid =  'BUS1006'. "for bp
      ls_business_object-catid = 'BO'.
      wa_properties-name = 'DESCRIPTION'.
      wa_properties-value = wa_upload-ls_description.
      append wa_properties to lt_properties.
      wa_properties-name = 'LANGUAGE'.
      wa_properties-value = 'EN'.
      append wa_properties to lt_properties.
      clear ls_guid.
      types: begin of ty_path,
              ls_path type sdok_chtrd,
              ls_name type skwf_descr,
               end of  ty_path.
      data: wa_path type ty_path.
      data: it_path type standard table of ty_path.   "Internal table for path split
      call function '/SAPDMC/LSM_PATH_FILE_SPLIT'    "FM for splitting the file path (split file name and directory)
        exporting
          pathfile = wa_upload-path
        importing
          pathname = wa_path-ls_path
          filename = wa_path-ls_name.
      append wa_path to it_path.
      lv_nombre_fichero = wa_path-ls_name.
      lv_directory = wa_path-ls_path.
      call method cl_crm_documents=>create_with_file
        exporting
          file_name       =  lv_nombre_fichero
          directory       =  lv_directory
          properties      =  lt_properties
         properties_attr =  lv_description
          business_object =  ls_business_object
         parent_folder   =
         package_id      =
        importing
          loio            =  ls_loio
          phio            =  ls_phio
          error           =  ls_error.
      call method cl_crm_documents=>rename_object
        exporting
          is_io   = ls_loio
          iv_name = wa_path-ls_name.
    if sy-subrc = 0.
      message 'Attachment has been finished successfully' type 'S'.
    endif.
    Regards,
    Ramz...

  • Insert document attached located in sap server(=legacy syst)

    Hello,
    I wish to program an interface to insert document attached (in particular : the pictures) in the Crm product in a specified repertory. (transaction : “COMMPR01”, tab : « Document »)
    I found and tested methods CL_CRM_DOCUMENTS-CREATE_WITH_FILE
    To create, the picture (if there is located in my computer = presentation server) is well inserted into the article (parameter business object)in the repertory desired (parameter: parent_folder) but I have a problem.
    => I want to insert pictures which are located in MY SAP SERVER. (in MY LEGACY SYSTEM) (/usr/sap/filein..)
    I have the same problem with the function FM : COM_PROD_MATERIAL_MAINTAIN_API
    By advance, thank you for your assistance.
    Kind regards,
    Greetings,
    Servane Coppalle

    Hi Coppalle,
    I am trying to use CL_CRM_DOCUMENTS-CREATE_WITH_FILE to upload the image from presentation server, Can you please suggest me what all parameter and what value i have to pass to execute this method.
    I am trying to get it done but i am not getting the result.
    Thanks in Advance.
    Regards,
    Manoj Tiwari

  • Upload Image in Document TAB in BP

    I need to upload a  image under the document tab in BP transaction programmatically.
    Can anyone suggest any Function module through which i can update the same and also delete the same if required.
    What are the tables in which this data is stored. Kindly help,its urgent.Thank you in advance.

    Hi Dilip,
    Please go through the following code,
    aqui le pasamos el guid del documento sap crm que estemos tratando
      CALL METHOD cl_crm_documents=>create_with_file
        EXPORTING
        aqui le pasamos el nombre del fichero que queremos anexar
          file_name       = filename
        'c:\' "aqui le pasamos la ruta del fichero que queremos anexar
          directory       = path
          business_object = ls_bor
        IMPORTING
          loio            = lv_loio
          phio            = lv_phio
          error           = lv_error.
    Let me know if you more info on this.
    Regards,
    Abhijit G. Borkar

  • FM for atttaching document in CRMD_ORDER transaction in background.

    concatenate  c_filename sy-datum  '_' sy-uzeit '.html' into :" downloading file in the common path
                                                             gi_filename1.
              concatenate c_dir gi_filename1  into gi_filename.
              open dataset gi_filename for output in text mode encoding
                                       default  message gi_msg_text.
              if sy-subrc = 0.
             LOOP AT t_data INTO wa_data.
                transfer wa_mail_details-email_content to gi_filename.
             ENDLOOP.
              else.
                gv_act_flag = c_flag .
                fault_data-fault_text   = gi_msg_text.
                fault_data-fault_url    = c_url.
                fault_details-severity  = c_severity.
                fault_details-text      = gi_msg_text.
                fault_details-id        = c_id.
                fault_details-url       = c_detailsurl.
                append fault_details to fault_data-fault_detail.
              endif.
              close dataset gi_filename.
    *Using the below Method to link the file in the attachment tab " Attaching as a attachment
              call method cl_crm_documents=>create_with_file
                exporting
                  file_name       = gi_filename1
                  directory       = c_dir
                  business_object = gi_bus_obj
                importing
                  loio            = gi_loio
                  phio            = gi_phio
                  error           = gi_error.
              if sy-subrc is  initial.
                commit work.
              else.
                gv_act_flag = c_flag .
                fault_data-fault_text   = c_text1.
                fault_data-fault_url    = c_url.
                fault_details-severity  = c_severity.
                fault_details-text      = c_text1.
                fault_details-id        = c_id.
                fault_details-url       = c_detailsurl.
                append fault_details to fault_data-fault_detail.
              endif.
    pls find the above code for attaching the attachment as file.
    this works fine in foreground. but its not working in background.
    pls tell me whether i need to change any FM to link file in background.
    thanks.
    Edited by: Shantha Sheela on Jan 16, 2009 6:50 AM

    Thanks PePe for your answer. Meanwhile I have found a solution my self.
    ls_bor-instid = i_guid.
      ls_bor-typeid = 'BUS2000116'.                             "#EC NOTEXT
      ls_bor-catid  = 'BO'.                                     "#EC NOTEXT
      cl_crm_documents=>get_info( EXPORTING business_object       = ls_bor
                                  IMPORTING ios_properties_result = ct_order_links
                                            phios                 = lt_phios
                                            loios                 = lt_loios
                                            phioloios             = lt_lpios ).
    For result datatypes check the method exporting paremeter.
    The parameter
    i_guid
    is the guid of the business transaction.

  • Attach document with method  CREATE_WITH_FILE

    Hello,
    I want to attach a document of my harddisk to an activity. Therefor  I want to use method CREATE_WITH_FILE.  But what parameters do I need to give the method for attaching a document to an activity ?
    Hope spmeone can help me !
    Thanks and best regards
    Gerd

    Hi Gerd,
    The parameters you need to fill for CREATE_WITH_FILE method of class CL_CRM_DOCUMENTS are,
    FILE_NAME = 'path of your file'.
    BUSINESS_OBJECT-INSTID = 'GUID of your activity'.
    BUSINESS_OBJECT-TYPEID = 'BUS2000126'.
    BUSINESS_OBJECT-CATID  = 'BO'.
    Followed by this method call CL_CRM_DOCUMENTS~RENAME_OBJECT since CREATE_WITH_FILE will attach your file to activity but the name will be of LOIO. so use method RENAME_OBJECT to rename the file in Activity.
    parameters for RENAME_OBJECT method,
    Structure IS_IO = 'Pass values of structure LOIO from CREATE_WITH_FILE method'.
    IV_NAME = 'Name you require'.
    Regards,
    Karthik.

  • Calling cl_crm_documents= get_with_file in Interaction Center (BSP) failes

    Hallo,
    I am trying to import an Word-Document from the SAP Content Management System(CMS) to a folder on the CRM-Server.
    The call of the method cl_crm_documents=>get_with_file fails if calling in a BSP-Aplication.
    The same call from a ABP Report is successful.
    Does anybody know a solution for that?
    Thankx
    Afshin

    Hi Kumar,
    I'm not sure if it works ..
    but just give a try ..
    open the attachment in editable mode in SAP .. check the windows temp directory .. in the path ..
    C:\Documents and Settings\Administrator\Local Settings\Temp\<Directory GUID>\file.ext
    Normally SAP stores the temporary file in the above location.
    open this file and save it in ASCII format ..
    then run your code..
    regards
    Sandeep

Maybe you are looking for

  • Supprise Formatting got rid of Photos- Any chance of recovery?

    I acciddentally formatted my mothers' iPhone, therefore I lost my pictures. Beforehand, an attempt to save a back up actually failed, I didnt pay attention I must admit...but surely there is a file that stores this information on, even if its only a

  • JPEG 2000 2.0 and PSE7

    In Photoshop Element7 i can open a file saved as JPF (JPEG 2000 2.0) but i can't duplicate, do layers or do color variation with the image with the english version. I had the French version of PSE7 with no problems at all saving in JPEG or doing laye

  • Unexpected error whenever we click on Powerview reprort in Sharepoint

    Hi Getting below error message whenever we click on any of the powerview reports which are created in Shrepoint. Please guide me in resolving the issue. System.TypeLoadException: Error 0x80131522.  Debugging resource strings are unavailable.    at Mi

  • Component label and style

    Is it possible to get the component's single lable without having all the labels of the component appearing? Like, I'm trying to include the label into a text's .text the code I'm using now is MoVName.text=MoV.labels; but it gave me all the labels th

  • Which MacPro doesn't work with Windows 7

    One question for curiosity and one I need to act on: I've got a MacPro 2x2.66 GHz Intel Xeon with 5GB Ram. Is there a way for me to tell whether I can run Windows7 in a BootCamp partiton? The documentation seems to indicate that "mid 2006" version of