2005 Aug 08 11:06 AM
Hi,
I have a requirement to do the following:
Create a background job with some specific transactions and output to spool. Then take this output and write it to a specific shared directory in the users PC.
regards
Aveek
2005 Aug 08 11:14 AM
Hi,
try that:
1) fm job_open
2) submit your_report
... TO SAP-SPOOL
3) job_close
4) fm list_from_memory
5) fm CONVERT_OTFSPOOLJOB_2_PDF (look abap RSTXPDFT4)
/or fm LIST_TO_ASCI and fm gui_download
-> look oss-note 190669
regards Andreas
2005 Aug 08 11:23 AM
Hi,
I will try it out and have rewarded with points. I will let you know later about the issue.
regards
Aveek
2005 Aug 08 11:28 AM
Hi,
Another way:
....
call function 'CLOSE_FORM'
TABLES
otfdata = ZOFTDATA
EXCEPTIONS
ERR_MAX_LINEWIDTH
=1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3.
call function 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = NUMBYTES
TABLES
OTF = ZOFTDATA
LINES = ZPDF
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = NUMBYTES
FILENAME = FILE
FILETYPE = 'BIN'
IMPORTING
FILESIZE = NUMBYTES
TABLES
DATA_TAB = ZPDF
EXCEPTIONS
OTHERS = 9.
You should keep in mind that FM 'GUI_DOWNLOAD' can not be used in background. To store a file in background you should use DATASET.
Svetlin
2005 Aug 08 11:34 AM
Hi,
Is there any othet alternate function module that can be used for dwownloading to a specific folder of a PC with the background job and sppol.
regards
Aveek
2005 Aug 08 11:40 AM