Skip to Content

Attachment link from SRGBTBREL is not deleting?

All,

I have custom transaction that have option to attach documents. I am using the following for attachment option.

      i_borident-objtype = 'YATTA'.
      i_borident-objkey = yatthdr-docno.
      create object gos_manager
        exporting
           is_object            = i_borident
           it_service_selection = i_services
           ip_no_commit         = ' '
        exceptions
           object_invalid       = 1.

After attaching the documents , some times users will delete the attachments .

when they delete the attachments , the releation link from table SRGBTBREL still exist. Why?

The real problem is i am printing the number attachments in print output using

* Get Attachment List
  call method cl_gos_attachment_query=>count_for_object
    exporting
     is_object = i_object
     ip_arl    = space
    receiving
     rt_stat   = i_stat.
  read table i_stat into wa_stat index 1.
  if sy-subrc eq c_0.
     move wa_stat-counter to v_attno.
  endif.

So here after deleted all attachments this above said query giving number of attachments to a document giving value (ie > 1 ) and not giving 0.

This is not happening on all the case while deleting the attachments, this happening 1 to1000 ratio.

Any info?.

a®s

Edited by: a®s on Jan 18, 2008 9:38 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 18, 2008 at 03:30 PM

    Resolved by myself.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 18, 2008 at 03:49 PM

    For Your Info. May other users found this info helpful.

    After deleting the attachments using GOS service object you need to call the following methods for deleting the reference links compleletly

      cl_binary_relation=>refresh_links( ).
    
      call function 'STATUS_BUFFER_REFRESH'
       exporting
         i_free        = 'X'.
    

    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.