04-08-2013 8:29 PM
Hi everyone,
I have an requirement, where in I need to send the text to email body in larger bold font (Arial 12 and 11 size fonts). This time email is triggering with PDF attachment through the below FM. Is there any possibility to send the email body text as well by below FM (l_fm_name). I know we can send email body text through FM so_new_document_send_api1.
Someone guidance or steps would really be appreciated.
CALL FUNCTION l_fm_name
EXPORTING
is_header = gw_header " Report Header
is_footer = gw_footer " Report Footer
wa_legal = l_walegal " WA Legal Statement
control_parameters = gw_control_parameters "
output_options = gw_output_options
is_nast = nast
user_settings = space
mail_recipient = cs_recipient
mail_sender = cs_sender
is_kubra_inv = lv_invoice
TABLES
it_items = gt_items " Line Items
it_cost_disc = gt_pricing " Subtotal princing description
it_items_cond = gt_items_cond " Line items pricing conditions
it_komv = gt_komv " Item Conditions
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.
Thank you,
Himansu
04-09-2013 6:44 AM
Hi Himansu,
Please use class CL_DOCUMENT_BCS for email body and attachments . You can search SDN for the same. or go with FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' as suggested in below link :
http://scn.sap.com/thread/1866200
Regards,
Sachin
04-09-2013 7:11 AM
Hi Himanshu,
If You want to change the font/ font size in the body of the mail.
You'll have to create SO10 text with the desired paragraph format (Here you have to specify the font family and the Font size , bold , italics etc..).
Once this is done , call SO10 text using read_text in your program.
And finally read the FM output and append it in your body text of Email so_new_document_send_api1.
Hopr this will help.
Regards,
Amit kr Srivastav
04-09-2013 7:42 AM
Hi Amit,
Thanks for your reply, but can't I send body text thru fm l_fm_name as the current scenerio this FM is sending the attachment
04-09-2013 7:44 AM
Hi,
By looking at other threads in sdn(for ref. https://scn.sap.com/thread/17458) , I dont think it i spossible to send body text through that function module. You need to use seperate FM for sending emails in your scenario.
Regards,
Swarna