‎2008 Mar 21 4:16 AM
HI,
pls tell me which function module is used in program to upload PDF file . *it very urgent.......................*
pls help me .......................
thanks
sudarsan
‎2008 Mar 21 4:25 AM
Hi,
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.
Pls. reward if useful...
‎2008 Mar 21 4:27 AM
Hello,
try these FMs
ECP_PDF
ECP_PDF_DISPLAY
HR_IT_DISPLAY_WITH_PDF
ISH_DALE_PDF_DISPLAY
QC07_BATCH_CERT_DISPLAY_PDF
SCWB_NOTE_DISPLAY_PDF
SCWB_NOTE_DISPLAY_TPDF
Reward if helpful.
Regards,
pankaj
‎2008 Mar 21 4:29 AM
Hi,
Use the following FM :
GUI_UPLOAD
Sample Code :
call function 'GUI_UPLOAD'
exporting
filename = 'c:\temp\test.pdf'
filetype = 'BIN'
importing
filelength = length
tables
data_tab = itab.
Regards,
Raghu
‎2008 Mar 21 4:37 AM
Hi Sudarshan,
It depends on what do you want to do with the PDF uploaded.
if you just want to store it in SAP and view it later using PDF viewer then you can do that.
use GUI_UPLOAD with file type as BIN
this will upload the PDF and you can store the binary content in a custom table.
the data is in binary format. after uploading just download it again using gui_download with BIN option to desktop with extention.pdf .
Try out this...
GUI_UPLOAD
GUI_EXEC
GUI_RUN
Pls have a look on below threads...
Hope it will solve your problem
Reward points if useful...
Thanks & Regards
ilesh 24x7
‎2008 Mar 21 5:35 AM
Hi,
Click on the link below and check it out. it might be useful.
[Upload Files into SAP Office|http://www.jt77.com/development1/programming-27038.html]
Thanks,
Venkat.O
‎2008 Mar 21 6:50 AM
Hi,
you can use the function module for uploading
GUI_UPLOAD
and for downloading it in to the presentation server
use the function module GUI_DOWNLOAD.
Regards,
vineela