on 01-02-2007 8:51 AM
Hello abapers,
can anyone tell me how to send a smartform output directly through email to the receivers.Also, the output should be saved in PDF format.please help me in this matter.Thanx in advance...
Regards,
Santosh.
Hi,
Check this link.I am explaining the same concept there.
If you want to send it to multiple receivers,just append record to the i_receivers internal table mentioned in code sample.
Kindly reward points by clicking the star on the left of reply,if it helps.
Message was edited by:
Jayanthi Jayaraman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi jayanthi,
This is in reply to ur answer to santosh.
santosh wants to send an email directly .
so in that case if i configure the NAST-NACHA
values that will automatically send the mail right. incase if u want to change to PDF u can do the same in print program only..
i mean i am talking abt the following code.
&----
*& Form nacha_5
&----
Send the Form as an Email
----
-->P_FOUND Flag 'X' if sub routine is found
----
FORM nacha_5 USING write_out TYPE xfeld
CHANGING p_found TYPE xfeld.
DATA : lv_mail_id TYPE so_name,
lv_mail_tp TYPE so_escape VALUE 'U',
l_subrc TYPE sy-subrc.
p_found = 'X'.
Get the Mail ID from the Control Table
lv_mail_id = t_ctrl_app-recipient.
Create The Recipient Object
CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
EXPORTING
ip_mailaddr = lv_mail_id
ip_type_id = lv_mail_tp
IMPORTING
ep_recipient_id = w_recipient
EXCEPTIONS
invalid_recipient = 1
OTHERS = 2.
IF sy-subrc NE 0.
IF write_out = 'X'.
FORMAT COLOR 6.
WRITE AT /5 text-001.
ENDIF.
RAISE other.
ENDIF.
Create The Sender Object
CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'
EXPORTING
ip_sender = sy-uname
IMPORTING
ep_sender_id = w_sender
EXCEPTIONS
invalid_sender = 1
OTHERS = 2.
IF sy-subrc NE 0.
IF write_out = 'X'.
FORMAT COLOR 6.
WRITE AT /5 text-002.
ENDIF.
RAISE other.
ENDIF.
Populate the Control Data & Title
w_sf_control-device = 'MAIL'.
w_sf_control-no_dialog = 'X'.
w_sf_control-langu = t_ctrl_app-spras.
***************************************************
Nacha = 2
Populate the Fax Number and the country.
Data : lv_fax_tp TYPE so_escape VALUE 'F',
lv_fax = t_ctrl_app-recipient.
lv_land1 = t_ctrl_app-country.
Create the Recipient Object
CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
EXPORTING
ip_country = lv_land1
ip_faxno = lv_fax
ip_type_id = lv_fax_tp
IMPORTING
ep_recipient_id = w_recipient
EXCEPTIONS
invalid_recipient = 1
OTHERS = 2.
IF sy-subrc NE 0.
IF write_out = 'X'.
FORMAT COLOR 6.
WRITE AT /5 text-004.
ENDIF.
RAISE other.
ENDIF.
Create The Sender Object
CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'
EXPORTING
ip_sender = sy-uname
IMPORTING
ep_sender_id = w_sender
EXCEPTIONS
invalid_sender = 1
OTHERS = 2.
IF sy-subrc NE 0.
IF write_out = 'X'.
FORMAT COLOR 6.
WRITE AT /5 text-003.
ENDIF.
RAISE other.
ENDIF.
Populate the Control Data
w_sf_control-device = 'TELEFAX'.
w_sf_control-no_dialog = 'X'.
w_sf_control-langu = t_ctrl_app-spras.
Populate the Output Options.
w_output_options-tdteleland = lv_land1.
w_output_options-tdtelenum = lv_fax.
w_output_options-faxformat = 'PS'.
correct me if i am wrong
Thanks in advance.
hi santoo
this is as simple as this
explore scot tcode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
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.