Hi,
Actually my requirement is to send the smartform through email using medium external send..If the email Id of the recipient is not present then the smarform has to be sent through fax using medium external send.So I have changed the value of nast-nacha from 5 to 2 and added the following code to my program.
ls_control_param-device = 'TELEFAX'.
ls_control_param-preview = 'X'.
ls_control_param-no_dialog = 'X'.
ls_control_param-getotf = 'X'.
ls_composer_param-tdtitle = 'Advance shipment notification'.
ls_composer_param-tdtelenum = lv_telfx.
ls_composer_param-tdteleland = lv_land1.
ls_composer_param-tdschedule = 'IMM'.
ls_composer_param-tdsenddate = sy-datum.
ls_composer_param-tdsendtime = sy-timlo.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_appl_obj =
mail_recipient = lv_recipient
mail_sender = lv_sender
output_options = ls_composer_param
user_settings = ' '
vttkvb = vttkvb
IS_DLV_DELNOTE = LS_DLV_DELNOTE
is_nast = nast
IMPORTING
document_output_info = document_output_info
job_output_info = ls_return
job_output_options = job_output_options
TABLES xvttp = xvttp
xvtts = xvtts
xvtsp = xvtsp
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.
While debugging i am not finding any error in the program.But in SOST transaction,it is not showing any entry for the smartform o/p which is sent through fax.
Could anyone give me a proper solution for this?