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: 

regarding uploading PDF into SAP from presentation server

Former Member
0 Kudos

Hi frnds,

I have a pdf document in my desktop.

The size of the document is large.

i want to upload it in my internal table. Can anyone tell me is this possible doing this.

Wht is the code involved in this requirement.

regards,

satya

2 REPLIES 2

Former Member
0 Kudos

Hi,

Check this example....

report ztest.

data: begin of itab occurs 0,

field(256),

end of itab.

data: dsn(100) value '/usr/sap/xfr/FIS/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.

Or

Use the TCode

CG3Z or CG3Y

for downloading to Application Server.

Regards,

Deepthi.

Former Member
0 Kudos

This message was moderated.