PROBLEM SENDING AN XLS VIA E-MAIL FROM ABAP OVER 255 CHARS
Hi
I need some help.
I want to send a XLS attachment from a program via E-Mail.
The problem is I have a lot of columns so I have over 255 chars , I think 500 Chars.
When I send the email, I got it but it is truncate in the 255 position, all the rest doesn't appear
Somebody knows about a solution for this problem?
There was so many discussion about same topic.
Check the below link for more information
How to email an attachment with more than 255 characters?
Thanks
Seshu
Similar Messages
-
Trying to send a photo via e-mail from iPhoto. But it says my e-mail and password are wrong and won't send and I don't know how to correct it. Where do I go?
In the iPhoto preferences ==> accounts delete the account and re-enter it
LN -
Pdf extension changes to .dat when send a file via e-mail from adobe acrobat 9
to convert a file from microsoft word 2007 to PDF and send as an attachment via e-mail from adobe 9, the file is received with the extension changed to. dat, so recipients can not open it.
Can anyone help me with this.What is the OS of the sending computer?
What mail client?
I receive plenty of files on my PC as .dat files, which come from Mac user(s), rename the extension to what I think they ought to be and have no further problem. (I cannot change the senders email settings where the problem originates)
If the receiver knows it is a pdf file, they can drag it into Acrobat, but renaming the extension serves future use. -
Send Daily Reports via E-mail from MARS
Hi!
I want to know if the MARS can send via email daily reports to a specific account.
Thanks for any help.well, you could start by logging into the MARS CLI as pnadmin. Use tcpdump to monitor the SMTP traffic.
[pnadmin]$ tcpdump -X port 25
Now select the report and click "resubmit". You should see the SMTP traffic to the mail server. You can probably troubleshoot by looking at the ASCII output from tcpdump. If not, look at the tcpdump output and at least make sure the connection is to the right IP address and that some data is exchanged after the initial TCP handshake. Now take a look at the mail server logs, which should give you an idea of what to do next. -
I have an old Mac G5 with OSX 10.5.8
After a crash of my HD, I reinstalled the CS3.
At the time of recording I get a window with the message "COMPLETED REGISTRATION" and under "There was a problem sending the informasioni via internet" and still under three choices to "send back" and "records in a second time "or" never record "and I continue to choose the latter option.
Another problem is that in Bridge (version 2.0.0.975) I can no longer see thumbnails of RAW files from my Canon 40D that I saw before.
Should I upgrade ACR? which is the latest version supported on my Mac?
thank youSergio Bellotto if you keep receiving the registration screen then please try accepting the screen in a different User account.
-
How to send purchase order via e-mail.
Please could someone let me know how to send purchase order via e-mail.
I am an BC.
e-mailing is functionning however I am not very familiar in settings for MMNo, you do not need to touch ME_PRINT_PO. You need to put code before and after ME_PRINT_PO in the print program.
Step 1 - Copy the standard print program SAPFM06P to make a Z version, lets call it ZSAPFM06P
Step 2 - Copy include FM06PE02 to make a Z version, lets call that ZFM06PE02.
Step 3 - ZSAPFM06P change the statement "Include FM06PE02" to read "Include ZFM06PE02".
Step 4 - In include ZFM06PE02 you will find a subroutine called "ENTRY_NEU". In this subroutine you will see it first calls ME_READ_PO_FOR_PRINTING then calls ME_PRINT_PO. Before it calls ME_PRINT_PO just put:
l_nast-nacha = 1.
CLEAR l_nast-dimme.
This means that ME_PRINT_PO will not e-mail, it will create a spool request.
Step 5 - Still in ZFM06PE02, after ME_PRINT_PO has been called, add new code. First check that ent_retco EQ 0. If it does not then exit.
Step 6 - Get the spool ID created by ME_PRINT_PO by either moving sy-msgv1 to a variable or select from NAST.
Step 7 - Call function CONVERT_OTFSPOOLJOB_2_PDF using the spool ID from step 6, and put the result from table PDF into an internal table you can use later. ALso store the export variable pdf_bytecount, you will need it later.
Step 8 - Call function SX_TABLE_LINE_WIDTH_CHANGE using the table from step 7 as content_in and put the results from content_out into a new internal table.
Step 9 - Add some text into a internal table of type solisti1, this will be the body text of the e-mail.
Step 10 - Add whatever receivers you want into an internal table of type somlreci1. If you just want it to go to the address that the PO would have gone to anyway, select the e-mail address from ADR6 where the address number = l_doc-xekko-adrnr, that is the data from the PO.
Step 11 - Populate an internal table of type sopcklsti1 with data relevant to your PDF table from step 8 and the text table from step 9. You will have to put the size of the PDF from step 7 (pdf_bytecount) on the PDF line and the size of the text will be the number of lines of text * 255.
Step 12 - Add info to a structure of type sodocchgi1. You can add the e-mail title in here, field obj_descr. Also add the size of the PDF and the size of the text from step 12 into doc_size, and give the doc a name in field obj_name. This can be anything, ZPDFPO for example.
Step 13 - Call SO_DOCUMENT_SEND_API1 using the tables from steps 8, 9, 10 and 11 and the structure from step 12. You can amend the sending e-mail also. Set commit_work to space.
Step 14 - That is all you need, but I actually call function RSPO_R_RDELETE_SPOOLREQ to delete the spool request created in step 4, then call NAST_PROTOCOL_UPDATE to add some more messages to the processing log of the PO.
That is all. -
How to send a file via e-mail with director
Is it even possible to have a button in a free-standing
projector that would send a file via e-mail, or open up an e-mail
program and have the file attached and addressed? Or is it possible
to put a file on a server? Of course, both of these methods would
alert the user and ask for their permission.To just open the user's email program, you can use the
standard lingo:
goToNetPage(mailto:[email protected])
That approach is kind of annoying because it actually opens
an empty
browser window then the user's email program. I don't think
you can use
that approach to send attachments though.
A much better way is the fabulous DirectEmail xtra from
DirectXtras.
Check out their site:
http://www.directxtras.com/demail_home.asp?UUID=1217348
DirectEmail can do everything you are asking for (and more).
It is
cross-platform, shockwave safe, can handle text or HTML
email, can do
attachments, can use a mail server or not, and is really easy
to use.
The same company makes DirectFTP which you can get from:
http://www.directxtras.com/DFTP_home.asp?UUID=1217348
DirectFTP can put files onto an FTP site with a minimum of
fuss. I have
used both on quite a few occasions and they rock. You can
actually
write a full-fledged email or ftp program with those xtras
and Director. -
How to send a report via e-mail
Hello All,
I want to send a report via e-mail.
What should I do for that?
Please help me out...
Regards,
Ravi Khattar.Hi,
Please check the below code....
data: t_objpack like sopcklsti1 occurs 1 with header line,
t_objhead like solisti1 occurs 1 with header line,
t_objtxt like solisti1 occurs 0 with header line,
t_objbin like solisti1 occurs 1 with header line,
t_reclist like somlreci1 occurs 1 with header line,
t_lobj like abaplist occurs 0 with header line,
t_listobj like abaplist occurs 1 with header line.
data: v_tab_line1 type i,
v_tab_line2 type i,
v_docsize type i,
v_len type i,
v_line(1250) type c,
v_subj(132) type c,
v_cr(1) type x value '0D',
v_linefd(2) type x value '0D0A',
v_docdata like sodocchgi1.
clear: t_objpack[], t_objhead[], t_objtxt[], t_reclist[], t_listobj[].
concatenate 'This email is generated from a SAP' sy-sysid '-'
sy-mandt '- batch environment.' into t_objtxt separated by ' '.
append t_objtxt.
t_objtxt = 'Please do not respond to this email.'. append t_objtxt.
v_docdata-obj_name = 'SAMPLE_TEST'.
concatenate 'Sales Order Status Attachment -' sy-datum '-' sy-uzeit
into v_subj separated by ' '.
v_docdata-obj_descr = v_subj.
describe table t_objtxt lines v_tab_line1.
read table t_objtxt index v_tab_line1.
v_docdata-doc_size = ( v_tab_line1 - 1 ) * 255 + strlen( t_objtxt ).
t_objpack-head_start = 1.
t_objpack-head_num = 1.
t_objpack-body_start = 1.
t_objpack-body_num = v_tab_line1.
t_objpack-doc_type = 'RAW'.
append t_objpack.
clear v_line.
if p_type = '1'.
loop at t_list.
concatenate v_line t_list v_linefd into v_line.
v_len = strlen( v_line ).
do 4 times.
if v_len ge 255.
if v_line+254(1) = v_cr.
v_line255 = v_line254.
v_line+254(1) = ' '.
endif.
t_objtxt = v_line(255).
v_line = v_line+255.
v_len = v_len - 255.
append t_objtxt.
else.
exit.
endif.
enddo.
endloop.
if v_line ne ' '.
t_objtxt = v_line(255).
append t_objtxt.
endif.
describe table t_objtxt lines v_tab_line2.
t_objpack-doc_size = ( v_tab_line2 - v_tab_line1 ) * 255.
t_objpack-body_start = v_tab_line1 + 1.
t_objpack-transf_bin = ' '.
t_objpack-doc_type = 'TXT'.
else.
t_objbin[] = html[].
describe table t_objbin lines v_tab_line2.
t_objpack-doc_size = v_tab_line2 * 255.
t_objpack-body_start = 1.
t_objpack-transf_bin = 'X'.
t_objpack-doc_type = 'HTM'.
endif.
t_objpack-head_start = 1.
t_objpack-head_num = 1.
t_objpack-body_num = v_tab_line2.
t_objpack-obj_name = 'SAMPLE_TEST'.
t_objpack-obj_descr = 'Test'.
append t_objpack.
loop at s_email.
t_reclist-receiver = s_email-low.
t_reclist-rec_type = 'U'.
append t_reclist.
endloop.
t_reclist-receiver = sy-uname.
t_reclist-rec_type = 'B'.
append t_reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = v_docdata
put_in_outbox = ' '
TABLES
packing_list = t_objpack
object_header = t_objhead
contents_bin = t_objbin
contents_txt = t_objtxt
receivers = t_reclist.
if sy-subrc = 0.
endif.
Cheers,
Bujji -
Hi,
I use SO_NEW_DOCUMENT_SEND_API1 function module to send a mail from abap code.
But I want to set the sender. Can I realize it?
Regards
AngelaRefer this thread -
Fill "sender id" in SO_NEW_DOCUMENT_SEND_API1
Regards,
Amit -
Function modules to send mails from ABAP
hi
can any one give me the function module to send mails from abap to yahoomail or gmail etc. i will be grateful if any one can provide me a sample code.
thanks & regards
rajeshHi,
check this site:
http://www.sapdevelopment.co.uk/reporting/email/email_mbody.htm
Replace the
p_email(40) type c default '[email protected]' .
with ur yahoo or gmail id
This is the FM that u needed:
'SO_NEW_DOCUMENT_ATT_SEND_API1'
http://www.kabai.com/abaps/z00.htm
http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
/people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface
Hope this solves your question.
Best Regards,
Anjali -
ALV - is there a way to automatically send the ALV via e-mail
Hi,
I have a requirement to automatically send the ALV to an e-mail address.
Is this possible to do by just using the ALV methods available ?
Cheers
Colin.Hi Colin,
Check the weblog:
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
Check these link..
http://www.sap-img.com/abap/sending-email-with-attachment.htm
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/789. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
Have a look at below code:
REPORT ZSENDEXTERNAL.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
Creation of the document to be sent
File Name
DOC_CHNG-OBJ_NAME = 'SENDFILE'.
Mail Subject
DOC_CHNG-OBJ_DESCR = 'Send External Mail'.
Mail Contents
OBJTXT = 'Minimum bid : $250000'.
APPEND OBJTXT.
OBJTXT = 'A representation of the pictures up for auction'.
APPEND OBJTXT.
OBJTXT = 'was included as attachment.'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
Creation of the document attachment
(Assume that the data in OBJBIN is in BMP format)
*OBJBIN = ' O/ '. APPEND OBJBIN.
*OBJBIN = ' | '. APPEND OBJBIN.
*OBJBIN = ' / '. APPEND OBJBIN.
*DESCRIBE TABLE OBJBIN LINES TAB_LINES.
*OBJHEAD = 'PICTURE.BMP'.
*APPEND OBJHEAD.
Creation of the entry for the compressed attachment
*OBJPACK-TRANSF_BIN = 'X'.
*OBJPACK-HEAD_START = 1.
*OBJPACK-HEAD_NUM = 1.
*OBJPACK-BODY_START = 1.
*OBJPACK-BODY_NUM = TAB_LINES.
*OBJPACK-DOC_TYPE = 'BMP'.
*OBJPACK-OBJ_NAME = 'PICTURE'.
*OBJPACK-OBJ_DESCR = 'Representation of object 138'.
*OBJPACK-DOC_SIZE = TAB_LINES * 255.
*APPEND OBJPACK.
Completing the recipient list
RECLIST-RECEIVER = '[email protected]'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
*RECLIST-RECEIVER = 'SAPUSERNAME'.
*RECLIST-REC_TYPE = 'P'.
*APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
WRITE: / 'Result of the send process:'.
LOOP AT RECLIST.
WRITE: / RECLIST-RECEIVER(48), ':'.
IF RECLIST-RETRN_CODE = 0.
WRITE 'The document was sent'.
ELSE.
WRITE 'The document could not be sent'.
ENDIF.
ENDLOOP.
WHEN 1.
WRITE: / 'No authorization for sending to the specified number',
'of recipients'.
WHEN 2.
WRITE: / 'Document could not be sent to any recipient'.
WHEN 4.
WRITE: / 'No send authorization'.
WHEN OTHERS.
WRITE: / 'Error occurred while sending'.
ENDCASE.
Reward points if this Helps.
Manish -
How to send mail from ABAP code?
Hi,
I need to send e-mail from ABAP Code .
e.g: If sy-subrc ne 0.
( send e-mail to "[email protected]" )
endif.
Please provide me any Function module for this or any code.
Correct answear will be rewarded my maximum points.
Thanks & Regards,
Gaurav.Check this code sample
* Send mail
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
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.
Regards. -
We need to send email to an external adress from ABAP. Does anybody know a function module or method to do this, maybe even with sample coding?
Best regards
DirkThere are some weblogs here:
4.6x and lower:
/people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface
6.10 and higher:
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface -
Send an attachment in email with length more than 255 char per line
Hi All,
I have to send an attachment in email with length more than 255 char per line. I dont want to break the line after 255 char and add it in another line.
Please suggest me any function module which can perform this.
Thank you all.I looked at all threads in the forum, there was about 5 or 6 identical questions, but surprise, nobody knows! It seems that SO_NEW_DOCUMENT_ATT_SEND_API1 function module does not allow more than 255 characters by line.
It would surprise me a lot if there is no workaround !
As it is very easy to add any binary attachment which is like a very long line, PDF for example (several kilobytes), via the function module above (lots of examples in the forum), I would advise you to try to use the same way, i.e. use the contents_bin parameter instead of the contents_txt parameter (convert the text into binary) and add the line feeds yourself (okay I know, it's not very smart).
Last thing, this function module is deprecated, and we should use BCS classes, maybe they work better. -
Can't sending email via mac mail from home
I have had BT broadband for a year now and recently I have had issues sending mail from mac mail on my business email. It comes back with an error saying to check that email is addressed properly and check smtp settings with admin.
This problem has only just started.
I searched the forum and found a sugestion to verify email in yahoo mail, whch I have done but still no joy.
Any suggestions?
Regards
Stevecognitioncoach wrote:
I have had BT broadband for a year now and recently I have had issues sending mail from mac mail on my business email. It comes back with an error saying to check that email is addressed properly and check smtp settings with admin.
This problem has only just started.
I searched the forum and found a sugestion to verify email in yahoo mail, whch I have done but still no joy.
Any suggestions?
Regards
Steve
Spent two hours on the phone today with BT. They escaleted the problem to a specialist support desk, which we then had to agree to paying a £30 charge if they were able to fix the problem as they say that it is a problem with mac mail. (Which it isn't because it works fine using a different broadband connection, and we have three laptops in the house all with same problem, using outlook as well as mail).
All three laptops have been working with out fault for the last four years and just before christmas they all stopped being able to send emails using hotmail. Obviously BT have changed something somewhere along the line.
The Specialist just changed our outgoing mail server to use BTs instead. (I have been using a different SMTP server anyway as a temporary fix since christmas) Whilst we are able to send emails, we are still unable to connect to hotmails SMTP server. Still had to pay the £30 though. As far as they are concerned that still counts as a fix. Another "solution" they gave me was to change the DNS address in system preferences- Not Ideal as everytime you connect your laptop to a new network you will have to reset them.An absolute joke.
Their direct number is 08000 321 118 if you need them to talk you through it. Best to have your bank card to hand.
Livid.
Maybe you are looking for
-
Any audio filters to take out "hiss" noise?
I have recently done some quick interviews with a boom mic, and there happens to be a "hissing" sound that I wish to take out of the audio. I was just wondering if there is any audio filter or anything in Soundtrack (not Sountrack-Pro) that anyone wo
-
MIRO doc held , wants to post
Hi While processing an invoice half way (50 line items) using MIRO , i clicked the hold button.It given me a doc number.Now I want to retrieve that invoice and post it (with edit).How to do that? Thanks in advance SN
-
Query : Send same data to two different systems
Hi, We are getting data from BI to PI through proxy. And using soap adapter we are sending the data to non sap system. Now my query is : I want to send the data which came from BI to PI to two non sap (Prod and Quality) systems. How can we do that? W
-
Cross tab data is getting multiplied if i use multiple queris in asingle report
HI, i am using multiple queris for displaying data and graphs(charts). my requirement is to display 2 charts and data in crosstab in a single report. all the three thing (2charts and crosstab) will use diffrent values. I am writing 3 sql querie
-
Hi. I have a web at polfam.org/chichos which loads beautifuuly in IE but has issues with layout in Firefox. I can't locate the reson for the problem. Any ideas?