10-03-2005 9:01 PM
Hi,
I need to download the PDF file to SAP Application Server. Can any one please help me to Solve this Issue?
Thanks in Advance,
Kannan
10-03-2005 10:18 PM
Assuming the PDF file resides on the PC:
REPORT ztest.
DATA: BEGIN OF itab OCCURS 0,
field(256),
END OF itab.
DATA: dsn(100) VALUE '/usr/sap/xfr/FIS/testpdf'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'c:temptest.pdf'
filetype = 'BIN'
TABLES
data_tab = itab.
OPEN DATASET dsn FOR OUTPUT IN BINARY MODE.
LOOP AT itab.
TRANSFER itab-field TO dsn.
ENDLOOP.
Rob
10-03-2005 10:18 PM
Assuming the PDF file resides on the PC:
REPORT ztest.
DATA: BEGIN OF itab OCCURS 0,
field(256),
END OF itab.
DATA: dsn(100) VALUE '/usr/sap/xfr/FIS/testpdf'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'c:temptest.pdf'
filetype = 'BIN'
TABLES
data_tab = itab.
OPEN DATASET dsn FOR OUTPUT IN BINARY MODE.
LOOP AT itab.
TRANSFER itab-field TO dsn.
ENDLOOP.
Rob
10-03-2005 10:58 PM
Hi Rob,
Thanks for your reply. I did what you have mentioned. But when i check the application server, The file looks like a .txt file. How do i know it is a PDF file? How do i verify it download in the PDF format at the Application Server? Please reply me.
Thanks in Advance,
Kannan
10-04-2005 3:46 AM
You can read and upload the file to the PC:
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:temptest.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.
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:temptestn.pdf'
filetype = 'BIN'
bin_filesize = length
importing
filelength = lengthn
tables
data_tab = itab.
Rob
11-09-2010 5:09 AM
Hi Rob,
Can you please help me in this issue.
I have to read the spool already in pdf format as it is created by adobe form
and write to application server in pdf format. Please guide me achieve this.
Thanks and Regards
Manu
11-09-2014 3:34 PM
Hello ,
I have PDF in binary format in my SAP system and not in PC. How can i upload it to application server?
Please put your valuable comments.
Regards,
Akriti