Delete attachment linked to activity in ICWEB

Hello
I have implemented the deltion of attachment using following code. the commands went sucessfull but it is not deleting attachment(which is linked to activity/interaction record)
lr_entity_col = lv_bo->get_related_entities( iv_relation_name = cl_crm_cm_genil_comp=>gc_rel_bo_document_ref ).
lv_bo = lr_entity_col->get_first( ).
lv_bo->delete( ).
lv_core->modify( ).
lv_transaction = lv_core->get_transaction( ).
lv_transaction->save( ).
lv_transaction->commit( ).
Does anybody implemented similar logic?
Regards,
Laxman

I have added custom tab to store attach the files to Interaction recrod i.e business activity.
I m using following way to add attachment
create document child
  lv_core = cl_crm_bol_core=>get_instance( ).
  lv_transaction = lv_core->begin_transaction( ).
  IF lv_bo->lock( ) = if_genil_boolean=>true.
    if lv_bo->is_changeable( ) = abap_true.
      TRY.
          lv_doc = lv_bo->create_related_entity(
                     cl_crm_cm_genil_comp=>gc_rel_bo_document_ref ).
        CATCH cx_crm_genil_model_error.
        CATCH cx_crm_genil_duplicate_rel.
      ENDTRY.
    endif.
regards,
Laxman

Similar Messages

  • Delete Attachment link and the launchWebdynpro button in the UWL iview

    Hi,
    Can anyone help me in deleting or hiding the Attachment link and the launchWebdynpro button in the UWL iview. I dont want to do it in the iview properties which would affect all the tasks. Is there a way I can do it in the backend.\
    I appreciate the help.
    Thanks

    Hi Surjith,
    I have the same problem. How can I remove the link? After I called the mentioned function module, the attachment was removed (content) but in the UWL the file name is still there:
    From UWL:
    myFile.pdf by WF-BATCH (94 kb)
    myDeletedFile.pdf   <-- I removed this one with the function module
            CALL FUNCTION 'SAP_WAPI_ATTACHMENT_DELETE'
              EXPORTING
                workitem_id     = me->mv_wf_instance_id
                att_id          = ls_att_id
                delete_document = abap_true
              IMPORTING
                return_code     = lv_return.
    Could you please help me?
    Thanks,
    Thomas

  • Delete Attachment in activity/interaction record ICWEB ???

    Hello
    I have implemented the deltion of attachment using following code. the commands went sucessfull but it is not deleting attachment(which is linked to activity/interaction record)
    lr_entity_col = lv_bo->get_related_entities(  iv_relation_name =  cl_crm_cm_genil_comp=>gc_rel_bo_document_ref ).
    lv_bo  =   lr_entity_col->get_first( ).
           lv_bo->delete( ).
           lv_core->modify( ).
           lv_transaction = lv_core->get_transaction( ).
           lv_transaction->save( ).
           lv_transaction->commit( ).
    Does anybody implemented similar logic?
    Regards,
    Laxman
    Edited by: laxman on Jan 29, 2008 7:26 PM

    Hi Laxman,
          The code you have mentioned is fine.
         But the bug might exist in UI or BOL layer. Just to be sure that save is successful, I always use the below code. You may try the same.
      IF lv_transaction->check_save_needed( ) EQ abap_true.
        IF lv_transaction->save( ) = abap_true.
    Regards,
    Manas.

  • GOS - Attachment - Link is not deleting from SRGBTBREL

    I have created custom transaction and this have option to attach desktop files (ie Word, Xls, PPT, PDF) etc into this transaction. For this i am using class CL_GOS_MANAGER.
    After the attachment sometimes users will delete the attachments from attachment list.
    My problem is some attachment links are not deleted completely  from SRGBTBREL (Link Table) . Because of this next time users displaying the attachment list still the deleted entries are showing in the list.
    If users double clock  it is giving a error message "Document does not exist" ( message class SO and message Number 006) .
    Any body come across this kind of scenario?
    Given below is the code for deleting the attachments
    * Object creation of GOS View
        create object gos_view
          exporting
            ip_mode = 'D'.                     " Display Mode
    * Start GOS Service for attachement view
        i_viewobj-objtype = 'YATT_ATTA'.
        i_viewobj-objkey = yatthdr-docno.
        call method gos_view->start_service_direct
          exporting
            ip_service = 'VIEW_ATTA'
            is_object  = i_viewobj.
    a®s.
    Edited by: a®s on Feb 18, 2008 3:20 PM

    Mylene,
    Thanks for your info. I already saw this note. Please share if you any info how we can delete the SRGBTBREL links completely using class  CL_GOS_MANAGER?
    I already run the program RSGOSRE01 (suggested in the note 569123) But nothing is shown. But the document showing in the SRGBTBREL links it have attachment
    For example , the following are the links from SRGBTBREL
    BRELGUID                         RELTYPE      INSTID_B
    475E7A046A581C0EE1000000A3F331A3 ATTA         FOL27000000000004EXT32000000033688
    475E828FD2561C0DE1000000A3F331A3 ATTA         FOL27000000000004EXT32000000033775
    476515A0A02A0E78E1000000A3F331A3 ATTA         FOL27000000000004EXT32000000034502
    47651683A02A0E78E1000000A3F331A3 ATTA         FOL27000000000004EXT32000000034503
    Here the last link still showing in the table , but i find there is not attachment
    47651683A02A0E78E1000000A3F331A3 ATTA         FOL27000000000004EXT32000000034503
    Any more Info?
    Edited by: a®s on Feb 19, 2008 8:58 AM

  • Is there a way to delete all links at once?

    I have a document with a couple hundred links. How can I bulk delete them all? I know I asked this same question a few years ago, but I can no longer find the "my stuff" link in the Adobe forums, and my previous post is not coming up when I search the question. Thanks for the repeat help.
    ID CC 2014.2
    OSX 10.8.5

    Here's your old thread: bulk deletion of links?
    I found this by going to your forum profile and clicking the Activity button.

  • Add Attachment link doesn't open attachment window

    I'm trying to debug a custom page, written by someone else. It's in the recruitment module, and delivered subpages HRS_CE_A_RES_SBP and are included to allow attach/view/delete of attachments.
    When the Add Attachment link is clicked, it should open a window that lets the user enter a filename or browse, but on this custom page, nothing happens.
    Because the delivered code is unmodified, I suspect that there is some setup that hasn't been done. The component does contain table HRS_APP_ATTACH, which includes subrecord FILE_ATTACH_SBR. The component also contains record FILE_ATTACH_WRK.
    Can someone suggest my next step? Thanks.
    Mike
    HCM 9.0, PTools 8.49.20

    Generally Add attachment issues are enountered while setting up new regions for the reason URL not updated while setting up new region.
    In this table PSFILE_ATTDET a row is inserted temporarily with Oprid and deleted once the specified file is trasferred mentioned url successfully.
    Example: AddAttachment(&URL_ID, &ATTACHSYSFILENAME, &FILEEXTENSION, &ATTACHUSERFILE, &FILESIZE)
    works when &ATTACHUSERFILE =file-name and &URL_ID=gerurl(url.urlname) are given properly.Please check these parameters.

  • Attaching a commercial activity with a contract.

    Hi,
    I have a requirement to remove a commercial activity from an existing contract in CRM and re-tag with a new contract.  Is the function module CRM_ORDER_MAINTAIN is going to help in this purpose? If it does, can I have some clue like which parameter to use for this?

    Hi Kushal,
    I hope while you are deleting the link , you might be using the same details from CRM_ORDER_READ for it_doc_link including relation_id , only modification would be field BREL_MODE = "D" , which is for deletion.
    While assigning new link, don't copy parameters from CRM_ORDER_READ , all you need to fill is
    objkey_ a -  Fill preceding document guid  ( Activity)
    objkey_b  - fill Succeeding document guid   ( New Contract guid)
    brel_mode - 'A'  Create Mode
    brel_kind - 'A'
    reltype - ' VONA'.
    vona_kind - 'A'
    Do not fill relation id , as it will create a new relation id if you re trying to create a link between two documents . for update of existing link you need to provide the relation id ( as in case of deletion).
    Regards,
    Nithish

  • IProcurement attachment link issue

    Dear friends,
    I have an requirement where in iProcurement attachment link(If URL/web page) is opening in same window and if attachment is .txt or .pdf then its working fine and opening in a pop up window.
    Here I have to make changes for attachment link(If URL/web page)..it should open in a pop up or separate tab in IE.
    Here what I have done...
    I created a new table column and create duplicate of original column but with link item and trying to add a JAVA SCRIPT to open new pop up....now its working but here the issue is its working fine for the attachment of type URL/webpage but not working for doc attachments.
    Here my idea was to create a duplicate of ORIGINAL column with link ITEM and attache JAVA script then hide the Original one.
    Could any one suggest if I am heading towards wrong direction or right? or any approach to solve it.
    Yes we are in 11i instance.
    Regards,
    Prakash 

    You need to add entity map, this is precisely required if you have to fetch back the attachment.
    in entity map, provide Entity name ... (for convenience, put it to be same as your table name)
    Add Primay key, specify the view attribute ...which eventually gets saved as PK1_VALUE in attachment purpose.
    (this provides the link while retrieving attachments )
    Optionally you can add category map to entitymap...just specify category as MISC.
    Repeat the things above for second page, where you want to display attachments.
    Depending on your requirement, you can set Insert allowed, update allowed, delete allowed options in Entity map to false.
    and you are done!!!
    Thanks,
    Hrishikesh

  • The attachment link for the new hotmail is not working - 1 March 2013

    Hi there
    I have just recently upgraded to the new hotmail platform on 1 March 2013. Found out that the attachment file link is not active when you compose a new message. When you click on it, nothing happens. My current Safari version is 6.02. Before that, everything was well. I have posted this question on the microsoft community and got a reply with a link to post my concerns here instead. The new attachment link however is working on IE & Firefox browsers (I checked on my friends' browsers). Could someone please advice & help. Thank you
    Cyn05

    Hope this photo helps.

  • I was downloading podcast video in my itouch using wifi, but suddenly my wifi got disconnected and now there is a link in my podcast list which on opening uses wifi to play that video. I want to delete that link. Right to left swapping is not working.

    I was downloading podcast video in my itouch using wifi, but suddenly my wifi got disconnected and now there is a link in my podcast list which on opening uses wifi to play that video. I want to delete that link. Right to left swapping is not working.

    I bet this is too late but...
    Are you trying to print through the airport express wirelessly or the built in wireless of the lexmark? If you want to use the airport express, there is no need to mess with the wireless printing on the lexmark at all. The airport express will be easy to set up, all the wireless setups through the printers are a pain.

  • How to delete the links in the reading list

    How to delete the links in the reading list

    and if they don't delete, what's the next step?  I've stopped sync to iCloud for my iPad, but all of the articles say that they are "Waiting", and won't delete.

  • How do I delete a link in the link panel?

    I have moved an item out of the links folder on a project I am working on in IDCC and when opening the project it tells me, rightly, that a link is missing. When I go to the links panel I see the alert that the linked item is missing, which I know, and I want to delete the link in the links panel but see no option to do this, also the delete key does nothing when the item is highlighted, and right-click (^ click) offer no delete choice either. How can I delete this item in the links panel?
    TIA,
    Ken

    Amazing how the hot weather has affected me. Thank You Peter - so logical - I missed it while thinking of 15 other elements and a hurried deadline...

  • How to delete dead links

    Hello
    I would like to delete dead links in a PDF document. I use Visual C++ to create my code and generate an API plug-in for Acrobat 8. Can you give me a sample code to do it.
    Thanks
    David

    You are going to need to examine the Cos object for each link and see
    whether it meets your requirements of "dead" (which you've really just
    moved to "invalid destination" - when is a destination invalid?)
    The PDF Reference describes the types of PDF actions. There are more
    than you think, and some (JavaScript) virtually defy analysis. In
    broad terms the plug-in would call PDDocGetPage / PDPageRelease for
    each page in turn, then iterate through the Annots objects. There is a
    PDAnnot API, but going to the Cos API is likely to be needed in the
    end.
    Be sure to use an error handler so you never miss PDPageRelease, even
    if there is an error in the PDF: this is very important.
    Aandi Inston

  • How display attachment links in a list view in SharePoint 2013?

    Hi all,
    I'm looking for a way to display attachment links in a list in SharePoint 2013. There are few resources online to achieve this in SP2010 and SP07. Your help is much appreciated.
    Thank you.

    Hi Ram Sampath:
    You can use Event Receiver and create another list(ListA) to record your attachment link.
    Maybe your process is:
    Users add list items and attachments
    List event will be fired
    Use Event Receiver to get attachment url and then Write into ListA
    You also can refer to the following web site:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/b693eb84-b846-4f0f-93c1-276cf931c746/how-to-get-attachment-in-itemadded-event-receiver
    http://stackoverflow.com/questions/19077770/how-to-retrieve-list-item-attachments-with-sharepoint-2013-event-receiver-in-cor

  • Attachment Link Not appearing

    Hello Experts,
    Attachment link button is not appearing on the toolbar, Can anyone know how to Activate that button.
    Thanks.

    Hello,
    check this link:
    Activate GOS business application for object PREL
    I hope it helps you.
    Regards,
    Pedro

Maybe you are looking for