BExBroadcasting - manipulate pdf mail-attachment filename
we are broadcasting BW-reports via BExBroadcaster and generated PDFand sending mail-attachements to some BW-users.
is there any chance to change or manipulate the filename of these generated PDF mail-attachements ?
e.g. shorter filename with lower-case Characters (less than 32 char)
we are broadcasting BW-reports via BExBroadcaster and generated PDFand sending mail-attachements to some BW-users.
is there any chance to change or manipulate the filename of these generated PDF mail-attachements ?
e.g. shorter filename with lower-case Characters (less than 32 char)
Similar Messages
-
Creating a PDF-Mail-Attachment via Abap Mapping possible ?
Hi folks,
I am trying to build a szenario like: Getting an Idoc -> sending it to abap mapping -> map a pdf from smartforms in abap -> map the from/to for the mail payload -> come back from abap mapping -> send it with the mail adapter .
But now I am stuck at the point "coming back from abap mapping", because the pdf -data seems to become unreadable because of conversion. I am using Ixml and trying to attach the create pdf (looks hex-right at that point) by method create_simple_element as content-tag of the mail. But after rendering and coming back out of mapping, it seams that that data is not converted from xstring back in the right way. Can someone give a hint ? Is that way by IXML not possible for data including binary-data ? Have I to go another way?
Thanks in advance
Detlef> as content-tag of the mail.
Sometimes I have to read the request several times to find the issue:
No you cannot put a binary as part of an XML element.
You can only send a plain binary as payload, so the whole mail would be nothing besides the PDF.
In PI 7.1 you can create also an additional attachment out of mapping, but I do not know if this works for ABAP mapping also.
The whole "I want to send an email with attachment out of PI" topic is not supported from PI development in any way.
So you have to write a lot of code (especially Java code) to achieve this.
> Regarding your opinion. Its based on customer requirements to have central focal point in dezentral landscape.
The PI expert has to advise the customer for the scenarios. That is part of the job. -
PDF Mail Attachement HypeText Link
Hello,
It seems that you can't activate a hypertext link in a pdf document via Iphone Email Reader (3GS/4 ios5.11).
As i open it in IBooks, the Hypertext Links are activated and do operate.
Is that "normal" ?
Thanks for your help,
Regards,
Philip.Oli,
I can't find any reference to a similar bug, and I've never seen this before. However, 3.0 is now a desupported version, so the best advice I can give would be to move to 6i, apply the latest patch, and if you still see the issue then contact support.
Regards,
Danny -
Hi Friends,
I need expertise help in pdf email attachment. I have data in internal table which has to be sent as pdf mail attachment. I need help in converting the data to pdf format. After conversion I can use SO_NEW_DOCUMENT_ATT_SEND_API1 to send the mail.
Expect earliest reply.
Thanks,
NidhyaDear Friends,
Thanks for your reply, but I need help in converting the data in internal table to pdf.
Pls find my code below: With this code, I get email send with PDF attach, but the data inside the file is not in correct format.
Pls help me to correct.
DATA : mailrec LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
mailbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
mailbin1 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
mailhead LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_otf LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_pdf LIKE solisti1 OCCURS 0 WITH HEADER LINE,
mailstruc LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
maildata LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF i_sotf OCCURS 0.
INCLUDE STRUCTURE itcoo.
DATA : END OF i_sotf.
DATA : i_itcpo LIKE itcpo,
i_itcpp LIKE itcpp.
DATA : v_tlines TYPE i,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen.
maildata-obj_name = 'Document'.
maildata-obj_descr = 'Transfer Details'.
maildata-obj_prio = 1.
maildata-doc_size = strlen( mailtxt ).
mailstruc-head_start = 1.
mailstruc-head_num = 0.
mailstruc-body_start = 1.
mailstruc-body_num = 1.
mailstruc-obj_name = 'transfer'.
mailstruc-doc_type = 'RAW'.
APPEND mailstruc.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
APPEND mailrec.
CLEAR i_itcpo.
i_itcpo-tdgetotf = 'X'.
REFRESH mailbin.CLEAR mailbin.
WRITE 'Report Title:' TO mailbin-line+3.
WRITE sy-repid TO mailbin-line+18.
APPEND mailbin. CLEAR mailbin.
WRITE 'User : ' TO mailbin-line.
WRITE sy-uname TO mailbin-line+11.
APPEND mailbin. CLEAR mailbin.
WRITE 'Date of Report : ' TO mailbin-line+3.
WRITE sy-datum USING EDIT MASK mask MM/DD/YYYY TO mailbin-line+21.
APPEND mailbin. CLEAR mailbin.
WRITE 'Time of Report : ' TO mailbin-line+3.
WRITE sy-uzeit TO mailbin-line+21.
APPEND mailbin. CLEAR mailbin.
APPEND mailbin.
WRITE 'Transfer ' to mailbin-line+3.
APPEND mailbin. CLEAR mailbin.
APPEND mailbin.
WRITE sy-uline TO mailbin-line+3.
APPEND mailbin. CLEAR mailbin.
LOOP AT i_disp.
SHIFT i_disp-index LEFT DELETING LEADING '0'.
WRITE i_disp-index TO mailbin+3.
WRITE i_disp-pernr TO mailbin+6.
WRITE i_disp-ename TO mailbin+16.
WRITE i_disp-persk TO mailbin+57.
WRITE i_disp-btrtl TO mailbin+60.
APPEND mailbin. CLEAR mailbin.
ENDLOOP.
CALL FUNCTION 'SX_OBJECT_CONVERT_SCR_OTF'
EXPORTING
FORMAT_SRC = 'RAW'
FORMAT_DST = 'OTF'
DEVTYPE = 'POSTSCPT'
FUNCPARA = ''
LEN_IN = v_len_in
IMPORTING
LEN_OUT = v_len_out
TABLES
CONTENT_IN = mailbin
CONTENT_OUT = mailbin1
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH mailbin.
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
FORMAT_SRC = 'OTF'
FORMAT_DST = 'PDF'
DEVTYPE = 'POSTSCPT'
FUNCPARA =
LEN_IN = v_len_in
IMPORTING
LEN_OUT = v_len_out
TABLES
CONTENT_IN = mailbin1
CONTENT_OUT = mailbin
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH mailbin1.
DESCRIBE TABLE mailbin LINES v_tlines.
mailstruc-head_start = 1.
mailstruc-head_num = 0.
mailstruc-body_start = 1.
mailstruc-body_num = v_tlines.
mailstruc-transf_bin = 'X'.
mailstruc-doc_type = 'PDF'.
mailstruc-obj_name = 'Mid-month transfer'.
mailstruc-doc_size = v_tlines * 255.
APPEND mailstruc.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = maildata
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = mailstruc
OBJECT_HEADER = mailhead
CONTENTS_BIN = mailbin
RECEIVERS = mailrec
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
But i dont get the result in expected format. I am not getting first 2 characers of the line. instead of report, date, time in separate line I get everything in a single line as follows :
Report Title: ZHRPY0003
er : VACNIDHYA Date of Report : 02.05.2007 Time of Report
: 10:31:27 Mid-month Inter-Company Transfer
--- 1 00002609 Carla Pineda FT
2010
- 1 - -
Email attachment filenames appear as "mail attachment".doc or "mail attachment."pdf
Hi,
I have Mac OS 10.7.5, I've synchronised my hotmail/outlook address to Mail application.
I have no issues with sending or receiving emails with attachments.
The problem I'm having is that the filename of all attachments appear as "mail attachment.doc" for Word files or as "mail.attachment.pdf" for PDF files.
1) If I log on to my hotmail account through the browser the attachments appear with the correct file name.
2) The attachment file names happen to also appear correctly on my iPhone.
3) I have other mailboxes set up in Mail application and attachment file names appear correct.
It seems to be an issue with Mail application and the hotmail/outlook account.
I would appreciate if anyone can give me some feedback on this issue.
Kind regards,
Doble KoronaPeter
Some things to try - after each step, see if it works...
Ensure that you have the latest version of the OS and Quicktime and iPhoto.
1. Repair Permissions using Disk Utility
2. Delete the com.apple.iPhoto.plist file from the home / library / preferences folder. You'll need to reset your User options afterwards.
3. Download BatchMod from
http://macchampion.com/arbysoft/
And apply it to the iPhoto Library Folder using the settings found here:
http://homepage.mac.com/toad.hall/.Pictures/Forum/BatChmod.png
(Credit to Old Toad for this one).
4. Create a new account (systempreferences -> accounts) and see if the problem is repeated there. If it is, then a re-install of the app might be indicated. If it's not, then it's likely the app is okay and the problem is something in the main account.
Regards
TD -
Exporting a crystal report as PDF and Attaching to an email via code - Filename Issuses?
Post Author: alynch
CA Forum: .NET
I need to export a crystal report as a pdf and send it out via email. I have created a subroutine that works but the attached filename come up as "untitled.txt" so the receiving machine believes it is a text file. If I rename it on the recipients machine to a ".pdf" I can open it with acrobat and it looks OK. Does anyone know how to rename the file as a pdf prior to sending it out?
Thank You.
al
I have included a copy of the subroutine:
Dim repdoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
Dim diskOpts As New CrystalDecisions.Shared.DiskFileDestinationOptions()
Dim ExpOpts As CrystalDecisions.Shared.ExportOptions
Dim MailOpts As New CrystalDecisions.Shared.MicrosoftMailDestinationOptions()
repdoc = Me.CrystalReport11
repdoc.Load("C:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\WindowsApplication3\WindowsApplication3\CrystalReport1.rpt")
ExpOpts = repdoc.ExportOptions
With ExpOpts
.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.MicrosoftMail
.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
End With
With MailOpts
.MailMessage = "Message"
.MailToList = "enter email adress here"
.MailSubject = "Attached is a PDF file - .net Export test "
End With
ExpOpts.DestinationOptions = MailOpts
Try
repdoc.Export()
Catch err As Exception
MessageBox.Show(err.ToString())
End Try
End SubPost Author: Knight
CA Forum: .NET
I had this same problem today, here's what I used. Its built in 2 parts. Step one loops throught and exports PDF copies of a traking report. Step 2 builds an email list from a SQl query and sends it.STEP ONE:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'Declare the some variables Dim row1 As DataRow Dim brokerID As String Dim brokername As String Dim brokerEmail As String Dim shipdate As String Dim crParameterFieldDefinitions As ParameterFieldDefinitions Dim crParameterFieldDefinition As ParameterFieldDefinition Dim crParameterValues As New ParameterValues() Dim crParameterDiscreteValue As New ParameterDiscreteValue() Dim crParameterFieldDefinitions1 As ParameterFieldDefinitions Dim crParameterFieldDefinition1 As ParameterFieldDefinition Dim crParameterValues1 As New ParameterValues() Dim crParameterDiscreteValue1 As New ParameterDiscreteValue() Dim CrReport As New CrystalReport1() ' Report Name Dim report As ReportDocument = "O:KNIFormats_ReportPrivateSMStageShipmentInfo" Dim CrExportOptions As ExportOptions Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions() Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions() Dim SHIPDATE123 As String SHIPDATE123 = _month & "/" & _day & "/" & year Dim db As String db = System.Configuration.ConfigurationSettings.AppSettings("Datalogin") Dim sqlCon As New SqlConnection sqlCon.ConnectionString = db Dim strsql1 As String strsql1 = "SELECT tblSOOrd_Hdr.BrokerCd, tblSO_Ord_Hdr.BrokerName, tblSM_Ship_Hdr.ShipDate " strsql1 &= "FROM tblSO_Ord_Hdr INNER JOIN tblSM_Ship_Hdr ON tblSO_Ord_Hdr.Locale = tblSM_Ship_Hdr.Locale AND tblSO_Ord_Hdr.OrdNo = tblSM_Ship_Hdr.OrdNo AND " strsql1 &= " tblSO_Ord_Hdr.RlsNo = tblSM_Ship_Hdr.RlsNo INNER JOIN tblSys_Cust_Broker ON tblSO_Ord_Hdr.BrokerCd = tblSys_Cust_Broker.BrokerCd " strsql1 &= "GROUP BY tblSO_Ord_Hdr.BrokerCd, tblSM_Ship_Hdr.ShipDate, tblSO_Ord_Hdr.BrokerName " strsql1 &= "HAVING (tblSM_Ship_Hdr.ShipDate = '" & SHIPDATE123 & "') " Dim da1 As New SqlDataAdapter(strsql1, sqlCon) Dim worktbl1 As DataTable worktbl1 = New DataTable("tblEmail") da1.Fill(worktbl1) da1.FillSchema(worktbl1, SchemaType.Source) If worktbl1.Rows.Count > 0 Then For Each row1 In worktbl1.Rows brokerID = CStr(row1("BrokerCd")).Trim brokername = CStr(row1("BrokerName")).Trim shipdate = CStr(row1("ShipDate")).Trim CrReport.Load() crParameterDiscreteValue.Value = shipdate crParameterFieldDefinitions = CrReport.DataDefinition.ParameterFields crParameterFieldDefinition = crParameterFieldDefinitions.Item("ShipDate") crParameterValues = crParameterFieldDefinition.CurrentValues crParameterValues.Clear() crParameterValues.Add(crParameterDiscreteValue) crParameterFieldDefinition.ApplyCurrentValues(crParameterValues) crParameterDiscreteValue1.Value = brokerID crParameterFieldDefinitions1 = CrReport.DataDefinition.ParameterFields crParameterFieldDefinition1 = crParameterFieldDefinitions1.Item("Broker") crParameterValues1 = crParameterFieldDefinition1.CurrentValues crParameterValues1.Clear() crParameterValues1.Add(crParameterDiscreteValue1) crParameterFieldDefinition1.ApplyCurrentValues(crParameterValues1) CrDiskFileDestinationOptions.DiskFileName = "c:Test_Folder20" & _year & "-" & _month & "-" & day & "" & brokername & ".pdf" CrFormatTypeOptions.FirstPageNumber = 1 ' Start Page in the Report CrFormatTypeOptions.LastPageNumber = 1000 ' End Page in the Report CrFormatTypeOptions.UsePageRange = True CrExportOptions = CrReport.ExportOptions With CrExportOptions .ExportDestinationType = ExportDestinationType.DiskFile .ExportFormatType = ExportFormatType.PortableDocFormat .DestinationOptions = CrDiskFileDestinationOptions .FormatOptions = CrFormatTypeOptions End With Try CrReport.Export() Catch err As Exception MessageBox.Show("DID NOT EXPORT") End Try Next MessageBox.Show("All PDF's exported succesfully") End If End SubSTEP 2: Private Sub Button3Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim row2 As DataRow Dim SHIPDATE123 As String SHIPDATE123 = _month & "/" & _day & "/" & year Dim db1 As String db1 = System.Configuration.ConfigurationSettings.AppSettings("Datalogin") Dim sqlCon As New SqlConnection sqlCon.ConnectionString = db1 Dim strsql2 As String strsql2 = "SELECT tblSOOrd_Hdr.BrokerCd, tblSys_Cust_Broker.BrokerName, tblSM_Ship_Hdr.ShipDate, tblSys_Cust_Broker.ContactEmail " strsql2 &= "FROM tblSO_Ord_Hdr INNER JOIN tblSM_Ship_Hdr ON tblSO_Ord_Hdr.Locale = tblSM_Ship_Hdr.Locale AND tblSO_Ord_Hdr.OrdNo = tblSM_Ship_Hdr.OrdNo AND " strsql2 &= " tblSO_Ord_Hdr.RlsNo = tblSM_Ship_Hdr.RlsNo INNER JOIN tblSys_Cust_Broker ON tblSO_Ord_Hdr.BrokerCd = tblSys_Cust_Broker.BrokerCd " strsql2 &= "GROUP BY tblSO_Ord_Hdr.BrokerCd, tblSM_Ship_Hdr.ShipDate, tblSys_Cust_Broker.ContactEmail, tblSys_Cust_Broker.BrokerName, tblSys_Cust_Broker.Email_ASN " strsql2 &= "HAVING (tblSM_Ship_Hdr.ShipDate = '" & SHIPDATE123 & "') AND (tblSys_Cust_Broker.Email_ASN = 1) AND (tblSys_Cust_Broker.ContactEmail <> '') " Dim da1 As New SqlDataAdapter(strsql2, sqlCon) Dim worktbl2 As DataTable worktbl2 = New DataTable("tblEmail12") da1.Fill(worktbl2) da1.FillSchema(worktbl2, SchemaType.Source) Dim brokerID As String Dim brokername As String Dim brokerEmail As String Dim shipdate As String If worktbl2.Rows.Count > 0 Then For Each row2 In worktbl2.Rows brokerID = CStr(row2("BrokerCd")).Trim brokername = CStr(row2("BrokerName")).Trim brokerEmail = CStr(row2("ContactEmail")).Trim shipdate = CStr(row2("ShipDate")).Trim Dim mail As New MailMessage Dim att As String att = "c:Test_Folder20" & _year & "-" & _month & "-" & _day & "" & brokername & ".pdf" 'set the addresses mail.From = New MailAddress("[email protected]") mail.To.Add(brokerEmail) mail.Attachments.Add(New Attachment(att)) 'set the content mail.Subject = "Shipment Tracking report from Knox Nursery for " & SHIPDATE123 mail.IsBodyHtml = True mail.Body = "
" mail.Body &= "This shipment update has been requested by:
" 'send the message Dim smtp As New SmtpClient smtp.Send(mail) ' MessageBox.Show("No Records Found", "Failed to send", MessageBoxButtons.OK, MessageBoxIcon.Stop Next Else MessageBox.Show("No broker have opted in", "No Emails Sent", MessageBoxButtons.OK, MessageBoxIcon.Information) End If MessageBox.Show("Emails sent... ", "Emails Sent", MessageBoxButtons.OK, MessageBoxIcon.Information) End Sub -
Sending mail with PDF file attachment ?
Hi All,
I have scenario File ---> Mail, monitoring FTP directory for PDF file and sending using mail attachment.
At the moment i am using JAVA mapping to construct the mail package structure follow all the step in this blog : XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
it is working if i am using text file but then how to encode the pdf content so i can send throught the mail adapter. ?
Thank you and Best Regards
FernandHi,
Actually, i am using this java code below :
try {
// create XML structure of mail package
String output = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<ns:Mail xmlns:ns=\"http://sap.com/xi/XI/Mail/30\">"
+ "<Subject>" + mailSubject + "</Subject>"
+ "<From>" + mailSender + "</From>"
+ "<To>" + mailReceiver + "</To>"
+ "<Content_Type>multipart/mixed; boundary=\"" + boundary + "\"</Content_Type>"
+ "<Content>";
out.write(output.getBytes());
// create the declaration of the MIME parts
//First part
output = "--" + boundary + CRLF
+ "Content-Type: text/plain; charset=UTF-8" + CRLF
//+ "Content-Transfer-Encoding: 8bit" + CRLF
+ "Content-Disposition: inline" + CRLF + CRLF
+ mailContent + CRLF
//Second part
+ "--" + boundary + CRLF
+ "Content-Type: Application/pdf; name=" + attachmentName + CRLF
//+ "Content-Transfer-Encoding: base64" + CRLF
+ "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;
out.write(output.getBytes());
//Source is taken as attachment
copySource(in, out);
out.write("</Content></ns:Mail>".getBytes());
} catch (IOException e) {
throw new StreamTransformationException(e.getMessage());
protected static void copySource(InputStream in, OutputStream out)
throws IOException {
byte[] bbuf = new byte[in.available()];
int bblen = in.read(bbuf);
if (!(bblen < 0)) {
//String sbuf = new String(bbuf);
//String encoded = Base64.encode(sbuf);
// replace all control characters with escape sequences
//sbuf = sbuf.replaceAll("&", "&");
//sbuf = sbuf.replaceAll("\"", """);
//sbuf = sbuf.replaceAll("'", "'");
//sbuf = sbuf.replaceAll("<", "<");
//sbuf = sbuf.replaceAll(">", ">");
out.write(bbuf);
This code working fine with text file but not for pdf file. because i got error in mail adapter :
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: java.lang.NullPointerException; nested exception caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 8f(:main:, row:11, col:4)(:main:, row=11, col=4) -> com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 8f(:main:, row:11, col:4)
I guest the problem because the mail adapter doen't accept pdf content insite the mail package.
please advise me
Best Regards
Fernand -
How to run 2 reports to send 1 PDF e-mail attachment instead of 2 e-mails.
I used 9i Reports to create 2 reports in a PDF format. I run these reports from a 9i form using the web.show_document command. XML is used to send the 2 e-mails with the reports.
Is there a way I can combine the running of the reports to make one PDF to created 1 e-mail attachment or run the reports at the same time and attach 2 PDF files to 1 e-mail.
I have no problems running 1 report and sending 1 e-mail attacment!
This is example of the XML used in creating the e-mail:
- <destinations>
- <foreach>
- <file id="Test" name="REPORT_1.pdf" format="pdf" instance="XXXX">
<include src="report" />
</file>
</foreach>
- <!-- Send a mail with an attachment
-->
- <mail id="ex1" to="&DESNAME" from="&DESNAME" subject="&DESNAME;*;&p_postal_number: was submitted for
approval on &p_postal_date">
<body srcType="text">This is to notify you of a new submission that requires an approval before being
sent to out. Please use the URL link below to review the information as soon as possible.
https://xxxx.aaaa.sss.com:234/web_html/static.html AAAA Administrator</body>
- <attach format="pdf" name="Report_1&.pdf" srcType="report">
<include src="mainSection" />
</attach>
</mail>
</destinations>You can use iText to combine two PDF files into one.
-
Error while opening PDF in mail attachment
Hi All,
In smartform i am sending a mail with attachemnt as PDF file,there is one more option like preview of smartform .
issue is like i am able to see the preview of the same record but when it is sent in mail attachement,and while opening PDF its showing error that file can not be open it is corrupted.
Please help.
Mona Singh.Dear Sandra
That was my problem: binary data was incorrectly converted (often because of Unicode systems).
I returned
bin_filesize = v_len_in
bin_file = l_binfile
from the function module CONVERT_OTF, then converted the xstring data (l_binfile) into an internal table (t_objbin) to send to the mail send function with the following function module:
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = l_binfile
IMPORTING
output_length = v_lines_bin
TABLES
binary_tab = t_objbin.
Many thanks for your help.
Best regards
Patricia -
Mail Adapter: original Attachment filename retrieval in Proxy
Hi,
I have a Sender Mail Adapter, and the receiver is a proxy, where I need to get the attachment and its details.
When I execute
attachment_filename = l_attachment->GET_DOCUMENT_NAME( ).
it simply returns Attachment-1 etc.
How do I get the original attachment filename?
I am on SP16.
Regards,
Puloma.HI
Please refer tihs thread for mail attchments
Re: Handling attachments of mail
Scenario to pick the mail with its attachments into XI\Re: Infrastructure required for Mail Adapter -
Retrieval of attachment filename - receiver mail adapter
Hi,
I am using the mail adapter to receive an e-mail into PI. This e-mail has an attached CSV file.
First, I am using the PayloadSwapBean to swap the application playload to the attachment payload
Second, I am using the MessageTransformBean to transform the CSV file into an XML document
These are both working fine and the message is then passing into the relevant message mapping.
However, I would like to be able to use the attachment filename in the message mapping.
Can anyone advise how to do this for the mail adapter ?
I've done it loads of times for the file adapter but never the mail adapter (when using attachments) so I am a bit stumped.
Any advice greatly received.
Cheers
Colin.Hi Progirl,
I want to dynamically set the name of attachment in receiver mail Communication Channel.
Example: IN__9907211000004_4048454000005_20081211_01000000002643
The first two numbers 9907211000004 & 4048454000005 I want to read it from the message
20081211 this is the date and
And againg this number 01000000002643 is read from message.
I read from your response. You had created adapter module for the similar purpose. Can you share it. Since I am new to writing Adapter Module.
Thank You in Advance.
Mukhtar -
Receiver File Adapter: Keep original Filename in E-Mail Attachment
Dear All
On our SAP-XI 7.0.1 (EHP 1, sp 4) we have the following scenario:
(1) SAP-XI picks a FlatFile from the R/3 application server. This file should be forwarded unmodified to the e-mail receiver.
(2) In the Sender channel I have set the option "Set Adapter-specific Message Attributes" including the FileName.
(3) In the Receiver channel I have set the message protocol = XIPAYLOAD. In the "Mail Attributes" I do NOT use the mail package yet marked the flag "Keep Attachments". No module has been added to this channel.
Result: The original file "dollytest1" is sent as e-mail attachment "Untitled.xml".
QUESTION: Is there a (simple) solution which allows the e-mail attachment to keep its genuine filename ("dollytest1") without any suffix?
Regards
UweHi Uwe,
check this wiki page too
http://wiki.sdn.sap.com/wiki/display/stage/DynamicEmailAttachmentnameforReceivedMails
Regards
Suraj -
How to get filename from mail attachment
Hi all,
I have a XI scenario Mail->XI->RFC. I have created my own adapter module which handle all attachments from incoming mail.
Everything work fine, but in my module I try to get information about filename of mail attachment. I use getContentType() metod to get the filename but this method return only the mimetype of the document. The getDescription() method return olny string "mail attachment". I need to get the original filename of the attachment or at least the file extension.
Is it possible to get the whole filename from mail attachment?
Thanks
PeterHi,
You can tryout with adapter modules . You can make use of following Adapter attributes also -
http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/content.htm
Similar discussion-
Email attachment file names
PayloadSwapBean-
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
Regards,
Moorthy -
Can't open a pdf file attachement to e-mail
I canot open an e-mail pdf file attachment..I get a message
You have chosen to open Invoice---pdf
which is: Firefox HTML Document (479kB)
What should Thunderbird do with this file?
Open with Firefox (default)
I do all of the above but nothing happens and I keep getting the same message over andf over again??
Please advise what I should do
ThanksdThanks. I disabled Protected Mode, and I was able to open the pdf attachment. Just to make sure, I enabled it and then disabled it again, and when I tried to open the attachment, it did as before – Adobe Reader (Not Responding) and Internal Error message. Tried it several more times, (enable and then disable Protected Mode) and each time, Adobe Reader wouldn’t launch (Not Responding, Internal Error).
Morris Davidson -
Sending XI-Content as Mail Attachement with specific Filename
Hi,
I want to send the Message-Content as a mail attachment with a specific Filename (e.g. 2005-08-31.csv). The content is a CSV File, not a XML
In the scenario an IDOC is sent to the XI mapped in a CSV-File (via Java-Mapping) and should be send as a Mail Attachment.
Is this possible and how?
Thank you for your help
ThomasHi Thomas,
You can influence the filename with the ModuleTransformBean. You need at least SP9 for this feature.
In the Mail Receiver Channel got to tab "Module"
As first module (before the mail module) enter:
localejbs/AF_Modules/MessageTransformBean as Local Enterprise Bean with any key
For this module key you can use in the module configuration following entries:
Transform.ContentDisposition inline|attachment;filename=<filename>
Transform.ContentDescription <Filename>
Transform.ContentType <MimeType>/<SubType>;name="<filename>"
If you want to send an attachment, use:
Transform.ContentDisposition attachment;filename="MyFile.csv"
Transform.ContentDescription MyFile
Transform.ContentType text/plain;name="MyFile.csv"
If you use the Mail Package, you can set the file name that way:
<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
<Subject>Hello</Subject>
<From>[email protected]</From>
<To>[email protected]</To>
<Content_Type>text/plain;name="MyFile.csv"</Content_Type>
<Content>Here comes the CSV Data</Content>
</ns:Mail>
Hope that helps,
Stefan
Maybe you are looking for
-
Can not read or write to mac hard drive error
When attempting to transfer music files from an external usb harddrive formatted in windows into Itunes, I can only successfully import a small fraction of the music, and then its stops with a error, that the Mac HD can not read or write files.
-
Application shows only in small area in portal..how 2make it appear in full
hey guys, we created a new IVEW using template (SAP TRANSACTION IVEW) and linked that to page.. the problem is in portal the desired window is shown only in small part of screen,one has to click in OPEN IN NEW WINDOW to see the full screen...how to
-
Using Media Browser - Can't Import Songs
I'm trying to use the media browser to import a song from iTunes. It is an aiff file and it is unprotected for sure. When I drag and drop it on to the timeline, however, nothing loads. What should I do? -Hunt
-
Airport Extreme: PEAP authentication failure when NAT is enabled
Setup: Airport Extreme firmware 5.6, Windows Admin Utility 5.2 Airport's WAN port connected to an internal network with Windows 2003 IAS RADIUS server; Airport's LAN port disconnected. Windows XP client (using Microsoft zero-configuration client) cli
-
Formatting External Windows Hard Drive
Whenever I connect an external hard drive that I normally use with my Windows PC, my MacBook makes the external hard drive "read-only." How can I change this to read and write? Also, eventhough its in "read only," can I format the external drive? THA