Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM CONVERT_OTF

Former Member
0 Likes
2,295

Hi experts,

the function module CONVERT_OTF is used in my program for changing my output to pdf but it is dumping an error 'OTF end command // missing in OTF data'. what is the error i ahve made?????

with regrads

janani

Hi experts,

the function module CONVERT_OTF is used in my program for changing my output to pdf but it is dumping an error 'OTF end command // missing in OTF data'. what is the error i ahve made?????

with regrads

janani

3 REPLIES 3
Read only

Former Member
0 Likes
1,540

Hi,

First of all check whether you are getting the output in smartform.Are you getting that? After that go for the conversion to PDF.

Pass the bin_filesize in importing

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT = 'PDF'

MAX_LINEWIDTH = 132

ARCHIVE_INDEX = ' '

COPYNUMBER = 0

ASCII_BIDI_VIS2LOG = ' '

PDF_DELETE_OTFTAB = ' '

IMPORTING

BIN_FILESIZE = w_bin_filesize

BIN_FILE = BIN_FILE

TABLES

otf = t_otf

lines = t_pdf_tab

EXCEPTIONS

ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

ERR_BAD_OTF = 4

Hey,

try commenting the line MAX_LINEWIDTH = 10 "132 in the FM and then check it.

Regards,

Midhun Abraham

Edited by: Midhun Abraham on Nov 24, 2008 9:18 AM

Edited by: Midhun Abraham on Nov 24, 2008 9:28 AM

Read only

Former Member
0 Likes
1,540

Use the FM as follows.

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT = 'PDF'

IMPORTING

BIN_FILESIZE = PDF_SIZE

BIN_FILE = PDF_DATA

TABLES

OTF = LT_OTFDATA[]

LINES = L_DUMMY

EXCEPTIONS

ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

ERR_BAD_OTF = 4

OTHERS = 5.

Read only

Former Member
0 Likes
1,540

yes sir i am getting output.

this is my code....

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT = 'PDF'

MAX_LINEWIDTH = 10 "132

IMPORTING

BIN_FILESIZE = W_BIN_FILESIZE

  • BIN_FILE =

TABLES

OTF = T_OTF

LINES = T_PDF_TAB

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.