on 12-30-2011 9:45 AM
hı all
l want send smartform like pdf with mail but if default printer name space send_error or INTERNAL_ERROR in lf_fm_name function and ı dont write default printer . how can ı solved no write default printer name . you can see my code below .
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSEFER_DETAY'
VARIANT = ' '"
DIRECT_CALL = ' '"
IMPORTING
fm_name = lf_fm_name
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.
*W_CTRLOP-no_open = 'X'.
**W_CTRLOP-no_close = 'X'.
W_CTRLOP-device = 'LP01'.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION lf_fm_name
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
gt_1003 = zsd_st09_01
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
TABLES
GT_1002 = GT_102
GT_1001 = gt_1001
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.
Hi,
Add this field in structure of output option and check now.
W_COMPOP-TDDEST = 'LP01' or (W_COMPOP-TDDEST = 'LOCA' )
and W_CTRLOP-device = 'MAIL' or ( W_CTRLOP-device = 'PRINTER').
Regards,
Renuka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sinan,
Happy New year.Please pass the parameter OUTPUT_OPTIONS in fm lf_fm_name .
Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hı madruha
W_CTRLOP-device = 'LP01'.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
*W_COMPOP-tdprinter = 'LP01'.
W_COMPOP-tdnewid = 'X'.
*W_COMPOP-TDNOARCH = 'X'.
*W_COMPOP-tddest = 'LP01'.
comm_val-adsmtp-smtp_addr = ismtp-smtp .
call function 'CONVERT_COMM_TYPE_DATA'
exporting
pi_comm_type = 'INT'
pi_comm_values = comm_val
importing
pe_device = w_ctrlop-device
pe_mail_recipient = mail_recipient.
CALL FUNCTION lf_fm_name
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
*OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
*mail_recipient = mail_recipient
gt_1003 = zsd_st09_01
yukleyen = yukle
sofor1 = sofor1
not1 = not1
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
TABLES
GT_1002 = GT_102
GT_1001 = gt_1001
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
okey applaying your solving but error sy-subrc 3 .
regard sinan .
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.