cancel
Showing results for 
Search instead for 
Did you mean: 

Problem during output of smartform in PDF

Former Member
0 Kudos

Hi All,

I am using Function module for output of smartform in PDF Format.But it is giving following informatio -OTF end command // missing in OTF data.

and then no data in pdf format.

Could you please help me whar shoul I do for that?

MY code is like that :

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 =

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.

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

The message indicates that there is a problem in the OTF internal table (T_OTF) you pass to function module, missing characters at end ?

Did you get a SY-SUBRC NE 0 return code in the Smartforms call, or did you keep the spool request opened in this call ?

Regards

Raymond

Former Member
0 Kudos

Yes in this case I got sy-subrc = 4.

so what shoul I do for that?

Former Member
0 Kudos

ERR_BAD_OTF, is quite a speaking error message.

it tells you that the system cant make an PDF out of this OTF, since the OTF is broken, or just empty or whatever.

At least its not in a form where a PDF can be generated from.

So you have to search the error either in the form or the driver program.

raymond_giuseppi
Active Contributor
0 Kudos

Search the error in the first call to smartforms. ([Function documentation Checking and Testing a Smart Form|http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/83fb5bdf8f11d3969700a0c930660b/frameset.htm])

Regards,

Raymond

Answers (0)