11-19-2007 4:30 AM
i executed smartform one functional module is genrated '/1BCDWB/SF00000002'
now the problem is that i want to send output of this smartform through email
now how to use ' MAIL_RECIPIENT ' and ' MAIL_SENDER ' to send smartform output through email .
please check following module which generated by smartform.
plz suggest me .
CALL FUNCTION '/1BCDWB/SF00000002'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
ITAB_PA0001 = ITAB_PA0001
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.
11-19-2007 4:40 AM
11-19-2007 5:07 AM
Hi
You can do it while passing these parameters in the CONTROL_PARAMETERS.
data: ls_CONTROL_PARAMETERS type SSFCTRLOP.
ls_CONTROL_PARAMETERS-DEVICE = 'LOCL'.
ls_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
ls_CONTROL_PARAMETERS-PREVIEW = ' '.
Pass this ls_CONTROL_PARAMETERS to the importing parameter of the FM .
CALL FUNCTION LF_FM_NAME
EXPORTING
CONTROL_PARAMETERS = LS_CONTROL_PARAM
.................
In addition to this, you might also want to set the print immediately field on the same structure to 'X'.
Generally you leave the device field empty, the user master record default printer will be used
11-22-2007 10:18 AM