ITSM mail body is empty
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,
Helmut
Dear 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
Similar Messages
-
ERMS : Auto Acknowledgement Mail , Subject and Mail Body is empty
Hi Guys ,
We have set up an auto acknowledgement mail scenario . Acknowledgement mail is triggered , but the subject line and mail content are empty.
We are using email forms here .
If anyone has faced the same challenge , please let me know .
Thanks
VinayakHello,
Hard to say. Mail forms are language dependant. Did you check that your mail form is maintained in the language used to generate the email (it is based on the user generating the email I believe) ?
Best regards,
Sylvain -
Unable to get source file content as mail body in file to mail scenario
Hi Friends,
I am facing one problem with one of my file to mail scenario in PI(SP9). I have done bypass scenario(without IR only with ID objects). Scenario is working fine, i am getting mail also. But my requirement is i want complete source file content as a mail body (not xml format, text format). I have checked all options, but configured scenario bydefault taking source content as a attachment and mail body is empty. I have tested below options
1. If i choose message protocol as FCC mechanism at source side content at target side i am getting xml format as a attachment( In mail adapter i have selected message protocol as xi payload, and without packate option on mail adapter). If i choose message protocol as xi all, i am getting 2 files as a attachment (one file as a payload content and second file as a source file content in xml format).
2. If i choose message protocol as file at souce side that time i am getting source complete content as a attachment at target side in xml format, but mail attached file content is flat file(.xml extension) format. When i tried to open attachment file that time i am getting error in explorer, but i can see only one row in explorer remaining rows unable to see.
Please share your ideas on this.Hi,
Follow below steps
1. First basis level need to configure setup(SMTP) for mail. After that only mail will go from SAP.
2. Source side depending on requirement take communication channel(idoc, file etc)
3. Receiver side communication channel take mail adapter and configure below setup
3.1 select message protocol XI ALL/ XI PAYLOAD(WITH PACKAGE or WITHOUT PACKAGE)
3.2 if message protocol is XI ALL, the complete content will be sent as a attachment along with payload file
3.3 if message protocol is XI PAYLOAD, the source message, the source message will be sent as attachment. Playload file filter automatically.
3.4 If you use PACKAGE option on mail adaper, this time source strucute need to import from SAP (some standard structure only will be support, without strucutre we can't work). If you choose package option no need to give mail id on communication channel, we need to pass mail id's from source structure.
I hope now clear. -
Message body is empty, when calling wf_notification.send ,
hi,
i am sending a messages to 5 peoples, using wf_notification.send api.
but the when i check the emails, mesage body is empty.
prior to calling wf_notification.send Api,
my message body has been generated by the message attribute of type document(plsqlclob), iam using wf_engine.setItemAttribute and the argument avalue is like this
avalue=> 'plsql:koc_overtime_web_pkg02.show_mgr_message_TST/'||itemtype || ':' || ItemKey) for setting this message attribute(this will generate html)
Shall i need to use any callback function in my send api.
regards.
zameer.If you are using WF_ENGINE.SetItemAttrText API, I see that you have a workflow item that is launched. In such a case you could just have a notification activity within the same process that will send the notification and the e-mail appropriately.
Why do you use WF_NOTIFICATION.Send using an attribute value that is set from a Workflow item.
Typically WF_NOTIFICATION.Send function is used to send a notification outside of a workflow process. Typically you would use a workflow message definition and corresponding message attribute definition and use the following code to send the notification.
declare
l_nid number;
l_user varchar2(320) := '&1';
l_begin_date date;
begin
l_nid := wf_notification.send(l_user, 'CS_MSGS', 'FYI_MESSAGE');
wf_notification.setattrtext(l_nid, 'SENDER', 'Oracle Workflow Testing Mailer');
wf_notification.setattrtext(l_nid, 'MESSAGE_TEXT', ' Message sent at '||to_char(sysdate,'DD-MON-RRRR HH24:MI:SS')||' DB server time');
wf_notification.denormalize_notification(l_nid);
commit;
end;
/As you can observe, I do not depend on any workflow item for any attribute information. Please note that in case if there is a requirement to depend on a workflow item, it is required that you need to pass a Callback function and Context to WF_NOTIFICATION.Send function in order for the workflow item attribute information to be copied over to notification attributes. -
Email Sapscript with an individual mail body
Hi
we are sending Sales documents via NAST and SCOT as email to our customer. Currently the document is converted into Pdf and added as attachment to the mail. We can only change the subject line. It is not possible for us to fill the mail body. The body is completly empty.
We would like to fill it with some personalized information.
Have you any ideas, how to do this?
Best regards
RaunoHi Vishal
I am not directly using a function module. We set the output type in the NAST record to '5' and SAP does the rest (Transformation into pdf, reading the email-adress from mail partner in the SD-document,...)
Regards
Rauno -
Prob in getting Mail body for the standard tcode F150(Dunning).
Hello all,
I am using F150 for the dunning notice print out.After seeing the display of the dunning notice once we come back it populates a popup window where it asks to send the mail to the particular mailid or not. I have used the BTE --- SAMPLE_PROCEE_00001040 and copied it as z function module and customised according to my requirement in order to get the mail id of the customer in the pop up.My mail is going to the customers mail id properly only but my prob is that we are not able to get any mail body for that particular mail.Where can we add the mail body text to that mail in the standard tcode f150.can any one suggest is it possible or not.
Regards,
Pavani.
Edited by: Pavani Rayappureddi on Aug 11, 2009 11:21 AMsolved my self.
added C_ITCPO-TDTITLE = 'Pending Receivables Statement-XXX GROUP'.
in the bte code. -
Lost mail body and marked messages - Maverick Upgrade
I lost some message body (they are listed but have no content) and 15 out of 16 messages marked with a flag where not in the Marked Message Folder. That happened after upgrading to Maverick. I tried to replace only the Mail folder in the libraray with the old one from Time Capsule. Didn't work. Had to reinstall whole system.
i had lost mail body, this is how i fixed it:
hold option, click GO in the top bar (where the apple icon lives), go to library > Mail > V2
now here's where things may differ slightly, i lost the body of mails i had moved to my computer (on my mac), plus i'm using Gmail accounts, that being said, inside the mailboxes folder is where the local folders are and Mail decided to create duplicate folders of some of them so i had
Clients.mbox (with some emails)
Clients-2.mbox (with the missing ones)
i then moved the Clients-2.mbox to the desktop, went File > Import (in Mail) then selected Apple mail as the import type, selected the mbox folder on the desktop and imported them into mail at which stage i just moved them back in to the clients folder where they belong.
i still have an issue where the reply arrow (next to email subjects of replied emails) is linking to completely irrelevant emails, that is not good. unless apple fixes it asap i would recommend moving to another email program as the Mail dev team has not only dropped the ball but stabbed it repeatedly with a blunt rusty object. -
I need to put hyperlink in th mail body.I am using the following lines to display the hyperlink........................
<a href = xyz.com > test </a>
But the problem is that instead of displaying the test hyrerlink it is showing me :-
<a href = _xyz.com_ > test </a>.
How to fix this problem.Here it is
<a href="www.xyz.com"> test </a>
that's it.
Regards,
IA
Edited by: Imthiaz Ahmed on Apr 9, 2008 4:55 PM -
Create hyperlink for reply to in mail body while sending email.
Hi All,
We have a requirement where we need to create an hyperlink for reply to in the mail body.
We have implemented entire functionality using CL_BCS classes and everything is working fine.
Only problem we have is when we give document type as HTM instead of RAW then entire formatting of mail body gets disturbed although we get the hyperlink.
Is there any way where we can send the mail in html format using CL_BCS,CL_DOCUMENT_BCS ?
KR Jaideep,Hi ,
Please find the code below I am using to make the hyperlink. Do I need to fill the entire mail body using HTML Tags ? If yes, then I guess it will increase the complexity of program as the mail content will vary from one mail to another depending upon whether different invoice documents have text maintained in them.
lwa_text = '<html>'.
APPEND lwa_text TO li_text.
CLEAR lwa_text.
lwa_text = '<body>'.
APPEND lwa_text TO li_text.
CLEAR lwa_text.
lwa_text = text-012.
APPEND lwa_text TO li_text.
CLEAR lwa_text.
CONCATENATE '<a href="mailto:'
lv_receiver
'">'
lv_receiver
'</a>'
INTO lwa_text.
APPEND lwa_text TO li_text.
CLEAR lwa_text.
lwa_text = '</body>'.
APPEND lwa_text TO li_text.
CLEAR lwa_text.
lwa_text = '</html>'.
APPEND lwa_text TO li_text.
CLEAR lwa_text.
TRY.
CALL METHOD cl_document_bcs=>create_from_text
EXPORTING
i_text = li_text
i_documenttype = 'HTM'
i_subject = 'Test for hyperlink'
i_importance = '1'
i_sensitivity = 'P'
RECEIVING
result = lref_document_bcs.
CATCH cx_document_bcs .
ENDTRY. -
How to get the content of message in the mail body
Hi,
Can anyone suggest me to get the message content as the mail body using messagetTransformation bean????Hi
In the Receiver Mail Adapter use these settings
Message Protocol:XIPAYLOAD
and tick on Use mail package.
Gt back if you have more doubts
Thanks -
Mail Adapter Use Mail Package, Mail Body and Attachment
Hello
Have some body a idea, how I can configure the mail adapter with use mail package, that I have in the mail a attachment with content from the messages and a mail body with also text from the message.
Thanks for your reply.
Regards Tom
The different Weblog , I have check:
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-addressHi Thomas,
If you are configuring your Mail adapter as reciever then refer
http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
your sender (say file) should have some message like this
<i>
<ml:Mail xmlns:ml=http://sap.com/xi/XI/Mail/30>
<Subject>Important</Subject>
<From>[email protected]</From>
<To>[email protected]</To>
<X_Mailer>Outlook Express </X_Mailer>
<Content>
This is the content.
</Content>
</ml:Mail></i>
And for Sender Mail Adpater
http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
Hope this will be helpful
Regards
Suraj -
Pulling e-mail body for variable in job
We currently are using the Email Event in TES to pull a single string from an e-mail trigger into a variable in a job. However, we are now looking to see if we can put multiple strings into an e-mail and use them for multiple variables in a single job. Is this a possibility, and if so, how should the strings be seperated? If it is not a possibility, is anyone else pulling in multiple strings from an outside source like email to populate job variables? We are currently runing ver. 5.3.1.
Hi Rachana,
The problem with this was that, there was some configuration problem with the transaction SCOT.
When the mail was sent to my client's ID: the E-Mail body looked perfect, but when it was sent to my Company's ID it was distorted.
Please check, this could be the problem and let me know if you face further issues.
Thanks & Regards,
Goutham. -
How is the e-mail body text determined when e-mail sent from PO in edit mod
We have an e-mail that is sent to the supplier when the buyer edits the po then goes to header-output - create and send immediately. We want to remove the SAP default Salutation
Best Regards,
Your Purchasing Company
The problem is we cannot find where this e-mail body is being created. Any ideas?
SandraHello,
The email body text that you get at SOST is from the cover form BBP_OUTPUT_COVER.
When you Order a PO, the following is the text is seen in SOST.
"&LV_TITLE&
Please find enclosed the purchase order &IV_PO_HEADER-OBJECT_ID& &IV_PO_
Kind regards,
Your purchasing company"
You can create your own cover form in order to substitute the standard BBP_OUTPUT_COVER.
Regards,
Ricardo -
Hi All,
I need to know whether it is possible to use multiple font styles in the body of an e-mail sent through a report program.
I am using the FM 'SO_DOCUMENT_REPOSITORY_MANAGER' as I want to send a document from the desktop as an e-mail attachment.
The FM 'SO_DOCUMENT_SEND_API1' does not serve the primary purpose of my requirement. So, it is eliminated.
Please suggest any method to achieve the requirement of using multiple font styles in e-mail body.
Thanks,
DawoodIf you set the document to be a HTML type, then you can use HTML scripting to set
the font.
Create send request
send_request = cl_bcs=>create_persistent( ).
Create html content:
mail_line = '.mail TBODY,{font-family:verdana;font-size:10pt;}'.
append mail_line TO mail_text.
... (your text)
Create document with type 'HTM' and provide your HTML scripting
document = cl_document_bcs=>create_document( i_type = 'HTM'
i_text = mail_text
i_subject = 'Subject' ).
Add document to send request
CALL METHOD send_request->set_document( document ).
Send document
CALL METHOD send_request->send( ). -
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
-
Unable to log in to newly create client copy
I 'm attempting to create a new client from a newly installed ECC 6.0 IDES system. I go into SCC4 and create a new lient '200' and log off. I try to log in to client 200 using sap* and pass and get wrong username or password error. I can see the clie
-
Set default value for OAMessageLovInputBean
I have DFF(standard) enabled on the page. The requirement is to disable / hide one of the flex fields on the page. Since the field is read only, I am trying to default the value in CO using below code OAPageLayoutBean page = oapagecontext.getPageLayo
-
Serial Number problem Adobe Acrobat Pro XI - Illustrator CS6
Bonjour J'ai reçu hier les programmes Adobe Acrobat Pro XI et Illustrator CS6 par mon Université. J'ai reçu aussi les deux licences qui vont avec. Maintenant quand j'essaie de introduire les deux licences un message "we are unable to validate this s
-
Cannot find file/exclamation point!!!
Some of my music in itunes will not play, it seems completely random which ones play and which ones decide not to. One day the song may play and the next day the exclamation point will appear beside the song when I try to play it. Please help, this i
-
Can't play sims 2 or 3 anymore
I had been playing sims 2 on my computer for the last 2 years. Suddenly I couldn't play the Sims 2 or 3 games. I get a mssg. that the data can't be read, to contact support systems. I'm able to play other games that are not EA games. I called EA game