GOS Delete

Hi,
I have custom transaction with in i have given option to attach documents
using CL_GOS class. Each attachment is linked to document number.
      create object gos_manager
        exporting
           is_object            = i_borident
           it_service_selection = i_services
           ip_no_commit         = ' '
        exceptions
           object_invalid       = 1.
My question is if i am deleting a document i need to delete the attachment also from database.
I like to know what will be class i have to use for this.
Thanks
aRs

Hi,
I solved the issue.
Thanks
aRs

Similar Messages

  • Display and Manage Attachments of Generic Object Services in Webdynpro

    Hi All,
    I need to have a button in the webdynpro that when a user clicks it will pop up a table that display a list of files already attached to a Generic Object Services(GOS) and also allow the user to delete the attachments and upload new attachments.
    Can anyone advice me of any Function Modules or Methods that i can use to achieve those functions (retrive and display attachments in the GOS, delete existing attachment from GOS, upload new attachment to GOS).
    Thanks and Regards,
    weilong

    Hi
    You need to pass parameters as per the code below
    ****Data Types
      CONSTANTS:lc_dokob        TYPE dokob VALUE 'KNA1',
                  lc_dokar      TYPE dokar VALUE 'LEG',
                  lc_dappl      TYPE dappl VALUE 'BVO',
                  lc_sign       TYPE c VALUE 'I',
                  lc_option(2)  TYPE c VALUE 'EQ',
                  lc_docpart(3) TYPE c VALUE '000',
                  lc_docversion TYPE dokvr VALUE '00',
                  lc_status     TYPE dokst VALUE 'AL',
                  ls_attc-doknr    TYPE doknr,
                  ls_return TYPE bapiret2,
    *****Function Module
      CALL FUNCTION 'BAPI_DOCUMENT_DELETE_DIRECT'
            EXPORTING
              documenttype    = lc_dokar
              documentnumber  = ls_attc-doknr
              documentpart    = lc_docpart
              documentversion = lc_docversion
            IMPORTING
              return          = ls_return.
    Thanks
    Vishal

  • Disable 'Delete' button for posted invoices  in GOS Attachment List

    Hi,
    when i open the attachement list of a generic object i see the attached files. In this dialog i want to disable the   "Delete" ( attachment)  button  for Posted invoices ( In MIR4 tcode -> If the invoice is already posted it should not allow to delete the attachment )
    I read oss notes and some ides of copying diverse classes but nothing really helps.
    I found two badis
    GOS_SRV_REQUEST
    GOS_SRV_SELECT
    but i dont know where we have to write our code .
    I read so many posts related to attachments but all the places described about authoriztion object .
    Can you please give some ideas to disable the delete button for posted invoices.

    Hello,
    For GOS there is no SAP Standard authorization concept. The only way to
    manage GOS authorizations is implementing it via custom code as
    described in SAP Note: 491271.
    Please have a look at the SAP notes:
    491271 Authorizations for generic object services
    701609 Authorizations for services: Final classes
    For the use of S_OC_ROLE: this object states if a user is an office
    administrator he can create, modify or delete every document, even
    those created by other users. If the user is not an office admin, the
    user is still able to create his own attachments.
    Regarding to the issue, there is an role object S_GUI for upload.
    To match your inquiry, pleaes find the user's role and active the
    object S_GUI.
    Regards,
    David

  • Global Object Services (GOS) Attachments Deleted from Maintenance Task List

    We use the Global Object Services (GOS) Attachments function to attach Word and Excel Documents to Maintenance Task Lists (transactions IA02, IA09). Recently we noted that more than 300+ Attachments had been deleted/removed from the GOS list visible via IA03/IA09. We are at a loss for explaining how this occurred- all Attachments appear to have been deleted at once/instantaneously. We can see the underlying tables (SGOSHIST and others) still contain entries, but we do not understand why the Attachments are no longer visible in the GOS list via Maintenance Task Lists, or how the ability to access these via GOS can be restored. This is not occurring with other PM Object Attachments - only Task Lists. Any help or suggestions appreciated.

    Is it possible that there was some authorisation change in a role associated with task lists? That would be consistent with the immediate loss - but only in the task list area. Another thought - has anyone been doing any programming in the Generic Object Services Business Add-Ins (perhaps for another module?) - They might have inadvertently clobbered your use?
    Do you use the GOS notes functionality? Does that still work?

  • 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

  • Delete Attachment - GOS

    Hi,
    I am deleting a GOS attachment using following code.
    data: i_borident  type borident,
           i_attsrv    type ref to cl_gos_document_service.
      i_objectd-objtype = 'YATTA'.
      i_objectd-logsys  = 'BO'.
      i_objectd-objkey  = inumber.
      select * from srgbtbrel                " Get GOS Link
               into table i_srgbtbrel
               where instid_a eq i_objectd-objkey
                 and typeid_a eq i_objectd-objtype
                 and catid_a eq i_objectd-logsys
                 and reltype eq 'ATTA'.
      if sy-subrc eq 0.
        create object i_attsrv.
        loop at i_srgbtbrel.
         i_borident-objkey =  i_srgbtbrel-instid_b.
         call method i_attsrv->delete_attachment
           exporting
    *         is_object     = i_objectd
             ip_attachment = i_borident-objkey.
         commit work.
        endloop.
      endif.
    I am getting proper binary key from table SRGBTBREL and passing to method DELETE_ATTACHMENT , and getting sy-subrc eq 0, then also attachment are showing in the document. But if you are going thru service object delete it has been deleting the attachment perfectly. What is the error in the code?
    Thanks
    aRs
    Message was edited by:
            aRs

    Hi.
    You are missing  SO_OBJECT_DELETE_IN_VB:
        data ls_folder_id type soodk.
        data ls_object_id type soodk.
        loop at i_srgbtbrel.
          i_borident-objkey =  i_srgbtbrel-instid_b.
          call method i_attsrv->delete_attachment
            exporting
    *         is_object     = i_objectd
             ip_attachment = i_borident-objkey.
          ls_folder_id = i_borident-objkey(17).
          ls_object_id = i_borident-objkey+17(17).
          call function 'SO_OBJECT_DELETE_IN_VB'
             in update task
             exporting
               folder_id = ls_folder_id
               object_id = ls_object_id.
        endloop.
        commit work and wait.
    At the end of cl_gos_document_service->delete_attachment, there is the line:
    call function 'GOS_ADD_KEY' exporting ip_objkey = ip_attachment.
    This function adds the deleted item to table gt_obj_to_delete.
    Later, the standard makes the call to SO_OBJECT_DELETE_IN_VB at include LSGOSITSF01, form  DELETE_OBJECTS using gt_obj_to_delete.
    Thanks.

  • Deleting and Retrieving Attachments - GOS

    Hi All,
    Want to Know about attachments with GOS:
    1) How is the attachment stored?
    2) Where it is stored?
    3) Whether it is possible to retrieve the same attachment and delete the 
        attachment?
    Helpful answers are appreciated.
    Thanks,
    Bhaskar

    Hi,
    as i know the GOS Objects are store with the tools of SAP Office (objects in folders similar to attachments of your sap inbox).
    To retrieve and delete the attachments, you have to us fm/reports of package SGOS. There is a report RSGOSRE01 which shows how to delete attachments (and therefore, how to retrieve attachments).
    To create attachments, you can use the fms of function group sgosds.
    To list attachments, you may use method start_service_direct with export-paramenter ip_service = 'VIEW_ATTA' of class cl_gos_manager.
    I hope that will help you.

  • Delete GOS attachments ?

    Hi friends,
    I will write my question in 2 posts due to the length limitation.
    In my program i create different attachments like this:
      CONCATENATE 'UPC' ordendpago INTO is_object-objkey
                        SEPARATED BY space.
    * Indicamos el tipo de objeto URL
      is_object-objtype  = 'FMPSO'.
      rel_doc-objkey  = document_id.
      rel_doc-objtype = 'MESSAGE'.
    * Creamos la relación entre la op y el objeto enlazado
      CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'
           EXPORTING
                obj_rolea      = is_object
                obj_roleb      = rel_doc
                relationtype   = 'URL'
           EXCEPTIONS
                no_model       = 1
                internal_error = 2
                unknown        = 3
                OTHERS         = 4.

    At some point later, i want to delete some of these attachments created, and i do it like this:
      DATA: lo_list   TYPE REF TO CL_GOS_ATTACHMENT_LIST,
            lt_output TYPE TRL_BRLNK,
            ls_output TYPE SRL_BRLNK,
            lo_bor_item TYPE REF TO CL_SREL_BOR_ITEM,
            lo_bor_browser TYPE REF TO CL_SREL_BROWSER_ITEM,
            ls_bor_obj  TYPE borident,
            ls_folderid TYPE soodk,
            ls_objectid TYPE soodk.
            CONCATENATE 'UPC' i_ops-lotkz INTO lv_objkey SEPARATED BY space.
            ls_object-objkey = lv_objkey.
            ls_object-objtype = 'FMPSO'.
            create object lo_list
              exporting
                is_object        = ls_object
            IF sy-subrc <> 0.
            ENDIF.
            lt_output = lo_list->GO_LIST_VIEWER->gt_output.
    *       in lt_output i have all the attachments for this document
            LOOP AT lt_output INTO ls_output.
              lo_bor_browser = ls_output-objref.
              lo_bor_item ?= lo_bor_browser.
              ls_bor_obj  = lo_bor_item->gs_bor_object.
              ls_folderid = ls_bor_obj-objkey(17).
              ls_objectid = ls_bor_obj-objkey+17(17).
              CALL FUNCTION 'SO_OBJECT_DELETE'
               EXPORTING
                 folder_id                        = ls_folderid
    *            FORWARDER                        = ' '
    *            F_UNREAD_DELETE                  = ' '
                 object_id                        = ls_objectid
    *            OWNER                            = ' '
    *            PUT_IN_WASTEBASKET               = 'X'
    I do delete them, but my problem is that for every attachment deleted, a popup window with the attachment list is opened. Does anyone know how could I avoid that ?
    Thanks

  • Events available in Generic Object Services (GOS)?

    Hello everybody
    Searched around in SDN and also tried to find something useful in our system (SWO1) but can't find useful information on GOS events so I guess it probably doesn't exist?
    I'm searching a way to catch GOS events when someone adds, changes or deletes an attachment (URL) in the generic object services of an object, e.g. for a material master (BUS1001006). I'd like to create a change document for this and based on that to trigger some further processing for one of our interfaces.
    Anybody out there knowing how to achieve this?
    TIA and best regards,
    Renaud

    There's a couple of BaDIs with GOS names such as GOS_SRV_REQUEST that might help.  Otherwise I'd try using SE30 with lots of logging options set on to trace where you may be able to grab this info from.  GOS subscriptions may be another thing to look at.
    Jonathan

  • Generic Object Services u2013 GOS

    Hi Gurus
    I am not familiar with this in SAP and would appreciate some help please. With transaction CV04n we need to create an attachment on the document via the menu: GOS icon, Create, Create Attachment. The requirement is to delete the file from the local masjine after attaching it. Do we use a user exit or BADI for this? I cannot seem to find one where the breakpoint is after this popup for attaching the file.
    Regards B.Garlipp

    Using  following  u got GOS tool bar
    CREATE OBJECT lo_manager
        EXPORTING
          is_object    = la_obj
          ip_no_commit = space
        EXCEPTIONS
          OTHERS = 1.
    EXAMPLE
    REPORT  ZGOS.
    DATA: lo_manager  TYPE REF TO cl_gos_manager,
          la_obj      TYPE borident.
    START-OF-SELECTION.
      la_obj-objtype = 'TRDIR'.
      la_obj-objkey  = 'REPS'.
    * GOS toolbar
      CREATE OBJECT lo_manager
        EXPORTING
          is_object    = la_obj
          ip_no_commit = space
        EXCEPTIONS
          OTHERS = 1.
    * To generate output
      WRITE: 'GOS test for Customer'.

  • Delete/display/copy attachments in the workflow

    Hello,
    I'm creating a workflow which contains a pdf attachment. This attachment is created or inserted with the start form.
    During the workflow I want to delete the attachment and include a new one. Another thing I want to do is attach the pdf document to an other  BOR object.
    The thing what I have done so far but didn't work:
    I created an activity which moves the attachment to a method so I could work or change the attachment. I know their is an automatic binding with the container '_Attach_Objects' but I couldn't see the contents in the executed method when I read it out on the way below
    Here a part of the method to get the content of the '_Attach_Object' container.
    BEGIN_METHOD DISPLAY_ATTACHMENT CHANGING CONTAINER.
    DATA attach TYPE SWC_OBJECT OCCURS 0,
                ZSWC_OBJECT TYPE TABLE OF SWC_OBJECT.
    swc_get_table container '_ATTACH_OBJECTS' attach.
    SWC_GET_TABLE CONTAINER 'ZSWC_OBJECT' ZSWC_OBJECT.
    BREAK-POINT.
    END_METHOD.
    With the binding SWC_GET_TABLE I don't get the appropriate values in the container.
    How do I get the contents of the container in the method so I could delete the attachment on a nice way or to copy the content to a new BOR Object?
    Kind regards,
    Richard Meijn

    The reason why I want to change/delete the attachment is that I create a workflow for a signature registration.  The signature is on the pdf form. The signature is checked by employees and if the signature is not correct the workflow goes back to requestor to give in a new pdf document.
    The first pdf document has to be removed from the workflow and from the document storage. If the signature is correct I want to copy the attached document to a business object with a GOS  object.
    Kind regards,
    Richard Meijn

  • Services for Object (GOS) Attachement List not showing after attachment

    Hi All,
    I have created a new entry for the Generic Object Service List and this links to a copy of the CL_GOS_SRV_ATTACHMENT_CREATE class (Create attachment) with some additional logic. However, after attaching a file, the "Attachment List" does not become available until after I re-enter the transaction. The attachment list is showing the correct attachments.
    After some (understatement...) investigation, I found that even if I try and link the new service to a unchanged copy of the CL_GOS_SRV_ATTACHMENT_CREATE service in SGOSATTR, it is not working. It is attaching fine, but the "Attachment List" entry in the Services for Object Menu is still greyed out. If I attach the original class CL_GOS_SRV_ATTACHMENT_CREATE to the newly created entry it works fine. e.g. straight after I attach a file to the transaction, the menu entry becomes available.
    I can't find where the re-draw of the GOS menu happens and hence can not determine what is going wrong. Does anybody know if this is part of the Kernel or is this actually done in ABAP ?
    Am I missing something ? Debugging including system debugging for two days now and can't find it... very frustrating.
    Any help would be appreciated.
    Thanks,
    Wouter.

    Hi Wouter,
    I had originally posted to ask if you had resolved this since I was facing the same issue, but then deleted my post when I was able to get it working. Sorry, I didn't mean to initiate a flurry of activity in such an old thread.
    My scenario is I created a new GOS service entry in table SGOSATTR using transaction SGOSM. My new service uploads attachments to an external document management system via a call to a RESTful web service. The class I use in the SGOSM entry is a custom subclass of CL_GOS_SRV_URL_CREATE.
    I resolved this issue by taking a look at what CL_GOS_SRV_URL_CREATE does in its EXECUTE method. The key bits to refresh the GOS Attachment List with the new attachment are...
    raise event commit_required. " if SGOSM has the commit flag checked
    raise event service_succeeded
           exporting eo_service = me.
    These events tell any subscribers to go do their thing-- which in this case includes a refresh of the GOS Attachment List. So in the EXECUTE method of my custom subclass, after I call function BINARY_RELATION_CREATE, I raise these events...
    CALL FUNCTION 'BINARY_RELATION_CREATE'
       EXPORTING
           obj_rolea     = gs_object
           obj_roleb    = rel_doc
           relationtype = 'URL'
       EXCEPTIONS
           OTHERS       = 1.
    CASE sy-subrc.
       WHEN 0.
           MESSAGE s043(sgos_msg). " The attachment was successfully created
           RAISE EVENT commit_required.
           RAISE EVENT service_succeeded
                 EXPORTING eo_service = me.
       WHEN OTHERS.
           MESSAGE s042(sgos_msg). " The attachment has not been created
    ENDCASE.
    I hope this is helpful to you even though your initial implementation was a while back. Thanks for replying to my question though!!
    Cheers,
    Amy

  • GOS : Attachment list

    Hi All ,
    I would like to disable the Change and Delete buttons for the Service : Attachment list in GOS.
    Please let me know how can i achieve this.
    Helpful answers will surely be rewarded.
    Thank you
    Srinivas

    Hi Raja,
    Can you be more specific..I want to disable the buttons for the Attachment list service...
    Also if you can provide me the example code..that will be helpful...
    Thank you
    Srinivas

  • Disabling delete button in service object list fom VA03

    Hi all,
    i want to disable the delete and change button in attachment list of service object list (GOS) IN T CODE  VA03.
    I have found that it can be done by modifying the method  CHECK_STATUS of class CL_GOS_SRV_ATTACHMENT_LIST,
    and then calling it in t code  SGOS.
    i have copied this class to a Z CLASS but unable to modify the method it asks for access key.
    any help is highly appreciated with example.
    thanks,
    pankaj gupta

    Hello,
    The authorizations in GOS has nothing to do with the authorization in
    application level, e.g. in VA03. In standard you can use the new
    authorization object S_GOS_ATT from SAP note: 1293080.
    Otherwise:
    A possible workaround could be the following:
    Without an authorization the attachments are only deletable by the
    owners or by users with sapoffice administrator authorization. If you
    do not give users this sapoffice admin authorization, than only the
    owners are able to delete the attachments. See SAP note: 552127
    (point 3).
    OR due to a modification some functionalities can be restricted.
    For more information you can read the SAP note: 491271.
    Regards,
    David

  • Deleting attachments in a modul pool

    Hi Gurus,
    Here in this case I am using GOS..
    Say I have a change transaction. I went into that transaction in change mode. In this transaction I can attach any docs. If I open the attachment in change mode and edit something and save it, it perfectly saves and comes back to the transaction in change mode. Now I donw want to save my changes and hence comes out of the transaction without saving, but by now whatever I have changed in the attachment are already saved even though I didnot save my transaction.
    Now I am trying to attach the documents using FM: SO_WIND_ATTACHMENT_CREATE_API1(as my purpose is not solved in using GOS). So individually I am creating the attachments, editing. Now I want to delete the attachment.
    Question: Is there any function module to delete such attachments??
    Thanks in advance..
    Please revert back for any clarifications..
    Regards,
    Santhosh

    hi,
    You can use following FM's --
    SO_OBJECT_DELETE      
    SO_OBJECT_DELETE_ALL  
    I am assuming that you have the Object ID/ Fol ID available at the time of calling "deletion functionality"
    Thanks,
    Amit

Maybe you are looking for

  • In MIRO transaction (enter incoming invoice) system brings used positions.

    Hi All, In MIRO transaction (enter incoming invoice) system brings used positions (items) as available. It shouldn't work like that. Enclosed you can find a print screen from MIRO transaction. Both items in this order have already been used but still

  • How do i put the new icons for iworks on the toolbar

    how do i put the new icons for iworks on the toolbar

  • Percentages on the scenario dimension

    This must be a common task but I cannot seem to get the right answer.In simplified terms I have various dimensions including:-Accounts with Sales, Raw Mats, Manufacturing, Distribution, Admin Exps.Scenario with Actual, Budget, Actual % of Sales, Budg

  • STO outbound delivery

    Hi Friends, h3.While using VL10B T-CODE am geting the following error when i run background "at least one order was blocked and h3.could not be delivered" h3.shipping data tab is present in STO PO and customer number is maintained aswell h3.my curren

  • PRZNT and SUMME modules for indirect valuation

    What are the different variants for SUMME and PRZNT modules? Please explain me the meaning of all of the variants of these modules.