Header Ads

Check and create opportunity attachements


FM to check the opportunity attachment link CRM_PPM_GET_OPP_ATTACHMENT_UI
 
and also following code to get the details of the attachment ..
 
 
DATA : ls_swo_object_id       TYPE swotobjid ,
       ls_borident            TYPE borident,
       ls_ibf_object_id       TYPE sibflporb,
       lt_attachment_ids      TYPE skwf_ios,
       lt_attachment_props    TYPE crm_kw_propst,
       ls_attachment_id       TYPE LINE OF skwf_ios,
       lt_file_info           TYPE sdokfilacis,
       ls_file_info           TYPE sdokfilaci,
       ls_orderadm_h         TYPE crmt_orderadm_h_wrk.


ls_borident-logsys  = 'CRDCLNT100' ."ls_orderadm_h-logical_system.
ls_borident-objtype =  'BUS2000111'. "ls_orderadm_h-object_type.
ls_borident-objkey  = 'E189CF7A32A688F1A21378ACC0FC0726'. "ls_orderadm_h-guid..

MOVE-CORRESPONDING ls_borident TO ls_swo_object_id.

ls_ibf_object_id = cl_swf_utl_convert_por=>convert_bor_to_ibf( ls_swo_object_id ).

CALL METHOD cl_crm_documents=>get_info
  EXPORTING
    business_object       = ls_ibf_object_id
    newest_only           = ' '
  IMPORTING
    loios                 = lt_attachment_ids
    ios_properties_result = lt_attachment_props.

LOOP AT lt_attachment_ids INTO ls_attachment_id.
  CALL METHOD cl_crm_documents=>get_with_table
    EXPORTING
      loio             = ls_attachment_id
    IMPORTING
      file_access_info = lt_file_info.

ENDLOOP .
 
Powered by Blogger.