Hi,
Just to verify....
Some code from here
The case of sending mail with graphs . | SCN
FORM mail_1_prep_5
CHANGING
ob_document_bcs TYPE REF TO cl_document_bcs .
DATA: customer TYPE scustom .
DATA: bookings TYPE ty_bookings .
DATA: connections TYPE ty_connections .
DATA: formname TYPE tdsfname .
DATA: fm_name TYPE rs38l_fnam .
formname = p_fname .
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = p_fname
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc NE 0 .
RETURN .
ENDIF .
DATA: st_control_parameters TYPE ssfctrlop .
DATA: st_output_options TYPE ssfcompop .
DATA: st_job_output_info TYPE ssfcrescl .
st_control_parameters-no_dialog = abap_true .
st_control_parameters-getotf = abap_true .
CALL FUNCTION fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
customer = customer
bookings = bookings
connections = connections
IMPORTING
job_output_info = st_job_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc EQ 4 .
RETURN .
ENDIF .
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DATA: bin_file TYPE xstring .
DATA: it_lines_dummy TYPE tline_tab .
DATA: bin_filesize TYPE i .
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_file = bin_file
bin_filesize = bin_filesize
TABLES
otf = st_job_output_info-otfdata
lines = it_lines_dummy
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
DATA: it_solix TYPE solix_tab .
CALL METHOD cl_bcs_convert=>xstring_to_solix
EXPORTING
iv_xstring = bin_file
RECEIVING
et_solix = it_solix.
DATA: attachment_subject TYPE so_obj_des .
MESSAGE s000(oo) WITH 'attachment PDF hex' space INTO attachment_subject .
TRY.
CALL METHOD ob_document_bcs->add_attachment
EXPORTING
i_attachment_type = 'pdf'
i_attachment_subject = attachment_subject
i_att_content_hex = it_solix.
CATCH cx_document_bcs .
ENDTRY.
ENDFORM . "mail_1_prep_5