on 06-22-2009 7:39 AM
Hi experts,
I have a requirement that development a smartforms and output it into a local directory.
Let's say, the user will press on a button and it will generate a pdf file (developed from smartforms) into the user's local C drive.
Can someone provide me some guidelines? Is this possible to do it?
Any clues are appreciated.
Thank you.
Hi,
Code it like below:
DATA: pdftab type standard TABLE OF tline,
datab TYPE standard TABLE OF itcoo.
itcpo-tdgetotf = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZFORM'
LANGUAGE = SY-LANGU
OPTIONS = itcpo
// call script using start_form and write_form.
CALL FUNCTION 'CLOSE_FORM'
TABLES
OTFDATA = datab
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = BINFILE
TABLES
otf = datab
lines = pdftab
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = binfile
filename = 'C:\MYFILE.PDF' ---> give the path where u want to download
FILETYPE = 'BIN'
tables
data_tab = pdftab
Hope it helps!!
Rgds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.