on 05-27-2011 7:03 AM
DEAR ALL,
i am trying to convert output of zscript to pdf, the zscript is assign to standard tcode: J1IP, and uses zprogram, i am using otf_convert function module .the program is activated, but while executing it give the error msg " OTF end command // missing
in OTF data " .What does this message no mean " TD030".......
try the following code in close_form
DATA: binfilesize TYPE i.
DATA: pdftab TYPE TABLE OF tline WITH HEADER LINE.
DATA: i_itcpp LIKE itcpp.
DATA: i_zinv_spool LIKE zinv_spool OCCURS 0 WITH HEADER LINE.
CLEAR i_zinv_spool. REFRESH i_zinv_spool.
DATA: g_t_otfdata TYPE STANDARD TABLE OF itcoo WITH HEADER LINE.
DATA filename TYPE string.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = i_itcpp
TABLES
otfdata = g_t_otfdata[]
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
retcode = sy-subrc.
PERFORM protocol_update.
ENDIF.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
bin_filesize = binfilesize
BIN_FILE =
TABLES
otf = g_t_otfdata[]
lines = pdftab[]
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*****************TAKING THE DOWNLOAD
SET COUNTRY space.
CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
EXPORTING
i_otf = g_t_otfdata[]
EXCEPTIONS
acrobat_not_registered = 1
convert_otf_to_pdf_error = 2
download_error = 3
acrobat_not_started = 4
cntl_error = 5
OTHERS = 6.
***************************DOWNLOADING THE PDF DATA******************
CONCATENATE file_path vbco3-vbeln text-002 INTO filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = binfilesize
filename = filename
filetype = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = pdftab[]
FIELDNAMES =
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.
lv_tabix = lv_tabix + 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
After using 'CONVERT_OTF' FM also use ' CALL FUNCTION 'SCMS_XSTRING_TO_BINARY''.
This is used to convert table SOLISTI1 changing the table from X character sized lines into
any given Y character sized lines.
It may help you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.