Application Development 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: 

Dump during otf to pdf conversion CONVERT_OTF FM if smartform has logo

Former Member
0 Kudos

Gurus,

I am using function module CONVERT_OTF for converting smartform otf output in pdf output. When the smartform does not contain any graphical logo, the function module converts without any issue. But if there is any logo in the smartform, then the function module gives dump. Following is the way I am using the function module.

DATA:i_otfdata type table of itcoo,

i_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,

wa_param type ssfctrlop,

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = v_smtfm

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = v_function

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

wa_param-langu = sy-langu.

wa_param-no_dialog = 'X'.

wa_param-getotf = 'X'.

CALL FUNCTION v_function

EXPORTING

e_wa_rbkp = wa_rbkp

CONTROL_PARAMETERS = wa_param

IMPORTING

JOB_OUTPUT_INFO = wa_otf

TABLES

t_rseg = i_rseg

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 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.

refresh i_otfdata.

i_otfdata = wa_otf-otfdata.

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT = 'PDF'

TABLES

OTF = I_OTFDATA

LINES = i_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.

Regards,

Rajesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rajesh,

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

.

Regards,

Sravanthi

2 REPLIES 2

Former Member
0 Kudos

Hi Rajesh,

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

.

Regards,

Sravanthi

0 Kudos

Thanks for solving the issue. Can you also tell me how does importing bin_filesize solved the issue ? Its just import parameter.

Regards,

Rajesh.