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: 

PDF upload question

Former Member
0 Kudos

The users want a generic way to upload PDF files into SAP and retrieve them. Does anyone have any suggestions or code to do this? I wasn't sure if we could use our IXOS system for this or just upload the files to the SAP server and make a ref table for retrieval of those documents.

Thanks,

David

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

Please check this. may this will helpful to you

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de...

You can find ref table SRGBTBREL if you are using GOS

3 REPLIES 3

former_member194669
Active Contributor
0 Kudos

Please check this. may this will helpful to you

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de...

You can find ref table SRGBTBREL if you are using GOS

Former Member
0 Kudos

hi check the tcode CG3Z and CG3Y for uploading and downloading the files(any) ..and check this example

REPORT ZMN_PDF_UPLOAD.

data: begin of itab occurs 0,

field(256),

end of itab.

data: dsn(100) value '\usr\sap\DEV\DVEBMGS00\work\testpdf',

length like sy-tabix,

lengthn like sy-tabix.

call function 'GUI_UPLOAD'

exporting

filename = 'c:\temp\test.pdf'

filetype = 'BIN'

importing

filelength = length

tables

data_tab = itab.

open dataset dsn for output in binary mode.

loop at itab.

transfer itab-field to dsn.

endloop.

close dataset dsn.

clear itab.

refresh itab.

*To crosscheck if it went well

open dataset dsn for input in binary mode.

do.

read dataset dsn into itab-field.

if sy-subrc = 0.

append itab.

else.

exit.

endif.

enddo.

call function 'GUI_DOWNLOAD'

exporting

filename = 'c:\temp\testn.pdf'

filetype = 'BIN'

bin_filesize = length

importing

filelength = lengthn

tables

data_tab = itab.

regards,

venkat .

Former Member
0 Kudos

Hello David,

You may opt for the solution provided in the standard to handle Business Documents. Users can attach PDFs (and certain other file formats) directly from the front-end and then even retrieve them back whenever they need.

The criteria being that users have to attach the business documents (PDFs in your case) to the instance of Business Object. For example, VBRK is a definition for BO and 1520123456 is an instance of BO VBRK. In this scenario, PDFs for a Sales Invoice can be attached in the Business Document Navigator (OAOR) and user can browse through the PDFs whenever he/she needs to view the Sales Invoice Data.

Besides the look-and-feel factor, please donot ignore the fact that the Business Documents are stored in SAP DB itself adding to the DB growth. Look out for the options to optimise the growth and also think about archiving solutions (Ex: IXOS)

Please contact me for further info on this. Also, pls reward points, if the response is useful.

With Regards

Vijay Gajavalli