Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Smartform output as a e-mail

Former Member
0 Likes
507

Hi,

I want to send the smart form output as a pdf attachment in a mail.

For that, I am getting OTF text from the smartform function module and converting the OTF to pdf attachment

and sending the mail.

But, when I am going to send the e-mail, I want to hide the 'Print/Preview' dialog box.

By using some paramater no_dialog, no_open & no_close, I am able to hide the 'Print/Preview' dialog box.

But, in this case I am not getting OTF text from the smartform function module and I am not able to

create pdf attachment.

Please let me know, how to handle this situation.

Thanks in advance,

Sreenivas Reddy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
451

Hi,

For mail PDF attachment follow the link

https://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment

For supressing the popup follow use



T_control-preview = 'X'.
T_control-no_open = 'X'.
T_control-no_close = 'X'.
T_control-no_dialog = 'X'.
T_control-device = 'PRINTER'.
T_control_parameters-no_dialog = 'X'.
T_control_parameters-no_open = 'X'.
T_control_parameters-no_close = 'X'.
T_SSFCOMPOP-TDDEST = 'PRINTER NAME'.
T_SSFCOMPOP-TDNOPRINT = 'X'.
 
CALL FUNCTION 'SSF_OPEN'
EXPORTING
output_options = T_SSFCOMPOP
control_parameters = t_control
user_settings = ' '
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.

Regards,

Amitava

Hi,

I want to send the smart form output as a pdf attachment in a mail.

For that, I am getting OTF text from the smartform function module and converting the OTF to pdf attachment

and sending the mail.

But, when I am going to send the e-mail, I want to hide the 'Print/Preview' dialog box.

By using some paramater no_dialog, no_open & no_close, I am able to hide the 'Print/Preview' dialog box.

But, in this case I am not getting OTF text from the smartform function module and I am not able to

create pdf attachment.

Please let me know, how to handle this situation.

Thanks in advance,

Sreenivas Reddy

1 REPLY 1
Read only

Former Member
0 Likes
452

Hi,

For mail PDF attachment follow the link

https://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment

For supressing the popup follow use



T_control-preview = 'X'.
T_control-no_open = 'X'.
T_control-no_close = 'X'.
T_control-no_dialog = 'X'.
T_control-device = 'PRINTER'.
T_control_parameters-no_dialog = 'X'.
T_control_parameters-no_open = 'X'.
T_control_parameters-no_close = 'X'.
T_SSFCOMPOP-TDDEST = 'PRINTER NAME'.
T_SSFCOMPOP-TDNOPRINT = 'X'.
 
CALL FUNCTION 'SSF_OPEN'
EXPORTING
output_options = T_SSFCOMPOP
control_parameters = t_control
user_settings = ' '
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.

Regards,

Amitava