cancel
Showing results for 
Search instead for 
Did you mean: 

Send smartforms via Email, directly as mail, not as attachment

Former Member
0 Kudos

Hello friends,

i have written a program that sends smartforms via email. It works properly. But the smartforms will be send as an attachment as a pdf file.

How can i switch from attachment mode to a mode that sends the smartform directly as mail, without attachment?

<<help>>

daniel

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

When you print the smartform insted of PRINT as device, you should use MAIL.

Max

Former Member
0 Kudos

Hy, thx for your answer. But i'm sorry, i'm already using MAIL. I tried out PRINTER, but then it will be printed.

PRINTER Drucker

SCREEN Bildschirm

TELEFAX Telefax

MAIL Mail

Former Member
0 Kudos

Make sure you maintain the email addresses in the master data. For eg. if you are emailing the form to a specific vendor, make sure the vendor has an email address maintained in the vendor master (FK02).

Former Member
0 Kudos

thx for your attention. The program can handle it. But to the basic question. How can i send the smartform via email, not as an attachment.

daniel

Former Member
0 Kudos

Hi Daniel,

Which FM are u using for sending a mail?

If you are using 'SO_NEW_DOCUMENT_ATT_SEND_API1',

FREE : i_objbin.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = w_doc_data

put_in_outbox = 'X'

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

TABLES

packing_list = i_objpack[]

object_header = i_objhead[]

contents_bin = i_objbin[]

contents_txt = i_objtxt[]

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

receivers = i_reclist

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

document_type_not_exist = 3

operation_no_authorization = 4

parameter_error = 5

x_error = 6

enqueue_error = 7

OTHERS = 8.

Regards,

Anjali

Former Member
0 Kudos

Hi Anjali, i'm send emails by using the smartform build in functionality. Have a look at the following:

CALL FUNCTION lv_formname

__EXPORTING

*___ARCHIVE_INDEX______________=

*___ARCHIVE_INDEX_TAB__________=

*___ARCHIVE_PARAMETERS_________=

____CONTROL_PARAMETERS_________=__lv_cont_par

____MAIL_APPL_OBJ______________=__lv_mail_app_obj

____MAIL_RECIPIENT_____________=__vlv_mail_rec_obj

____MAIL_SENDER________________=__lv_mail_sen_obj

____OUTPUT_OPTIONS_____________=__lv_output

____USER_SETTINGS______________=__'_'

____T_INFOTAB_FORUSR___________=__P_INFOTAB_FORUSR

*___USER_SETTINGS______________=_'X'

*_IMPORTING

*___DOCUMENT_OUTPUT_INFO_______=

*___JOB_OUTPUT_INFO____________=

*___JOB_OUTPUT_OPTIONS_________=

*_EXCEPTIONS

*___FORMATTING_ERROR___________=_1

*___INTERNAL_ERROR_____________=_2

*___SEND_ERROR_________________=_3

*___USER_CANCELED______________=_4

*___OTHERS__________________= 5

____.

Former Member
0 Kudos

Hi

I think what you need to do, is convert your smart form OTF output to XSF and then send it.

You can refer to SF_XSF_DEMO_MAIL as an example.

Hope this helps.

Maninder