Skip to Content
avatar image
Former Member

GOS : How to check if there any attachment exists

i'am reading the question :

i have the same problem : "How to check if there any attachment exists "

I use the class cl_gos_attachment_list to display

all attachments file to an object; it's ok, _but i want only to know if exist any attachments file for an object whithout display

sombody speak about te class GOS_ATTACHMENT_QUERY

but we are in SAP 46C2.

somebody knows another way to check if exist any attachment without display ?

could you help me ?

Fred.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 04, 2008 at 09:15 PM

    Try BIN_REL_OF_ROLES_GET - it is used inside BINARY_RELATION_CREATE to check if binary relation exists already, it seems. You might want to read more on [attachment creation using GOS|http://friendlyabaper.blogspot.com/2008/07/oh-my-gos.html] and then work from there in kind of a reverse order.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 04, 2008 at 09:23 PM

    At my previous company, we were doing this to check to see if there are any attachments.

    data: xborident TYPE  BORIDENT
      data: documents type standard table of neighbor.
    
      xborident.
    
    * check if there are any attachments
      refresh documents.
      call function 'SREL_GET_NEXT_NEIGHBORS'
           exporting
                object       = xborident
                roletype     = 'APPLOBJ'
                relationtype = 'ATTA'
           tables
                neighbors    = documents.
    
      if documents[] is initial.
    * then there are no attachments!!!
      endif.

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks a lot ; i try with the MF 'SREL_GET_NEXT_NEIGHBORS'

      it's ok.

      do you know where is the link between the object ( WORKORDER or MATERIAL for example) and the object id FOLxxxx and where are store the attachments files ; in wich table ?

      Thank you very much for your answer

      Fred