Attaching CSV file
Dear Experts,
Can you please suggest how to add a csv(flat file) to send via email notification(to generic pass).
I already generated a flat file which needs to be send.
Regards,
Jaya
Hi Jai,
Now am the job log throwing warning as below.
I defined those constants in Notification Repository,
Can you please help me how to correct it.
Regards,
Jaya
Constant MAIL_SMTP_HOST was not defined in the repository
(-1)
Warning
Constant MAIL_SMTP_PORT was not defined in the repository
(-1)
Warning
Constant MAIL_ORIGINATOR was not defined in the repository (-1)
Warning
Constant MAIL_DEBUG was not defined in the repository
(-1)
Warning
Constant MAIL_DEBUG_RECIPIENTS was not defined in the repository
(-1)
Warning
Constant MAIL_TEMPLATE_FOLDER was not defined in the repository (0)
Similar Messages
-
Opening attached .csv file in diadem
HI,
I have attached a .csv file which when openened in the diadem, first it shows only two channels whereas it actually contains 4 channels.
Secondly it opens with the channel names as noname, noname_1 whereas the channel names are on the top of the file. May I know the reason and solution for this problem.
Regards,
X. Ignatius
Solved!
Go to Solution.
Attachments:
00200004.CSV 91 KBHi Igni,
You didn't mention a DIAdem version, so I built it to work with DIAdem 2012, 2011, or 2010. I missed by one version, since DIAdem 2010 released directly after DIAdem 11.1. I've now recoded the DataPlugin should work with DIAdem 11.1 as well.
It always helps to mention your DIAdem version,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
Attachments:
Igni_CSV.uri 9 KB -
How to capture the data within the given range of maximum and minimum values ? from csv files
My requirement,
1. Here, the user will provide the range like maximum and minimum values, based on this range, the VI should capture the data within the given range. ( from CSV file as attached )
2. Then VI should calcluate the average value for captured data and export it to excel.
This is my requirement can anyone help me on this.
Many thanks in advance
rc_cks
Attachments:
sample_short.csv 2439 KBHi,
Thanks for remnding me. I forgt to attach the VI,
Here I am attaching the VI, what I tried.
From attached CSV file, I have to find an average value for columns B,C,D,E,F,G,H,I and AJ, AK. ( data range will be defined by user ), focused only on these columns
Here, the scope is to calculate an average value for given data range by user as MAX and MIN data.
FYI: I tried manually for two instance i.e column H & I. As per H column one steady state values from 7500 to 10500 and similarly in I column 7875 to 10050. So, I gave these as a limit to capture and calculate the average value. But unfortunaltely, requirement has been modified as per below requirements.
More Info on requirement:
--> The user will define the range of data by giving some MAXIMUM and MINIMUM values(for above mentioned columns induvidually), then VI should capture that data range and it has to caculate the average value for that range of data. This is the task I have to complete.
--> I am stuck in creating a logic for data capturing for given range of MAX and MIN value from user,
Can anyone help me on this.
If my explanation is not clear, Please let me know.
Many thanks, help mw
rc
Attachments:
VI_rc.vi 25 KB
sample.zip 4166 KB -
Sender "Mail" adapter - CSV file attachment
Hi there
I'm looking for some help in configuring a sender mail adapter that receives ".csv" files. I did read some blogs that mention using the "PayloadSwapBean" module to read the mail attachment instead of the mail content. My problem is to now convert the ".csv" file into a message. Is there a module that I can use ( is it the "MessageTransfomBean" ) and how. Any help would be appreciated.
Thanks
SalilHi Salil,
If you want to send a mail with a body and attachments, the message sender HAS to provide an XI message with attachments. I doubt a CSV file does justice.
As Renjith said you need to convert CSV to XmL.
A short description about the Standard Modules:
MessageTransformationBean is a standard module used to apply the XSLT mapping to the adapter module by using <i>Transform.class</i> ( This xslt mapping is done to create a mail package, Dont confuse with the actual mapping in your case this is NOT for converting csv to xml).
Also this module can be used to change the name and type of payloads by using <i>Transform.contentType</i>, <i>Transform.contentDisposition</i>, <i>Transform.contentDescription</i>.
PayloadSwapbean is a standard module for replacing payloads with other payloads (SWAP)
If you want to give each attachment a certain name use Parameters, <i>swap.keyname</i> for name of the payload and <i>swap.keyvalue</i>.
I Hope the use of standard modules is understood. -
How can I email using UTL_SMTP with a csv file as an attachment?
Dear All,
It would be great if someone could help me. I am trying to use UTL_SMTP to email with a csv file as attachment. I do get an email with a message but no attachment arrives with it.
In fact the code used for attaching the csv file gets appended in the message body in the email.
CREATE OR REPLACE PROCEDURE test_mail
AS
SENDER constant VARCHAR2(80) := '[email protected]';
MAILHOST constant VARCHAR2(80) := 'mailhost.xxxx.ac.uk';
mail_conn utl_smtp.connection;
lv_rcpt VARCHAR2(80);
lv_mesg VARCHAR2(9900);
lv_subject VARCHAR2(80) := 'First Test Mail';
lv_brk VARCHAR2(2) := CHR(13)||CHR(10);
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25) ;
utl_smtp.helo(mail_conn, MAILHOST) ;
dbms_output.put_line('Sending Email to : ' ||lv_brk||'Suhas Mitra' ) ;
lv_mesg := 'Date: '||TO_CHAR(sysdate,'dd Mon yy hh24:mi:ss')||lv_brk||
'From: <'||SENDER||'>'||lv_brk||
'Subject: '||lv_subject||lv_brk||
'To: '||'[email protected]'||lv_brk||
'MIME-Version: 1.0'||lv_brk||
'Content-type:text/html;charset=iso-8859-1'||lv_brk||
' boundary="-----SECBOUND"'||
''||lv_brk||
'-------SECBOUND'||
'Some Message'
|| lv_brk ||
'-------SECBOUND'||
'Content-Type: text/plain;'|| lv_brk ||
' name="xxxx.csv"'|| lv_brk ||
'Content-Transfer_Encoding: 8bit'|| lv_brk ||
'Content-Disposition: attachment;'|| lv_brk ||
' filename="xxxx.csv"'|| lv_brk ||
lv_brk ||
'CSV,file,attachement'|| lv_brk || -- Content of attachment
lv_brk||
'-------SECBOUND' ;
dbms_output.put_line('lv_mesg : ' || lv_mesg) ;
utl_smtp.mail(mail_conn, SENDER) ;
lv_rcpt := '[email protected]';
utl_smtp.rcpt(mail_conn, lv_rcpt) ;
utl_smtp.data(mail_conn, lv_mesg) ;
utl_smtp.quit(mail_conn);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
NULL ;
WHEN OTHERS THEN
dbms_output.put_line('Error Code : ' || SQLCODE) ;
dbms_output.put_line('Error Message : ' || SQLERRM) ;
utl_smtp.quit(mail_conn) ;
END;LKBrwn_DBA wrote:
Use UTL_MAIL instead.That package is an utter disappointment - and an excellent example IMO of how not to design an application programming interface. Even the source code is shoddy.. I mean, having to resort to a GOTO statement....!!?? The person(s) who wrote that package are sorely lacking in even the most basic of programming skills if structured programming is ignored and a spaghetti command used instead.
No wonder the public interface of that code is equally shabby and thoughtless... The mail demo code posted by Oracle was better written than this "+package+" they now have bundled as the official Mail API.
I dunno.. if I was in product management there would have been hell to pay over pushing cr@p like that to customers. -
CSV File attachment in Receiver Mail Adapter
Hi Experts ,
mine is a proxy to mail scenario Information from proxy needs to be converted to CSV file and to be send across in the form of attachment to multiple recievers.
I would request best suggestions from experts.
Regards,
Arnab .Hi,
first approach is,
1. in cilent proxy report to call 'GUI_UPLOAD' function module , in exporting, filetype = 'txt', filename.
second approach is,
2. you can you message transformation bean in you mail receiver communication channel.
http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
you want to send multiple receivers ,
3. In the Receiver Determination, you need to select " Extended" in the Type of Receeiver determination.
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3343.
regards,
ganesh. -
Mail attachment (.csv) to File (.csv)
Hi mates,
I have a requirement where I have to pick the attachment(.csv format) of an incoming mail and store this file ( in .csv format)onto a file server using a reciever file adapter.
Please suggest how can i go about it ?Jai,
After changing the transfer mode from text to Binary.
The XI system is creating a file but the data inside that file is junk. For e.g :
" "$"#,##0.00_);[Red]("$"#,##0.00) 7 * 2 ("$"* #,##0);_("$"* (#,##0);_("$"* "-"_);_(@_) . ) ) (* #,##0);_(* (#,##0);_(* "-"_);_(@_) ? , : ("$"* #,##0.00);_("$"* (#,##0.00);_("$"* "-"??_);_(@_) 6 + 1 (* #,##0.00);_(* (#,##0.00);_(* "-"??_);_(@_)à õÿ À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à õÿ ô À à
This looks like when you open a CSV file in a notepad.
Please help how can i format this data so that it lokks like normal comma seperated form. -
SOAP Axis sender with CSV file attachment
Hi Experts,
I have a requirement where I receive a CSV file attachment from a Web Service post ( i.e a SOAP sender with attachment). I decided to use SOAP with Servlet(Axis) protocol, since standard SOAP sender does not allow modules to be used.
I am able to test this interface through SOAPUI with attachment to the point where I can get the attachment payload as my main payload in IE, but it fails in mapping since CSV needs to be converted to XML. I have following queries for proceeding ahead with this scenario:
1. How do I convert the CSV attachment to XML inorder for mapping to be used in IE. Is there a standard axis handler available for this ???? Also where should this handler be called in the sequence of Axis modules ???
2. Can I use MessageTransformationBean for converting plain to XML ??? If yes where should this module be called in the sequence of Axis modules. I tried using this module between the CallSapAdapter and the first AdapterBean but it returns exception in SOAPUI saying " Messaging exception: No Main"
3. Is there a blog available which illustrates about using additional modules/handlers in Axis. I have had a look at the FAQ note of Axis but it just gives the overview.
Thanks.
Siddhesh S.TawateSolved :).
1 AF_Adapters/axis/HandlerBean Local Enterprise Bean xireq
2 AF_Adapters/axis/AFAdapterBean Local Enterprise Bean afreq
3 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean Plain2XML
4 CallSapAdapter Local Enterprise Bean sap
5 AF_Adapters/axis/AFAdapterBean Local Enterprise Bean afresp
6 AF_Adapters/axis/HandlerBean Local Enterprise Bean xires
Above sequence worked. I guess I was missing some parameter in content conversion earlier.
Thanks. -
Javax.mail CSV file attachment corrupt?
I'm having some trouble with attaching a file to an outgoing email, it's a CSV file and when it is uploaded/attached to the email, it becomes "corrupt". Excel will still open it but if I open it in notepad the formatting is noticeably messed up. I need it to retain all the correct return carriages and line feeds, which I believe are what are getting mingled. (Another program must read it and this formatting is messing everything up).
Here's the code:
MimeBodyPart messageBodyPart =
new MimeBodyPart();
//fill message
messageBodyPart.setText(outBoundMessage);
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
if (fileAttachment != null) {
// Part two is attachment
MimeBodyPart attachment = new MimeBodyPart();
attachment.attachFile(fileAttachment);
attachment.setFileName(fileAttachment.getName());
attachment.setHeader("type", "text/csv");
multipart.addBodyPart(attachment);
// Put parts in message
message.setContent(multipart);The other parts of the message are being created and attached where necessary. My guess is that it's not transferring in binary? I've never really done this sort of thing so if anyone could lend a hand and show me how to properly attach files so they don't get altered in anyway I would greatly appreciate it.Hi,
I am sending csv file as an attachment by using below code
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
public class AttchmtMail
String finaldt;
public void mailAtchmt(String fname,String dt) {
String to="[email protected]";
String from = "[email protected]";
String to2="[email protected]";
String host = "xxx.xx.xxx.xxx";
// Create properties, get Session
Properties props = new Properties();
// If using static Transport.send(),
// need to specify which host to send it to
props.put("mail.smtp.host", host);
// To see what is going on behind the scene
props.put("mail.debug", "true");
Session session = Session.getInstance(props);
try {
// Instantiatee a message
Transport bus = session.getTransport("smtp");
bus.connect();
Message msg = new MimeMessage(session);
//Set message attributes
msg.setFrom(new InternetAddress(from));
InternetAddress[] address = {new InternetAddress(to),new InternetAddress(to2)};
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject("New OU's on "+dt+".");
msg.setSentDate(new Date());
// String filename= "C:/Feeds/"+finaldt+"/"+files;
String file1= fname;
File f1=new File(file1);
if(f1.exists())
setFileAsAttachment(msg, file1);
else
//setFileAsAttachment(msg,"","",info);
msg.saveChanges();
bus.sendMessage(msg, address);
bus.close();
catch (MessagingException mex) {
// Prints all nested (chained) exceptions as well
mex.printStackTrace();
// How to access nested exceptions
while (mex.getNextException() != null) {
// Get next exception in chain
Exception ex = mex.getNextException();
ex.printStackTrace();
if (!(ex instanceof MessagingException)) break;
else mex = (MessagingException)ex;
public void setFileAsAttachment(Message msg, String filename)
throws MessagingException {
// Create and fill first part
MimeBodyPart p1 = new MimeBodyPart();
p1.setText("Dear ,\n\nPlease check the attachment " );
// Create second part
MimeBodyPart p2 = new MimeBodyPart();
// Put a file in the second part
if(!filename.equals(""))
FileDataSource fds = new FileDataSource(filename);
p2.setDataHandler(new DataHandler(fds));
p2.setFileName(fds.getName());
// Create the Multipart. Add BodyParts to it.
Multipart mp = new MimeMultipart();
mp.addBodyPart(p1);
if(!filename.equals(""))
mp.addBodyPart(p2);
} // Set Multipart as the message's content
msg.setContent(mp);
}//End of class
Madhu -
Issue in CSV file attachment.
Hi All,
I am using the FM : SO_DOCUMENT_SEND_API1 for sending mails in CSV format. This CSV file contains some chinese scripts. But when I open the attachment I can see some junk characters instead of that. My SAP version is 4.6c
I searched in all the forums and found these 2 solutions
1. OSS note 633265 .
2. Changed the characters set into simplified and traditional chinese.
Both didnt helped.
Suggestions are welcome.
Regards,
Dinesh.Hi Dinesh,
again: Never use FM : SO_DOCUMENT_SEND_API1 . Go for CL_BCS. Check programs
BCS_EXAMPLE_5
BCS_EXAMPLE_6
BCS_EXAMPLE_7
BCS_EXAMPLE_8
Regards,
Clemens -
CSV file as an attachment is not in the recognizable format
Hi All,
I have a requirement to send a csv file as an e-mail attachment. For this, I am collecting the required data into the final internal table and converted this final internal table data into CSV format and then sending this in the mail as csv file attachment using the functiona module 'SO_NEW_DOCUMENT_ATT_SEND_API1'. Program is working fine and mail is coming to receiver's inbox.
Well.. Now the problem is, I am getting the message while opening the csv file as "The file is not in a recognizable format." and if we say OK... then it is opening. Now how can we avoid coming of this message while opening the file.
Please advice.
Thanks a lot in advance.
Regards
Ramesh.These are all the Object types which are allowed in the attachement format.. try changing to any of the formats..
ALI ABAP list document
ARC Archive object (image)
BCS External Document Storage
BIN Binary document
DLI Distribution list
EXT PC document
FOL Folder
GRA SAP Business Graphics
OBJ Business object
OFO Object folder
OTF OTF document
R3I IDoc
RAW SAP editor document
SCR SAPscript document
URL Link to Internet/Intranet
WIM Work item
XXL Document for list viewer -
Send mails with csv file as an attachment through oracle(SQL SCripts / Stor
Hello Everybody,
I have recently come across a requirement in which I am supposed to send mails with csv file as an attachment through oracle(SQL SCripts / Stored Procedure) .
The contents of the csv file are to be retreived from the Database as well as the content of the mail and to whom it needs to be sent has also to be picked up from the database.
Can somebody suggest me with a suitable code for the same?
Would be of great help..!!
Thanks & Regards,
- VR
Edited by: user646716 on Dec 18, 2009 10:44 AMread below links
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:255615160805
http://www.orafaq.com/wiki/Send_mail_from_PL/SQL#Send_mail_with_UTL_TCP_-withattachments
How to send csv file as an attachment -
Email CSV file as an attachment
Hi,
I am sending a CSV file as an e-mail attachment. Now, i use the character '0D0A' to get the lines onto a new line. But the extra spaces which are left in the previous lines are coming on to the next line. now there are spaces of the previous line and then the data of the current line follows. But in the internal table, the data is stored correctly, So, SHIFT LEFT is also not working.
Please reply if there is any solution for the same.
Thanks in advance,
Pallavi.HI,
1) I am assuming that you are creating the CSV file on the SAP server and that it is on the WINTEL platform.
Your code would look something like
data: ws_record(2000) type c.
Open dataset filename for output in text mode.
Loop at itab.
concatenate itab-field1 itab-field2 itab-field3
into ws_record separated by ','.
transfer ws_record to filename.
endloop itab
close dataset filename.
2) Alternatively please check the documentation on the following function module including the example.
SO_NEW_DOCUMENT_ATT_SEND_API1
Regards
David Cooper -
Setting required to process incomming Email with CSV file attached
Dear all,
We are having a scenario where in the supplier receives a PO confirmation CSV file from the download center as an Email attachment. The supplier updates the file by confirming PO's and replies back. The CSV file needs to update the confirmed PO's in SNC.
The SO50 settings are in place but still we are not able to receive the Email back in SNC. Any suggestion on what settings we need in SNC to receive and process the CSV file?
thanks,
mahehsHi,
You can use the upload center to process the changed data. Isnt that helpful?
Best Regards,
Harsha Gatt -
CSV file not appear as a CSV file in attach
Hi.
I am sending an CSV file as an attach in an email. But the problem is that it appears as a PDF file, even though in SOST it appears as a CVS file. Does anyone faced this problem?
Thanks.Well, I when I look at this method, I see Attachment_type is of type SOODK-OBJTP. When I forward navigate into that, I see structure SOODK, with field name OBJTP, type SO_OBJ_TP. Forward navigating again, I see that that field has domain SO_OBJ_TP. When I look at the value range for the domain, I find table TSOTD. Inside that table, I don't find 'csv' as a type. This leads me to believe that SAP doesn't know what type of attachment it has. Since your code implies a hex/binary file, perhaps BIN is the replacement for CSV, and the file name should probably contain '.csv'. Sorry, it's been a while since I wrote a email with attachment; I don't remember what I used in prior programs, I believe is used BIN or RAW.
The choices are listed below:
ALI X X ABAP list document
ARC X Archive object (image)
BCS X External Document Storage
BIN X Binary document
DLI X Distribution list
EXT X X PC document
FOL X Folder
GRA X X SAP Business Graphics
OBJ X Business object
OFO X Object folder
OTF X OTF document
R3I X IDoc
RAW X X SAP editor document
SCR X SAPscript document
URL Link to Internet/Intranet
WIM X Work item
XXL X X Document for list viewer
Maybe you are looking for
-
Retrieving images for a java game
i am currently trying to make a game whereby i have to retrieve images from a file and display it to the screen. I am able to do this using applets but the game i am implementing does not use applets - it only makes use of awt and swing components. a
-
I just recently installed Arch Linux i686. I thought I got the time set correctly when I first installed Arch, but now I notice that the system time is incorrect. I live in Tucson, Arizona. Arizona (execpt for the Navajo Indian reservation) is on
-
Dolphin indefinitely loading folders
This issue appeared with last update (KDE 4.6.1-2). I keep a Dolphin window in my desktop with several tabs open, now when I log in all but one are blank and the message "Loading folder" is displayed at the bottom (I'm traslating so this may be not t
-
How much longer before wireless ThinkPad keyboard?
How much longer do we have to wait for a wireless ThinkPad keyboard? Current ThinkPad USB keyboard with TrackPoint is ridiculously priced, considering it's on a wire, while you can buy a very decent wireless keyboard from Logitech for half the price.
-
When pressing record it triggers a note on my roland fantom keyboard
Equipment: Macbook Pro 13", Roland Fantom g8, m audio project mix Hi, i know this is probably a simple fix but I am having some problems while trying to record my external midi. Every time i press record it will play a low note with a sound coming fr