cancel
Showing results for 
Search instead for 
Did you mean: 

FM or BAPI for VF03, FB03 attachment list download

ando1692
Explorer
0 Kudos

Hello!

Which BAPIs or FM shall I use to download GOS attachments (VF03 transaction with billing document number, attachment list)? The attachments are downloaded via http (files are in a web server). Same for FB03 transaction (with supplier invoices).

I mean the “export” functionality that it’s within the attachment list tab. When doing manually (if I double click on attachment itself) my browser is opened and pdf file is shown. I have inspected this and an http request is made to some server, which returns the pdf itself. I have looked some FM such as BDS_GOS_CONNECTIONS_GET (which returns the metadata of the attachments, but cannot download the attachment with that one) and BDS_BUSINESSDOCUMENT_GET_TAB which does not help.

Thanks a lot

Sandra_Rossi
Active Contributor
It has been asked so many times, and there are many possible solutions. As you are asking about BAPI, there's only one which is BAPI_REL_GETRELATIONS to read the list of attachments. For reading the IDs of attachments, and for reading each attachment you may search the Web: "GOS" "attachment" "github" site:sap.com (one ABAP GitHub project)
Sandra_Rossi
Active Contributor
Note that GOS attachments may not always be stored in BDS.

Accepted Solutions (1)

Accepted Solutions (1)

ando1692
Explorer
0 Kudos

Hello Sandra,

After investigating and following your advice I've found the github repo that you were talking (I think it's https://github.com/keremkoseoglu/ABAP-Library/blob/master/document/zcl_bc_gos_toolkit.abap). This is more than enough for investigation and start testing it. Really appreciate your help, gracias 😊

Answers (0)