Skip to Content
0
Jan 17, 2008 at 07:24 PM

Attachment link from SRGBTBREL is not deleting?

310 Views

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