How to put smartform in mail body
Hi colleagues,
I would like to send a mail with content build from a SMARTFORM. I call the smartform function module and get the corresponding OTF file, but I did not succeed to put it in a readable way in the mail body.
How ot get the smartform as mail body?
My body contains this kind of data, if I do the conversion to PDF:
═䑆ⴱ⸳ഊ◢팍ਲu2030扪ഊ⽗楮䅮獩䕮捯摩湧ഊ敮摯扪ഊ㌠〠潢樍਼㰍ਥ䑥癴祰攠南䥎u2020u2020⁆潮琠䍏啒䥅删潲浡氠䱡湧⁅不ਯ呹灥 䙯湴ഊ⽓畢瑹灥 呹灥ㄍਯ䉡獥䙯湴 䍯畲楥爍ਯ乡浥 䘰〱ഊ⽅湣潤楮朠㈠〠刍ਾ㸍湤潢樍u2030扪ഊ㰼ഊ⽌敮杴栠㔠〠刍ਾ㸍ੳ瑲敡洍ਠ⽆〰ㄠㄲ⸰〠呦u2030⁂吠
㜰⸸㔠㜵㤮
and the pdf itself (I also try to attached it to the mail for test) cannot be open.
I already check a lot of thread, but cannot find any to solve this issue.
Thanks for your help.
Barbara
Hi,
Refer to this link..Send an smartform as body of a mail
Similar Messages
-
How to send smartform output in body of email?
Hi all ,
I have to send smartform output in body of email (not as an attachement in mail) .PLease help me in this regard.
Thanks,
Ananth S.Hi Ananth
See these threads.
[https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6889194]
[https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6861330]
[https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6855364]
Regards
Hareesh Menon -
Hi experts,
I can send all the data of internal table as attachment through mail. But requirement is to send all the data in mail body. No attachment should go with this mail. How to do this?
Regards,
Goutam SahooHi Check this sample program. Clearly mentioned the body of the message .
<pre>REPORT zvenkat_mail_simple.
Mail related declarations
"Variables
DATA :
g_sent_to_all TYPE sonv-flag,
g_tab_lines TYPE i.
"Types
TYPES:
t_document_data TYPE sodocchgi1,
t_packing_list TYPE sopcklsti1,
t_attachment TYPE solisti1,
t_body_msg TYPE solisti1,
t_receivers TYPE somlreci1.
"Workareas
DATA :
w_document_data TYPE t_document_data,
w_packing_list TYPE t_packing_list,
w_attachment TYPE t_attachment,
w_body_msg TYPE t_body_msg,
w_receivers TYPE t_receivers.
"Internal Tables
DATA :
i_document_data TYPE STANDARD TABLE OF t_document_data,
i_packing_list TYPE STANDARD TABLE OF t_packing_list,
i_attachment TYPE STANDARD TABLE OF t_attachment,
i_body_msg TYPE STANDARD TABLE OF t_body_msg,
i_receivers TYPE STANDARD TABLE OF t_receivers.
"start-of-selection.
START-OF-SELECTION.
PERFORM send_mail.
"Form send_mail
" PACKING LIST table requires information about how the data in the
" tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are to be
" distributed to the documents and its attachments. The first row is
" for the document, the following rows are each for one attachment.
FORM send_mail .
"Subject of the mail.
w_document_data-obj_name = 'MAIL_TO_HEAD'.
w_document_data-obj_descr = 'Simple mail using SAP ABAP'.
"Body of the mail
PERFORM build_body_of_mail
USING:space,
'Hi,',
'I am fine. How are you? How are you doing ? ',
'This program has been created to send simple mail',
'with Subject,Body with Address of the sender. ',
'Thanks and Regards,',
'Venkat.O,',
'SAP HR Technical Consultant.'.
"Write Packing List (Body)
DESCRIBE TABLE i_body_msg LINES g_tab_lines.
w_packing_list-head_start = 1.
w_packing_list-head_num = 0.
w_packing_list-body_start = 1.
w_packing_list-body_num = g_tab_lines.
w_packing_list-doc_type = 'RAW'.
APPEND w_packing_list TO i_packing_list.
CLEAR w_packing_list.
"Fill the document data and get size of attachment
READ TABLE i_body_msg INTO w_body_msg INDEX g_tab_lines.
w_document_data-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( w_body_msg ).
"Receivers List.
w_receivers-rec_type = 'U'. "Internet address
w_receivers-receiver = <give mail id here>.
w_receivers-com_type = 'INT'.
w_receivers-notif_del = 'X'.
w_receivers-notif_ndel = 'X'.
APPEND w_receivers TO i_receivers .
CLEAR:w_receivers.
"Function module to send mail to Recipients
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_document_data
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = g_sent_to_all
TABLES
packing_list = i_packing_list
contents_txt = i_body_msg
receivers = i_receivers
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.
IF sy-subrc = 0 .
MESSAGE i303(me) WITH 'Mail has been Successfully Sent.'.
ELSE.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ENDFORM. " send_mail
" Form build_body_of_mail
FORM build_body_of_mail USING l_message.
w_body_msg = l_message.
APPEND w_body_msg TO i_body_msg.
CLEAR w_body_msg.
ENDFORM. " build_body_of_mail</pre>
Thanks
Venkat.O -
How do put an e-mail icon on navigation bar?
I am new to firefox & do not know how to get to my e-mail while on the browser. Can I put an e-mail icon on the browser somewhere that will start-up Outlook Express.
Firefox hasn't had a feature like that for over 5 years now. You need to install this extension to get that functionality and the icon.
http://webdesigns.ms11.net/getmail.html -
How can I get the mail body of the start point mail
Hi,
I am using 'MailStartPoint' activity to fetch mails using POP3 protocol. It is fetching the mail successfully. Now, how can I read the different parts of mail message such as Subject, Body in variables.
Thank You,
Hali Gerorge.You need to set data types values as below for reading the mail.
%SUBJECT%
%BODY%
%HEADER%
%SENDER%
Check this link for more details - http://help.adobe.com/en_US/livecycle/9.0/workbenchHelp/help.htm?content=001463.html
Also see "Use an e-mail start point" @ http://www.adobe.com/devnet/livecycle/videotraining.html
~ Varun -
How to put a long HTML body in a blank page?
Hi group,
I have done a home page in Word :), after that, I want to put the HTML header and body code in the blank page (APEX blank page).
HTML header is accepted without any problem, but when I try to paste the "html body" which was created very long APEX is not allowing me.
The next error is displayed:
ORA-20505: Error in DML: p_rowid=89, p_alt_rowid=ID, p_rowid2=116, p_alt_rowid2=FLOW_ID. ORA-01461: can bind a LONG value only for insert into a LONG column
Is there any way to put my code in a blank page inside of APEX, or how can I put it like my home page?
Any advice or help will be really appreciated.
Thanks in advance.
Kind regards,
FranciscoFrancisco Martínez Oviedo wrote:
Hi group,
I have done a home page in Word :)That's not :), it's very :(
Word-generated HTML and CSS is non-standard, bloated and incomprehensible.
Learn some basic HTML and CSS so you can author the content properly.
after that, I want to put the HTML header and body code in the blank page (APEX blank page).
HTML header is accepted without any problem, but when I try to paste the "html body" which was created very long APEX is not allowing me.Where are you putting this?
The next error is displayed:
ORA-20505: Error in DML: p_rowid=89, p_alt_rowid=ID, p_rowid2=116, p_alt_rowid2=FLOW_ID. ORA-01461: can bind a LONG value only for insert into a LONG columnThe code is too big for whatever APEX container you are trying to use. Did I say that HTML from Word is bloated junk? This will be 3 times bigger than it needs to be.
Is there any way to put my code in a blank page inside of APEX, or how can I put it like my home page?If you must persist with these crimes against mark-up, split the body code across several HTML regions on the page. -
How to put namespace into soapenv:Body with UTL_DBWS?
We are trying to make the following SOAP call from Oracle.
Outside Oracle (SoapUI v 3.6.1), the following call, generated by the tool, works:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebp="http://www.sap.com/EBPPBillDelivery" xmlns:ebp1="http://www.sap.com/EBPPTypes">
<soapenv:Header/>
<soapenv:Body>
<ebp:BillerDataMsg>
<!--Optional:-->
<ebp1:Authorization>
<ebp1:UserName>uid</ebp1:UserName>
<ebp1:Password>pwd</ebp1:Password>
</ebp1:Authorization>
</ebp:BillerDataMsg>
</soapenv:Body>
</soapenv:Envelope>
With UTL_DBWS, I have
l_service UTL_DBWS.service;
l_call UTL_DBWS.CALL;
l_service := UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI('file://appl/pc_files/spool/Wsdl/EBPPBSPServices.wsdl')
,service_name => UTL_DBWS.to_qname('http://www.sap.com/EBPPBSPServices','EBPPBSPServices')
l_call := UTL_DBWS.create_call (
service_handle => l_service
,port_name => UTL_DBWS.to_qname('http://www.sap.com/EBPPBSPServices', 'EBPPBSPServicesPort')
,operation_name => UTL_DBWS.to_qname('http://www.sap.com/EBPPBSPServices', 'getBillerData')
utl_dbws.set_property(l_call, 'OPERATION_STYLE', 'document');
utl_dbws.set_property(l_call, 'SOAPACTION_USE' , 'TRUE');
utl_dbws.set_property(l_call, 'SOAPACTION_URI', 'http://www.sap.com/EBPPBSPServices/getBillerData');
vx_xml_out := UTL_DBWS.invoke(
call_Handle => l_call
,request => XMLType('<?xml version="1.0" encoding="utf-8"?><ebp:BillerDataMsg xmlns:ebp="http://www.sap.com/EBPPBillDelivery" xmlns:ebp1="http://www.sap.com/EBPPTypes"><Authorization><UserName>uid</UserName><Password>pwd</Password></Authorization></ebp:BillerDataMsg>'));
*ORA-29532: Java call terminated by uncaught Java exception: port: {http://www.sap.com/EBPPBSPServices}EBPPBSPServicesPort does not contain operation: BillerDataMsg*
If I could manage to put namespaces xmlns:ebp="http://www.sap.com/EBPPBillDelivery" and xmlns:ebp1="http://www.sap.com/EBPPTypes" into soapenv:Envelope or soapenv:Body attributes, as I do in soapUI, it would work.
But I have found no fuhction with such functionality in UTL_DBWS.
Is using UTL_HTTP and making SOAP message manually the only way to call SAP web services? Normally, Oracle people advices to use UTI_DBWS over UTL_HTTP, but in this case it does not work.
IgorI prefer using UTL_HTTP directly for SOAP calls - and not UTL_DBWS that IMO has a very clunky interface. SOAP is simply a XML payload over HTTP. Not that complex to do natively using UTL_HTTP.
-
Hi,
I have a requirement to send the smartform as mail body. I was able to send the smartform as PDF attachment but we need it mail body. I tried converting to html but the data, tables and images are displaying in the distored way. Will it be possible to convert the smartform data to image and send as mail body? Please respond.
Thanks!Hi,
Try by below way
1) Generate a spool of that smartform.
2) Get the spool number from TSP01 table.
3) Get the html content of the spool, it can be done by below way
a) Use FM 'RSPO_DISPLAY_SPOOLJOB' providing the spool number,
b) Use FM 'LIST_FROM_MEMORY' to get content from memory.
c) Pass the content got by above FM to 'WWW_HTML_FROM_LISTOBJECT' to get the HTML content.
4) Now process using the CL_DOCUMENT_BCS, using the I_TYPE = html and I_TEXT = HTML content from above.
Thanks & Regards
Bala Krishna. -
Hello,
we activate ITSM in SAP Solution Manager 7.1 SPS10. We send an email to reporter at status change via an attached smart form. Everything is ok. But the body of the mail is empty. Does anybody have an idea how we can fill the mail body?
Regards,
HelmutDear Helmut,
As per my knowledge, Its not possible to add body in mail when you are using mentioned smart form and class.
But you can do this by method call action.
Please refere below sample code to send mail in HTML format.
lv_send_request TYPE REF TO cl_bcs,
lv_document TYPE REF TO cl_document_bcs,
lt_sender TYPE REF TO cl_sapuser_bcs,
*-- Create persistent send request
lv_send_request = cl_bcs=>create_persistent( ).
lv_sub = lv_subj.
*-- Create Document
lv_document = cl_document_bcs=>create_document(
i_type = cv_htm
i_text = lt_contents1
i_length = lv_doc_len
i_subject = lv_sub
i_language = sy-langu
i_importance = '5' ).
CALL METHOD lv_document->add_attachment
EXPORTING
i_attachment_type = 'jpg'
i_attachment_subject = 'logo'
* i_attachment_size = lv_img1_size
i_att_content_hex = lt_hex1.
TRY.
*-- Set the Message Subject
CALL METHOD lv_send_request->set_message_subject
EXPORTING
ip_subject = lv_subj.
CATCH cx_sy_dyn_call_illegal_method. "#EC NO_HANDLER
ENDTRY.
*-- Add document to send request
CALL METHOD lv_send_request->set_document( lv_document ).
*-- Do send delivery info for successful mails
CALL METHOD lv_send_request->set_status_attributes
EXPORTING
i_requested_status = 'E'
i_status_mail = 'A'.
*-- Set sender
lt_sender = cl_sapuser_bcs=>create( sy-uname ).
CALL METHOD lv_send_request->set_sender
EXPORTING
i_sender = lt_sender.
**-- Add the recipients to the Send mail
CLEAR : lv_rcv_email,lv_partner.
REFRESH : lt_bapiadsmtp,lt_return.
IF lv_recipient1 IS NOT INITIAL.
lv_partner = lv_recipient1.
CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'
EXPORTING
businesspartner = lv_partner
TABLES
bapiadsmtp = lt_bapiadsmtp
return = lt_return.
READ TABLE lt_bapiadsmtp INTO ls_bapiadsmtp INDEX 1.
IF sy-subrc EQ 0.
lv_rcv_email = ls_bapiadsmtp-e_mail.
ENDIF.
ENDIF.
CHECK NOT lv_rcv_email IS INITIAL.
lt_recipient = cl_cam_address_bcs=>create_internet_address(
lv_rcv_email ).
CALL METHOD lv_send_request->add_recipient
EXPORTING
i_recipient = lt_recipient
i_express = abap_true.
lv_send_request->set_send_immediately( 'X' ).
*-- Send Email
CALL METHOD lv_send_request->send(
EXPORTING
i_with_error_screen = abap_true
RECEIVING result = lv_result ).
Thanks,
Vikas -
How to put mail body while sending Payment Advice Note by mail
Hi,
I am sending payment advice form through mail using the BTE 2040.
Everything is fine and mail is coming properly but mail does not have any body line. It just contains the PDF as an attachment.
I want to put mail body in that. I have just copied the Script, I have not copied the driver program.
E.g
Hello,
Please find the payment advice note as an attachment.
Kindly advice how to put mail body in that mail, is there any BTE through which we can put the mail body?
Kindly help.
Regards
Sachin YadavHi,
I am sending payment advice form through mail using the BTE 2040.
Everything is fine and mail is coming properly but mail does not have any body line. It just contains the PDF as an attachment.
I want to put mail body in that. I have just copied the Script, I have not copied the driver program.
E.g
Hello,
Please find the payment advice note as an attachment.
Kindly advice how to put mail body in that mail, is there any BTE through which we can put the mail body?
Kindly help.
Regards
Sachin Yadav -
Rwclient, how to put E-mail body
Dear Gurus,
On Oracle AS, by using below comand I am able to generate reports and able to send them by Email but I would like to put Mail Body so could you please help me on this.
How to put E-mail body on this comand.
rwclient server=servicename report=reportname.rdf userid=dbusername/password@dbaliasname desformat=pdf destype=mail DESNAME=mailDESNAME=[email protected]@amazegifts.com SUBJECT="Amaze Gifts Mail"
Regards,
Satish Kumar Sadhu.Since email messages are text-based, only some email programs allow them to be viewed with html code to add color, style changes, etc. What you need to do is read some tutorials on basic html coding. i.e. <b>BOLD</b> would show BOLD with bold lettering.
Allen
Sun Developer Support -
E mail how to put photo into body of e-mail without recipient having to click downloadload
e mail how to put photo into body of e-mail without recipient having to click downloadload
What and how an email is seen on the other person's machine is dependent on their settings and not what you do. You can, for instance, send a HTML email, but if they haven't set their machine to deal with those, it won't work. It's all down to them.
-
How to send smartforms as pdf attachments with e mail
hi experts,
how to send smartforms as pdf attachments with e mail???
nitinHi
In the FORM Interface put proper parameter. Hope this helps. -
How to put page break in SMARTFORMS
Hi Guys,
Can anyone please let me know How to put page break in SMARTFORMS
Regards
AviHi,
Look at the below thread, you will get the answer
https://www.sdn.sap.com/irj/sdn/profile?userid=2522810
Regards
Sudheer -
How to send mail body using RE_CN_RA_INVOICE interface from RECPA520
Hi ABAP Guru,
I am using a standard interface RE_CN_RA_INVOICE for tcode RECPA520 for generating pdf form and send the corresponding PDF to corresponding address maintained in Business Partner.The problem is mail is sending with attachment but there is no mail body.
Please helpYou have to convert your long string to a table of shorter strings.
There may be other ways, but one possibility is to use a loop to process you string.
while (there is something left)
put the next e.g. 1024 characters in a new row of your table
endwhile
If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right
Maybe you are looking for
-
Report Parameters with logical database
Hello I have to read some HR infotypes that are provided with the logical database PNPCE. Fort his i have written a report that will use my logical database and get some information. What i need,are some new input parameters on the screen that are ad
-
Why can't I copy and paste album artwork with the new iTunes?
I updated to the new 10.5.1.(42) iTunes. Now I can't add album artwork like I always have. I open the artwork window in the lower left corner to access artwork. I used to be able to right click/copy and right click/paste. Now I can't. This is a
-
Content copier backup has contacts etc. but won't ...
I have a problem with Content Copier backups from my E71 to my PC. 1) I choose to backup everything. 2) Backup proceeds, but says there was an error: on viewing logs there is nothing listed under "These items could not be backed up" heading. Backup l
-
Possible to buy a Macbook with Danish keyboard in US Stores?
Now I'm living in Denmark, therefore I don't know whether it's possible to buy a MacBook with Danish keyboard in US. The price - for let's say the new Retina - in US is $2199 while it costs nearly $3099 in Europe. The saving is nice. The only problem
-
Unable to read french characters
Im trying to reach data from an excel (using the Apache software's excel reader code) but my java code is not recognizing words like "D�cor". It is replacing '�' with '?'(All my columns are in English , it is just a couple of data entires like D�cor