on 04-04-2006 8:07 PM
Hi,
I have a requirement to extract a Smartform to MS Word. There doesn't seem to be a function module to do this as is the case with PDF conversion(CONVERT_OTFSPOOLJOB_2_PDF).
Would it be possible to use either CONVERT_OTF or SX_OBJECT_CONVERT_OTF_RAW for such a conversion?
Kind regards
Liza-Marie
hi liza
u can check this code
Hi,
A example for you
CALL FUNCTION fm_name " '/1BCDWB/SF00000031'
EXPORTING
control_parameters = control_parameters
output_options = output_options
s_header = st_header
IMPORTING
job_output_info = output_data
TABLES
it_overdue = ITAB[]
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
now convert the final document (OTF format) into PDF
format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'DOC'
IMPORTING
bin_filesize = v_pdf_len
TABLES
otf = output_data-otfdata
lines = pdf_table
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
Downloading the PDF file to the local Server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = L_FILENAME
FILETYPE = C_BIN_FILETYPE
TABLES
DATA_TAB = lt_pdf_nuc_data
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Check this thread,
Hope this helps you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Naveen,
but the parameter FORMAT that is 'DOC' in fm 'CONVERT_OTF' is returning an exception that is err_format.
i think this fm is importing only two format parameter value that is 'PDF' and 'ASCII'.
Couldn't we convert smartform to ms word?
is the problem of this thread solved? if it is solved, can somebody write the resolution of this problem pls?
Thanks.
Hi,
you can try this FM <b>CONVERT_ITF_TO_RTF</b>
this is used to convert scriptdata to RTF format.
Regards
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.