03-10-2005 7:26 PM
I have a program that builds a PDF file and downloads it to a network drive using GUI_DOWNLOAD. GUI_DOWNLOAD does not work in background, so I tried OPEN DATASET, TRANSFER FILE, CLOSE DATASET. I get a dump because it can't translate the PDF file. I've tried it both in TEXT MODE and BINARY MODE.
Has anyone ever downloaded a PDF in background?
Thanks.
03-10-2005 10:10 PM
Hi,
There is a standard program (search for rspdf</b> sorry but i don´t remember the exact name) that converts a spool order into a pdf file, why not having a look?.
why not using a submit to this program?.
03-18-2005 12:10 PM
Thanks, I am using that function it's called FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'. I need to download the PDF it creates to a network drive in the background.
03-18-2005 12:15 PM
The code it the function you described uses FUNCTION 'DOWNLOAD', this function works just like 'GUI_DOWNLOAD' and creates a dump.
03-11-2005 12:01 AM
You can try this code but it might only support a download to a PC:
FUNCTION Z_DS_CREATE_LOCAL_PDF_FILE .
*"----------------------------------------------------------------------
*"*"Local interface:
*" EXPORTING
*" REFERENCE(AFILENAME) LIKE RLGRAP-FILENAME
*" TABLES
*" OTF_LINES STRUCTURE ITCOO
*"----------------------------------------------------------------------
DATA: PDF_LINES
LIKE TLINE OCCURS 1000 WITH HEADER LINE,
ARCH LIKE TOA_DARA, NO_LINES TYPE I.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = NO_LINES
TABLES
OTF = OTF_LINES
LINES = PDF_LINES.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
BIN_FILESIZE = NO_LINES
FILENAME = 'c:test.pdf'
FILETYPE = 'BIN'
IMPORTING
ACT_FILENAME = AFILENAME
TABLES
DATA_TAB = PDF_LINES.