Skip to Content
avatar image
Former Member

smartforms mail issue using classes

Hello there,

I am using classes to send an email.but the issue is I have convert smartform to pdf.I used

1. CALL FUNCTION fm_name

EXPORTING

control_parameters = ssfctrlop

output_options = ssfcompop

IMPORTING

job_output_info = it_otf_data

TABLES

it_kna1 = it_kna1.

it_otf_final[] = it_otf_data-otfdata[].

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

IMPORTING

bin_filesize = bin_filesize

  • bin_file =

TABLES

otf = it_otf_final

lines = it_pdfdata[]

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.

CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'

EXPORTING

line_width_dst = '255'

TABLES

content_in = it_pdfdata[]

content_out = it_pdf[]

and using

IF NOT it_pdf[] IS INITIAL.

CLEAR binary_content[].

t_pdf_vrs[] = it_pdf[].

binary_content[] = t_pdf_vrs[].

CALL METHOD document->add_attachment

EXPORTING

i_attachment_type = 'PDF'

i_attachment_subject = 'subject'

i_att_content_hex = binary_content.

my declarations are

data: it_pdfdata type table of tline with header line.

data:it_pdf type table of solisti1.

DATA binary_content TYPE soli_tab.

DATA t_pdf_vrs TYPE soli_tab.

but the error I am getting is

the type of it_pdf cannot be converted to the type of t_pdf_vrs.

Now I know why is that error is but if i change the type of it_pdf to same type as t_pdf_vrs,

Im getting at dump at :

CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'

EXPORTING

line_width_dst = '255'

TABLES

content_in = it_pdfdata[]

content_out = it_pdf[]

please advise me how to get round it.ASAP plz!!

regards

Edited by: BrightSide on Jan 7, 2010 4:16 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 07, 2010 at 04:37 PM

    Please FORMAT your code with the tag (without spaces)

    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
    EXPORTING
    line_width_dst = '255'
    TABLES
    content_in = it_pdfdata[]
    content_out = binary_content[] "<======= instead of it_pdf
    

    Add comment
    10|10000 characters needed characters exceeded