2009 Aug 18 1:04 PM
Dear Friends,
I have a below scenario on Script:
I need to convert the Script to PDF in background and send it to External Mail Box.
Please give me an idear or sample code, if possible.Thanks and regards,
Ramani
Dear Friends,
I have a below scenario on Script:
I need to convert the Script to PDF in background and send it to External Mail Box.
Please give me an idear or sample code, if possible.Thanks and regards,
Ramani
2009 Aug 18 1:16 PM
2009 Aug 19 5:20 AM
Hi,
Refer to the following program.
TABLES: likp, lips,itcpo.
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 = 'Z_PRAC'
LANGUAGE = SY-LANGU
OPTIONS = itcpo
// call script using start_form and write_form.
CALL FUNCTION 'END_FORM'
IMPORTING
RESULT = gi_ofc
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 = 'D:\MYFILE.PDF' //give the address where u want output.
FILETYPE = 'BIN'
tables
data_tab = pdftab
Regards,
Rajesh Kumar
2009 Aug 19 5:25 AM
Dear Rajesh,
The requirement is to send the PDF file thro mail, not Download.
Thanks and regards,
Ramani
2009 Aug 19 5:28 AM
2009 Aug 19 5:42 AM
for mail use function:SO_NEW_DOCUMENT_ATT_SEND_API1.if you check its documentation you will get to know how to call this FM.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |