Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Get list of all GOS Attachments per transaction

0 Kudos

Hello Everyone,

I have a requirement to get list of all attached objects(Name and type would be enough) per transaction.

I tried the previous post, but could not get the right answer. I tried some tables like SOOD, SOFM, and SOFFCONT1, but none of them giving the link between the real object like Incoming invoice number.

I know there are lot of posts out there and I tried to find my answer, but I couldn't find it. Appreciate your help.

Thanks,

Kishore.

1 ACCEPTED SOLUTION

bludog87
Explorer

Have you tried table SRGBTBREL?

4 REPLIES 4

bludog87
Explorer

Have you tried table SRGBTBREL?

Sandra_Rossi
Active Contributor
0 Kudos

Please convert your "answer" into a comment (in the menu), because ANSWER is reserved to solutions only.

keremkoseoglu
Contributor
0 Kudos

0 Kudos

Hi Kishore,

You can use method 'read_links_of_objects' of class 'cl_binary_relation' to get all the attached documents.

Inputs can be referred from 'SRGBTBREL' table.

Cheers.

  ls_object-instid = ls_header-ebeln.               " info from SRGBTBREL table
  ls_object-typeid = 'BUS2010'.
  ls_object-catid  = 'BO'.
  append ls_object to lt_objects.
  clear ls_object.
 cl_binary_relation=>read_links_of_objects(  " Reading all the linked attachments with the Document
    exporting
       it_objects             =  lt_objects    
    importing
       et_links_a             =  lt_links_a).