Skip to Content
author's profile photo Former Member
Former Member

Delete an attachment to Opportunity

Hi All,

I want to know how to delete an attachment to Opportunity and client.For this I am using the class CL_CRM_DOCUMENTS and method DELETE.

Using this I am able to delete the attachment but not the corresponding Attachment Guid value from database table SKWG_BREL.

Clarify me on this,why its not deleting from database table.

Please tell me the code.

Thanks,

Saritha.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2007 at 02:39 PM

    Hi Saritha,

    For that method pass the values bussiness_object and IOS.

    for the opportunity get the object_guid from crmd_orderadm_h.

    ls_bo-instid = object_guid. "header guid of oppt

    ls_bo-typeid = 'BUS2000111'. "this is for opportunity

    ls_bo-catid = 'BO'.

    clear lt_ios.

    wa_ios-objtype = 'L'.

    MOVE wa_object_list-class TO wa_ios-class.

    MOVE wa_object_list-objid TO wa_ios-objid.

    append wa_ios to lt_ios.

    CALL METHOD cl_crm_documents=>delete

    EXPORTING

    business_object = ls_bo

    IOS = lt_ios

    importing

    error = ls_error.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.