2014 May 22 11:50 AM
Hello,
I have problem reading GOS links ( with CL_BINARY_RELATION=>read_links or any similar methods/FMs ) of FI document (type BKPF).
In SRGBTBREL table there are also no entries for this BKPF document (in INSTID_A).
BUT I can see attachments + notes in FB03 Attachment list for this document.
After debbuging FB03 Attachment list I have found, that BKPF document does not have directly attached files, even though I can see them in FB03. Because it is "follow-on document" for invoice (which have some attached files), and there is also WF and PO in relationship browser (they have also another attachments, seen in FB03).
FB03 GOS attachment list prepares all these objects (document,invoice,WF,PO..) and reads attachments for all of them.
My question - how to read these links / attachments when I know only BKPF document in my program? Do I have to somehow programaticaly search for previous objects (invoice, PO, WF..) and after it read their attachments? I Thought that it is done automaticaly by CL_BINARY_RELATION=>read_links)...
Problem is on 731 release.
2014 May 23 9:43 AM
Ok, I answer to myself with what I found so far:
In FB03 attachments are obtained from bussines objects:
I also found unreleased function FB_DOC_GET_GOS_LINKS which helped me a lot to understand where attachments come from.
In my case it was all from BUS2081 invoice. Few attachments directly attached in GOS (read by read_links method) and rest were attached on content server (can be read for example with ALINK_RFC_DOCUMENTS_GET).
2014 May 22 1:04 PM
Hi,
i have done it in FB03 and find an entry in SRGBRREL with RELTYPE = 'ATTA'
and TYPEID_A = 'BKPF'.
try it in your Testsystem and have a look in the table.
Regards, Dieter
2014 May 22 2:00 PM
Hi, as I wrote, SRGBRREL is empty for my test document (BKPF) but in FB03 I can see attachments.
2014 May 22 2:17 PM
Hi,
perhaps you have an older SAP-Release, try table: SRRELROLES.
Regards, Dieter
2014 May 22 2:24 PM
Release 731, and found nothing in SRRELROLES for FB03 document.
2014 May 22 2:24 PM
2014 May 22 3:07 PM
Thanks, but I guess you have file/s attached to BKPF object (you created attachment/s in FB03?) ? I don't.
2014 May 22 3:38 PM
2014 May 23 6:35 AM
When I open FB03 document I can see attachments, but they are not created via FB03. And I need read them in program, thats my problem.
2014 May 23 9:43 AM
Ok, I answer to myself with what I found so far:
In FB03 attachments are obtained from bussines objects:
I also found unreleased function FB_DOC_GET_GOS_LINKS which helped me a lot to understand where attachments come from.
In my case it was all from BUS2081 invoice. Few attachments directly attached in GOS (read by read_links method) and rest were attached on content server (can be read for example with ALINK_RFC_DOCUMENTS_GET).
2016 Mar 24 7:54 AM
Hi Tomas,
I have a requirement is like, I want to download the all attachments are in FB01/FB02 transaction ans attache into on Invoice PDF output, So can you hep on this,
Note: Invoice PDF is available but download the all attachments from FB01/FB02 is need.
Thanks,
Mahesh